Learn
Join Amazing In Person Sessions
1) AWS Fintech Forum 2025 - Tuesday 25 February, 2025 9:00 – 5:00 PM IST Bengaluru
Online Events:
Run LLAMA and Deepseek R1 Model Locally Leveraging Ollama – Hands-On Session - Monday, February 24, 2025 - 9:00 PM to 9:30 PM IST
Deep Dive: Next-Gen Amazon SageMaker -Unified Platform for Data, Analytics,AI - Monday, March 17, 2025 - 9:00 PM to 09:45 PM IST
Share
Topic: Hands-On with Deepseek R1 Model on AWS Bedrock
Topic: Revolutionizing Complex Applications with Amazon Bedrock Knowledgebase - GraphRAG
Topic: Revolutionizing Complex Applications with Amazon Bedrock Knowledgebase - Structure Data
Innovate
I was reading more Agentic RAG Graph vs Agentic RAG lately. I will share quick summary for benefit of our beloved newsletter readers.
Agentic RAG: Step-by-Step Flow
Example Use Case: A customer support chatbot answering a query about changing a shipping address.
Query Reception:
Input: The user asks, "Can I change my shipping address for my order?"
Agent Role: A central coordinating agent receives and logs the query.
Query Transformation & Understanding:
Processing: The agent reformulates the query if needed, clarifying key details (e.g., order status, shipping policies).
Purpose: Ensures the query is precise for semantic matching.
Initial Vector Retrieval:
Action: The agent sends the refined query to a vector database to retrieve semantically similar documents.
Data Retrieved: Past customer queries, order status records, shipping policy documents, etc.
Iterative Reasoning and Reflection:
Process: The agent reviews the retrieved documents and performs self-reflection (possibly re-ranking results or seeking additional context).
Outcome: It selects the most relevant pieces of information for response synthesis.
Answer Generation:
Synthesis: The agent uses the integrated context to generate a response, refining its output through iterative feedback if necessary.
Output Example: "Your order is currently in transit. Although changes cannot be applied immediately, you can update your address for future orders or contact our support for urgent modifications."
Agentic Graph RAG: Step-by-Step Flow
Example Use Case: A legal research assistant generating a brief on precedents for contract breach cases in New York.
Query Reception:
Input: The user asks, "Find precedents related to contract breaches in New York that cite case XYZ."
Agent Role: A central agent receives the query and initiates the retrieval process.
Query Transformation & Terminology Extraction:
Processing: A dedicated terminology agent transforms the query into precise legal terms (e.g., “contract breach,” “jurisdiction: New York,” “citing case XYZ”).
Purpose: Ensures consistency in searching structured legal databases.
Initial Vector-Based Retrieval:
Action: The system performs a vector search to retrieve relevant legal documents or cases that match the transformed query.
Data Retrieved: A set of candidate cases, legal opinions, and citations.
Graph-Based Traversal:
Action: The system uses a knowledge graph that models legal citations, relationships, and dependencies.
Process:
It identifies nodes (e.g., specific cases or legal principles) from the vector retrieval.
It then traverses edges in the graph to fetch linked cases (e.g., cases cited by or citing the initially retrieved cases).
Dependency Aggregation & Multi-Hop Reasoning:
Process: The agent aggregates the initial documents with their related nodes (precedents, citing relationships, relevant legal principles).
Outcome: This creates a rich, multi-hop context that reflects the underlying structure of legal knowledge.
Iterative Synthesis & Refinement:
Synthesis: The agent iteratively refines its understanding by merging the graph-derived context with the vector-retrieved content.
Feedback Loop: It may adjust weights or re-rank relationships to ensure all critical dependencies are captured.
Answer Generation:
Output: The final response is a detailed legal brief that includes a coherent chain of related cases and citations.
Output Example: "Based on the analysis, case XYZ has been cited by several precedents in New York. For instance, case ABC and case DEF both reference XYZ, emphasizing similar contractual breach issues. These precedents establish a clear trend in judicial reasoning for contract breaches in this jurisdiction.
Summary:
Agentic RAG is best when dealing with general, unstructured queries where semantic similarity is enough. It follows a straightforward cycle of retrieval, reflection, and generation.
Agentic Graph RAG is preferred when data contains structured, interdependent relationships. By combining vector retrieval with graph traversal, it ensures multi-hop dependencies are captured, making it ideal for complex domains like legal research.
Elevate
Feel free to have a glance at blogs and share your thoughts