RAG
1
User Query
Raw input from user
2
Query Encoding
Tokenize & embed
Tokenization
Embedding generation
3
Knowledge Retrieval
Vector DB similarity search
4
Context Selection
Filter top-k passages
Rank chunks
Filter noise
5
Fusion Step
Merge query + context
6
Generation Phase
LLM produces output
7
Validation Layer
Quality check
Accuracy check
Bias removal
8
Output Formatting
Structure & clean response
Citation tagging
Format output
Final Response
Popular RAG Tools
LangChain
Orchestration
LlamaIndex
Data framework
Pinecone
Vector DB
Weaviate
Vector DB
Qdrant
Vector search
Cohere
Embeddings
HuggingFace
Models
ChromaDB
Vector store
Agentic RAG
1
User Query
Complex / multi-step input
2
Query Decomposition
Break into sub-tasks
3
Agent Planning
Select tools & strategy
Search tools
Vector DB
APIs
4
Iterative Retrieval
Multi-hop evidence gathering
Re-query if insufficient
5
Reasoning & Synthesis
Multi-step chain-of-thought
6
Generation Phase
Grounded LLM output
7
Self-Reflection
Agent critiques own output
Fact verification
Source citation
8
Refinement Loop
Improve until threshold met
Quality score
Re-generate if low
Final Response
Popular Agentic RAG Tools
Claude
Reasoning agent
OpenAI Agents
Agent SDK
LangGraph
Agent workflows
CrewAI
Multi-agent
AutoGen
Agent framework
Haystack
NLP pipelines
Tavily
Web search
E2B
Code execution
CAG
1
User Query
Raw input from user
2
Query Encoding
Prepare for context lookup
3
Context Injection
Pre-load full knowledge
Domain memory
Knowledge base
4
Context Expansion
Enrich with related context
5
Fusion Step
Merge context into prompt
6
Generation Phase
Long-context LLM generation
7
Validation Layer
Cross-check with context
Consistency check
Context alignment
8
Context Pruning
Remove irrelevant context
Trim window
Pin key facts
Final Response
Popular CAG Tools
Claude 3.7
200K context
GPT-4o
128K context
Gemini 1.5
1M context
Mistral
Long context
Notion AI
Workspace context
Mem.ai
Memory layer
Cursor
Codebase context
Replit AI
Project context