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

Advanced RAG – Dynamically Selecting the best Retrievers for Queries with AI

Marco Frodl
January 25, 2024

Advanced RAG – Dynamically Selecting the best Retrievers for Queries with AI

In Retrieval Augmented Generation, data from retrieval systems such as Vector DBs are used to find the relevant information for answering a question. If multiple retrieval systems are used, selecting the optimal query system for a request can be a challenge.
This webinar introduces the MultiRouteChain paradigm from the LangChain framework, which allows for dynamic selection of the retrieval system based on semantic matching of the question and retrieval system. Live coding will illustrate how MultiRouteChain improves the quality of RAG in answering user questions by selecting the most relevant QA chain for retrieval for each request.

Marco Frodl

January 25, 2024
Tweet

More Decks by Marco Frodl

Other Decks in Technology

Transcript

  1. Advanced RAG Dynamically Selecting the best Retrievers for Queries with

    AI Marco Frodl @marcofrodl Principal Consultant for Generative AI
  2. Why is it important? Advanced RAG Dynamically Selecting the best

    Retrievers for Queries with AI Generative AI User Input AI Processing Generated Output OpenAI GPTx DALL-E 3 GPT-4 Vision Whisper Text Text Text-to-Speech (TTS-1)
  3. Advanced RAG Dynamically Selecting the best Retrievers for Queries with

    AI What is RAG? https://aws.amazon.com/what-is/retrieval-augmented-generation/ RAG = Ingestion + Retrieval P
  4. Advanced RAG Dynamically Selecting the best Retrievers for Queries with

    AI About Me Marco Frodl Principal Consultant for Generative AI Thinktecture AG X: @marcofrodl E-Mail: [email protected] https://www.thinktecture.com/thinktects/marco-frodl/
  5. Ingestion Advanced RAG Dynamically Selecting the best Retrievers for Queries

    with AI Simple RAG in a nutshell Splitted (smaller) parts Embedding- Model Embedding 𝑎 𝑏 𝑐 … Vector- Database Document Metadata: Reference to original document
  6. Ingestion++ HyQE: Hypothetical Question Embedding Advanced RAG Dynamically Selecting the

    best Retrievers for Queries with AI Simple Advanced RAG in a nutshell LLM, e.g. GPT-3.5-turbo Transformed document Write 3 questions, which are answered by the following document. Chunk of Document Embedding- Model Embedding 𝑎 𝑏 𝑐 … Vector- Database Metadata: content of original chunk
  7. Watch the Webinar Advanced RAG Dynamically Selecting the best Retrievers

    for Queries with AI Simple Advanced RAG in a nutshell https://www.thinktecture.com/webinare/moderne-semantic-search-mit-llms-vektor-datenbanken-und-langchain/
  8. Ask me anything Advanced RAG Dynamically Selecting the best Retrievers

    for Queries with AI Simple RAG Question Prepare Search Search Results Question Answer LLM Vector DB Embedding Model Question as Vector Workflow Terms - Retriever - Chain Elements Embedding- Model Vector- DB Python LLM Langchain 🦜🔗
  9. Just one Vector DB? Advanced RAG Dynamically Selecting the best

    Retrievers for Queries with AI What’s wrong with Simple RAG?
  10. Just one Vector DB/Retriever? • Multiple GenAI-Apps • Scaling and

    Load Balancing • Query Params per Retriever • Hosting (Environment, Product) • Fast Updates & Re-Indexing • Access Rights • Custom Retriever Advanced RAG Dynamically Selecting the best Retrievers for Queries with AI What’s wrong with Simple RAG? On-Premise AI-App 🦜🔗 Cloud Docs Public Tickets Features Website Sales Docs Internal Tickets
  11. Finding the best source before asking Advanced RAG Dynamically Selecting

    the best Retrievers for Queries with AI Advanced RAG Question Retriever Selection 0-N Search Results Question Answer LLM Embedding Model Vector DB A Question as Vector Vector DB B LLM Prepare Search or 1
  12. Finding the best source before asking Advanced RAG Dynamically Selecting

    the best Retrievers for Queries with AI Advanced RAG Question Retriever Selection 0-N Search Results Question Answer LLM Embedding Model Vector DB A Question as Vector Vector DB B LLM Prepare Search or Question Prepare Search Search Results Question Answer LLM Vector DB Embedding Model Question as Vector
  13. Advanced RAG Dynamically Selecting the best Retrievers for Queries with

    AI Demo: Dynamic Retriever Selection with AI P