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

Go Beyond Basic RAG with Agentic Behavior

Go Beyond Basic RAG with Agentic Behavior

RAG revolutionized AI by merging search and generation, and agentic behavior takes this search to the next level by enabling LLMs to make decisions and call tools. This talk covers agentic behavior’s key features: tool integration and reasoning, along with a live demo.

Demo colab notebook: https://colab.research.google.com/drive/1c4Q1oBpmLWINXFavaWphsGEnu6zH2Zho?usp=sharing

Avatar for Bilge Yücel

Bilge Yücel

June 17, 2025
Tweet

More Decks by Bilge Yücel

Other Decks in Technology

Transcript

  1. Bilge Yücel Hello 👋 • Developer Relations Engineer at deepset

    • Computer Science → Artificial Intelligence • Berlin, Germany • Bbuzz ‘24, Bbuzz ‘25, Bbuzz ‘26… bilgeyucel in/bilge-yucel @bilgeyucl
  2. Retrieval Augmented Generation RAG • Use LLMs generative capabilities, not

    their knowledge • LLM is “augmentedˮ with a retrieval step • Ground the generative modelʼs output in real-world data, so answers stay factual and relevant Use Cases: Customer Support FAQs, Enterprise Knowledge Bases Search Engines & QA
  3. Benefits of RAG • Private knowledge • Up-to-date information •

    Reduced hallucination • Cost-effective • Transparency
  4. Go Beyond Standard RAG • Complex user queries often need

    multiple retrievals or deeper reasoning ◦ “Compare product A and product B using customer feedback.ˮ • Sometimes, initial retrieval doesnʼt provide enough context ◦ Go to alternative resources • Need for dynamic and iterative search strategies to enhance accuracy ◦ Query writing, other retrieval strategies (hybrid, HyDE…) • and more…
  5. What is an AI agent? An AI agent is a

    system that autonomously pursues a goal by interacting with its environment and using tools. Human LLM Call Environment Action Feedback Stop
  6. What is an AI agent? Overview of a LLM-powered autonomous

    agent system Source: https://lilianweng.github.io/posts/20230623-agent/
  7. What is Agentic Behavior? • AI workflow with agentic components

    ◦ Decision making LLM ◦ A reasoning step + self-reflection ◦ Tools ◦ Memory • Planning + Action • Prompting strategies: CoT → ReAct • Tool-calling giving the model the ability to choose what to do next
  8. Tool Calling Tool calling refers to the ability of a

    language model to dynamically invoke external functions and APIs as part of its reasoning process. LLM Answer Generation Tool Calling: Hybrid Retrieval Tool Calling: Weather API LLM Response Tool Calling: Web Search Tool Calling: Flight Radar API
  9. Tool/Function Calling • Passing prompt + functions/tools (name, description, parameters)

    • User query → function name + JSON object for arguments • Use arguments to call the function
  10. Agentic RAG • Deterministic → non-deterministic • LLM as the

    brain and decides on the next action • Access to tools and can go to alternative resources: Web, another database • Update the retrieval: query rewriting, query decomposition, multi-step retrieval
  11. • Open-source AI orchestration framework by deepset • deepset AI

    Platform is built on Haystack • Provides the tools that Python developers need to build real world, agentic AI systems • Building blocks: Components & Pipelines
  12. Agent Component User Request Agent LLM (e.g. OpenAI, Anthropic, Gemini)

    System Prompt Tool ComponentTool MCPTool ToolSet Generated Answer
  13. Scan the QR Code to receive slidedeck and demo notebook

    shared during the presentation! Thank You! bilgeyucel in/bilge-yucel @bilgeyucl