Upgrade to Pro — share decks privately, control downloads, hide ads and more …

InfoDays Generative AI für Entwickler: ‘Talk t...

InfoDays Generative AI für Entwickler: ‘Talk to Your Systems’: Structured Output & Tool Calling - Rückgrat für LLM-Integration in eigene Anwendungen

Das "Sprechen" mit eigenen Daten (auch bekannt als RAG) ist der "Hello World"-Anwendungsfall für LLMs. Aber es gibt noch mehr zu entdecken. Basierend auf ihrem Verständnis der menschlichen Sprache können LLMs genutzt werden, um innovative Interaktionen für Anwendungen und Systeme zu realisieren.
In dieser Session zeigt Christian, wie Sie strukturierte Datenausgaben mit Datenschemata und Funktionsaufrufen nutzen, um Ihre APls mit der Power von LLMs zu verbinden. Sehen Sie, wie die transformative Natur von Generative Al eventuell auch Ihren Lösungen helfen kann. Kommen Sie vorbei und lassen Sie uns mit unseren Systemen sprechen!

Christian Weyer

November 19, 2024
Tweet

More Decks by Christian Weyer

Other Decks in Programming

Transcript

  1. ‘Talk to your systems’ Structured Output & Tool Calling -

    Rückgrat für LLM-Integration in eigene Anwendungen Christian Weyer | Co-Founder & CTO | Thinktecture AG | [email protected]
  2. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output TALK TO YOUR SYSTEMS WHY? 2
  3. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output 3 Human language rocks Extending access to software
  4. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output A classical UI – strong with certain use cases 4
  5. One possible UX pattern 'Talk to your systems' Integrating Gen

    AI into your architectures with structured LLM output Language-enabled “UIs” 5
  6. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output 6 LLMs Enabling new scenarios
  7. § LLMs are always part of end-to-end architectures § Client

    apps (Web, desktop, mobile) § Services with APIs § Databases § etc. § LLM is an additional asset with an API in your architecture § Enabling human language as a first-class citizen 'Talk to your systems' Integrating Gen AI into your architectures with structured LLM output End-to-end architectures with LLMs 7 Clients Services LLMs Desktop Web Mobile Service A Service B Service C API Gateway Monitoring LLM 1 LLM 2
  8. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output TALK TO YOUR SYSTEMS HOW? 8
  9. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output 9 Prompting Talk to me!
  10. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output 10 ‘Function Calling’ Give it schema!
  11. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output 11 Pydantic & Instructor Make it easier!
  12. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output TALK TO YOUR SYSTEMS WHAT? 12
  13. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output 13 End-to-End Talking to your applications
  14. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output Talk to Thinktecture 14 Angular PWA Speech-to-Text Internal Gateway (Python FastAPI) LLM / SLM Text-to-Speech Transcribe spoken text Transcribed text Check for experts availability with text Extract { experts, booking times } from text Structured JSON data (Tool calling) Generate response with availability Response Response with experts availability 🗣 🔉 Speech-to-text for response Response audio Internal Business API (node.js – veeeery old) Query Availability API Availability When is CL…? CL will be…
  15. Filling Angular forms with human language input protected readonly formGroup

    = this.fb.group({ firstName: [’’], lastName: [’’], addressLine1: [’’], addressLine2: [’’], city: [’’], state: [’’], zip: [’’], country: [’’] }); 'Talk to your systems' Integrating Gen AI into your architectures with structured LLM output Smart form filling OK, nice – so here is my address then:: Peter Schmitt, Rheinstr. 7 in Schkeuditz – postcode is 04435, BTW. 15 Smart Form Filler (TS code & LLM)
  16. 'Talk to your systems' Integrating Gen AI into your architectures

    with structured LLM output TALK TO YOUR SYSTEMS RECAP 16
  17. § Human language enables new powerful use cases & access

    to our software § Always use structured output § Structured output is the secret sauce for integrating LLMs into your application architectures § Consider applying the Maybe pattern § Brings more robustness § Function Calling can be flaky § Especially with smaller models § Do not use frameworks that ‘auto-magically’ map Function Calling results to local code § Always validate return data! § Instructor is a helpful library to boost LLM use cases § Implements lots of best practices § Supports any LLM / SLM § Integrates with FastAPI 'Talk to your systems' Integrating Gen AI into your architectures with structured LLM output Recap & Recommendations 17