Implement Agentic RAG Using Claude 3.5 Sonnet, LlamaIndex, and Milvus

chloewilliams62 515 views 22 slides Aug 14, 2024
Slide 1
Slide 1 of 22
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22

About This Presentation

In this talk, we review the cutting-edge techniques for implementing Agentic Retrieval-Augmented Generation (RAG) systems, leveraging the power of Claude 3.5 Sonnet, LlamaIndex, and Milvus. Retrieval-Augmented Generation has become a cornerstone in building intelligent systems that require both gen...


Slide Content

Build Agentic RAG Using
Claude 3.5 Sonnet,
LlamaIndex,
and Zilliz

Bill Zhang

System Evolving
2022, 2023, 2024
●LLM
●Compound AI Systems
●Agents
Shift from Models to Compound Systems
Compound AI Systems
User
Query
Generate
(LLM)
Answer
User
Query
Search
Query(LL
M)
Generate(
LLM)
Generate(
LLM)
Compound AI
System

Limitations of models
●Limited Data/Knowledge
●Hard to Adapt

Benefits of Compound Systems
●Modular
●Easy to Adapt
●E.g. RAG
○Very Specific
Control Logic
Programmatic
Autonomy
(LLM)
Fast Slow
- +

LLM Agents
●Reason
●Act (Using Tools)
○Search
○Calculate
○Coding
○Another LLM
●Access Memory

LLM Powered Autonomous Agents
User
Query
Plan/
Think
Act/
Tools
Observe Answer

RAG

Weakness
Certain Questions where top-k retrieval will fail:
●Summarization Questions: Summarize a document
●Comparison Questions: Compare the performance of employee A and B
●Structured Analytics + Semantic Search: Analyze the risk factors of highest
performing vector database companies globally.
●General multi-part questions: Tell me A, and Tell me B, Make a table and
generate a conclusion.

What is Agentic RAG?
RAG is just a tool for Agents.

Agents from Phase I to X
●Routing: Given user query and set of choices, output subset of
choices to route to.
●Query Planning: Break down query into parallelizable
Sub-queries. Each subquery can be executed against any RAG
●Tool Use: Use an LLM to call an API, LLM will determine the
parameters of the API.

●ReAct: Reasoning + Acting with LLMs
○Sequential multi-part problem? (Make it Loop)
○Stateful (Add memory)

ReAct Agent Model

●Dynamic Query Planning
○Plan Ahead at each Step
○Parallelize execution as much as possible
LLMCompiler

Observability, Control, Customize……

Implement Agentic RAG with Claude 3.5 Sonnet

Embedding Generation

Zilliz Cloud Vector Database Integration
●Zilliz Registration
○https://cloud.zilliz.com/signup
●Data ingestion

Data Retrieving

Create AI Agent

Bring everything together

Data
Ingestion
Tags