Slide 1

Slide 1 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software – Sprachverständnis ändert alles Christian Weyer @christianweyer CTO, Technology Catalyst

Slide 2

Slide 2 text

§ Technology catalyst § AI-powered solutions § Pragmatic end-to-end architectures § Microsoft Regional Director § Microsoft MVP for Developer Technologies & Azure ASPInsider, AzureInsider § Google GDE for Web Technologies [email protected] @christianweyer https://www.thinktecture.com AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Christian Weyer Co-Founder & CTO @ Thinktecture AG 2

Slide 3

Slide 3 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Our journey today 3 AI all-the- things? LLMs in your Solutions Selected Scenarios Exciting Times… Democratizing Generative AI

Slide 4

Slide 4 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles AI all-the-things? 4

Slide 5

Slide 5 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles A.I. 5

Slide 6

Slide 6 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles AI all-the-things? 6 Data Science Artificial Intelligence Machine Learning Unsupervised, supervised, reinforcement learning Deep Learning ANN, CNN, RNN etc. NLP Generative AI GAN, VAE, Transformers etc. Image / Video Generation GAN, VAE Large Language Models Transformers

Slide 7

Slide 7 text

§ LLMs generate text based on input § LLMs can understand text – this changes a lot § Without having to train them on data, domains, or use cases § Prompts are the universal interface (“UI”) → unstructured text with semantics § Human language evolves as a first-class citizen in software architecture 🤯 AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Large Language Models (LLMs) 7 Text… – really, just text?

Slide 8

Slide 8 text

§ LLMs are programs § LLMs are highly specialized neural networks § LLMs use(d) lots of data § LLMs need a lot of resources to be operated § LLMs have an API to be used through AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Large Language Models demystified 8

Slide 9

Slide 9 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles LLMs in your Solutions 9

Slide 10

Slide 10 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Using LLMs: It’s just APIs ! Inference, FTW. 10

Slide 11

Slide 11 text

GPT-4 API access OpenAI Playground AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles DEMO 11

Slide 12

Slide 12 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles The best tool for any developer to talk to LLMs! 12 🙈

Slide 13

Slide 13 text

§ OSS framework for developing applications powered by LLMs § > 1000 contributors § Python and Typescript versions § Chains for sequences of LLM-related actions in code § Abstractions for § Prompts & LLMs (local and remote) § Memory § Vector stores § Tools § Loading text from a wide range of sources AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles LangChain - building LLM-based applications 13

Slide 14

Slide 14 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Talk to your Data 14

Slide 15

Slide 15 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Answering Questions on Data Retrieval-augmented generation (RAG) Cleanup & Split Text Embedding Question Text Embedding Save Query Relevant Text Question Answer LLM 15 Vector DB Embedding model Embedding model 💡 Indexing / Embedding QA

Slide 16

Slide 16 text

RAG: Learning about my company’s policies via Slack LangChain (Python), Weaviate, Mixtral on Groq AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles DEMO 16

Slide 17

Slide 17 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Talk to your Systems 17

Slide 18

Slide 18 text

§ LLM can be instructed to, e.g. § Do sentiment analysis § Extract information from text § Extract structured information § Schema description: JSON, TypeScript types, etc. § Clever & strict prompting § Tools like Kor, TypeChat, or Open AI Function / Tool Calling AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Extracting meaning in text for structured data 18

Slide 19

Slide 19 text

Extracting structured data from text: Flight search OpenAI Tool Calling with LangChain, FastAPI & JS AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles DEMO 19

Slide 20

Slide 20 text

Extracting structured data from voice: Form filling JSON extraction & form filling in Angular, Mixtral on Groq AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles DEMO 20

Slide 21

Slide 21 text

§ Tool / function calling standard established by OpenAI § Functions for interactions § LLM chooses to output JSON object containing arguments to call one or many functions § LLM does not call the function § You do it in your code § All major libs support tool calling with abstractions § OpenAI SDKs § Langchain § Semantic Kernel AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Extending LLM capabilities 21 curl https://api.openai.com/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "user", "content": "What is the weather like in Boston?" } ], "tools": [ { "type": "function", "function": { "name": "get_current_weather", "description": "Get the current weather in a given location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA" }, "unit": { "type": "string", "enum": ["celsius", "fahrenheit"] } }, "required": ["location"] } } } ], "tool_choice": "auto" }'

Slide 22

Slide 22 text

Extending LLM capabilities: Calculator as tool OpenAI Tool Calling with LangChain, Open AI GPT-3.5 AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles DEMO 22

Slide 23

Slide 23 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Democratizing Generative AI 23

Slide 24

Slide 24 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles LLMs everywhere OpenAI-related (cloud) OpenAI Azure OpenAI Service Big cloud providers Google Model Garden on Vertex AI Amazon Bedrock Open-source Edge IoT Server Desktop Mobile Web 24 Other providers Antrophic Cohere Mistral AI Hugging Face Open-source

Slide 25

Slide 25 text

§ Open-source community drives innovation in Generative AI § HuggingFace is central place for it § Literally, every week a new and “better” LLM shows up 🤓 § Important factors § Use case § Parameter size § Quantization § Processing power needed § Mistral-based family shows big potential for local use cases (7B params) AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Open-source LLMs thrive 25

Slide 26

Slide 26 text

Local RAG with Mistral-7B open-source LLM llama.cpp, ollama, LangChain, StreamLit AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles DEMO 26

Slide 27

Slide 27 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Exciting Times… 27

Slide 28

Slide 28 text

§ LLMs enable new scenarios & use cases to incorporate human language into software solutions § Fast moving and changing field § Every week something “big” happens in LLM space § Frameworks & ecosystem are evolving together with LLMs § Closed vs open LLMs § Competition drives invention & advancement § SLMs: specialized, fine-tuned for domains § Quality & security topics need to be addressed § SISO (sh*t in, sh*t out) § Quality of results heavily depends on your data & input AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles Current state 28

Slide 29

Slide 29 text

AI++: Integration von Large Language Models (LLMs) in moderne Business-Software Sprachverständnis ändert alles 2024: The year of SLMs 29

Slide 30

Slide 30 text

Thank you! Christian Weyer https://thinktecture.com/christian-weyer 30