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

Build Your First LLM-based Application with Hay...

Bilge Yücel
December 02, 2023

Build Your First LLM-based Application with Haystack

Bilge Yücel

December 02, 2023
Tweet

More Decks by Bilge Yücel

Other Decks in Technology

Transcript

  1. 01 - What is it? • 🥑 Developer Advocate at

    deepset • 🏗 Open source LLM Framework: Haystack • 📍 Istanbul, Turkey Bilge Yücel Developer Advocate 🥑 deepset Twitter: @bilgeycl Linkedin: Bilge Yucel GitHub: @bilgeyucel
  2. Agenda 01 - Text Embeddings 02 - Vector Databases 03

    - Retrieval Ret 04 - LLMs 05 - Build a Generative QA App
  3. Text Embeddings/Text Vectors to be or not to be •

    Manageable by computers • Different techniques: ◦ Sparse: TF-IDF, BM25... ◦ Dense: Trained models (Sentence Transformers, Cohere, OpenAI...) • Often has 768 dimensions
  4. • Databases that store high-dimensional vectors • Optimized for vectors:

    ◦ Vector search ◦ CRUD operations ◦ Metadata filtering Vector Databases
  5. Retrieval Query • Getting the most relevant information to the

    query • Used for semantic search, question answering and more
  6. Large Language Models (LLMs) • Big language models • Prompt

    → Human-like output • Text generation: summarization, generative QA, writing code, chat…
  7. LLM: Limitations • LLMs do not know the answer to

    everything • But they are good at following instructions • We can help them in their task by giving them the relevant context + instruction
  8. Retrieval Augmentation Use Cases Prompt Given the following context, answer

    the question. If the answer is not contained within the context, say ‘I don’t know’. Question Answering Context: {{context}} Question: {{question}} Answer: Prompt Summarize the following text. Summarization Text: {{text}} Summary: Question Generation Document: {{document}} Questions: Prompt Given the following document, generate some questions
  9. • Fully open-source framework built in Python for custom LLM

    applications • Provides tools that developers need to build state-of-the-art NLP systems • Building blocks: Pipelines & Components Haystack
  10. Resources Join 👇 Advent of Haystack Check out 👇 Haystack

    @bilgeycl Bilge Yücel Find 👇 Presentation