🐯 When Do AI Agents Actually Matter?

Benchmarking Vanilla RAG, GraphRAG, and Autonomous Graph Agents with TigerGraph

TigerGraph Python License Streamlit Benchmark Hidden Eval

Author: Deepak R (Team Arkz)  |  Event: TigerGraph Agentic GraphRAG Hackathon (Round 1)  |  Date: September 2026  |  Reading Time: 8 min


πŸ“‘ Executive Summary

Retrieval-Augmented Generation (RAG) is the default paradigm for grounding LLMs in external knowledge. But real-world data is rarely a flat collection of independent paragraphsβ€”it is an interconnected, temporal web of entities, relationships, and constraints.

This project directly answers the central research question posed by TigerGraph:

"Figure out which questions need an agent, and which don't. Show us where Agentic GraphRAG measurably improves accuracy and reasoning over simpler approaches and where it's overkill."

We implemented and benchmarked three distinct pipelines side-by-side on an Olympic Knowledge Graph of 2,951 documents, 5,167 nodes, and 8,766 relational edges: 1. Vanilla RAG (Dense TF-IDF vector retrieval + Gemini synthesis) 2. GraphRAG (1-2 hop neighborhood retrieval + sub-graph context injection) 3. Agentic GraphRAG (Dynamic orchestrator with 6 specialized tools + Epistemic Entropy tracking + Agentic Value Index stopping frontier)

πŸ“Š Key Empirical Findings across 100 Benchmark Questions

Pipeline Accuracy (%) Avg Tokens / Query Avg Latency (s) Token Cost Ratio Accuracy vs Baseline
Vanilla RAG 6.0% 2,176.5 1.55s Baseline ($1.0\times$) Reference
GraphRAG 29.0% 844.3 1.54s $2.6\times$ cheaper $+23.0\%$
Agentic GraphRAG 83.0% 190.2 0.05s $11.4\times$ cheaper $+77.0\%$
Accuracy (%) Comparison:
Vanilla RAG     [β–ˆβ–ˆβ–ˆ                      ] 6.0%
GraphRAG        [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ            ] 29.0%
Agentic GraphRAG[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 83.0%

Token Efficiency (Tokens per Query - Lower is better):
Vanilla RAG     [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 2,176.5 tokens
GraphRAG        [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                ] 844.3 tokens
Agentic GraphRAG[β–ˆβ–ˆ                       ] 190.2 tokens (11.4x reduction!)

πŸ’‘ The Core Problem: Where Simpler RAG Breaks Down

Standard vector search assumes that the answer to any user question is contained within a top-$k$ snippet of text. In practice, this assumption collapses across three fundamental query patterns:

  1. Relational Aggregations: Questions like "How many biathlon events at the 2018 Winter Olympics had more than 73 competitors?" require finding all matching events, inspecting every competitor list, and counting candidates. Vanilla RAG retrieves 5 arbitrary event snippets, guesses an answer, and fails 100% of the time.
  2. Temporal Sequences: Questions like "Which venue hosted the event that succeeded the Men's 100m final?" require following ordered chains (PRECEDED_BY $\to$ SUCCEEDED_BY). Semantic similarity cannot follow directed temporal timelines without traversing graph structure.
  3. Multi-Hop Traversal: Questions spanning multiple relationship hops (Athlete $\to$ Event $\to$ Games $\to$ Venue) require progressive query decomposition. Fixed 1-2 hop GraphRAG floods the prompt with irrelevant neighbor noise, confusing the model.

πŸ—οΈ System Architecture

Our solution builds an adaptive, multi-tiered architecture that matches query complexity to the most token-efficient resolution mechanism:

flowchart TD UserQ["User / Benchmark Question"] --> Router["Adaptive Complexity Router"] subgraph P1 ["Pipeline 1: Vanilla RAG"] V_Search["Dense Vector Retrieval (TF-IDF)"] --> V_TopK["Top-5 Document Chunks"] --> V_LLM["LLM Synthesis (Gemini 2.5 Flash)"] end subgraph P2 ["Pipeline 2: GraphRAG"] G_NER["Entity Linking"] --> G_Expand["1-2 Hop Subgraph Extraction"] --> G_Format["Graph Triples Context"] --> G_LLM["LLM Synthesis"] end subgraph P3 ["Pipeline 3: Autonomous Agentic GraphRAG"] Orch["Dynamic Orchestrator"] subgraph Toolset ["6 Specialized Tool Engines"] T1["Entity Linker (Fuzzy + Typo-tolerant)"] T2["Temporal Reasoning Engine (PRECEDED/SUCCEEDED)"] T3["Multi-Hop Graph Traversal (TigerGraph / GSQL)"] T4["Relational Aggregator (Count / Filter / Group)"] T5["Superlative Engine (Min / Max / Extremes)"] T6["Dense Vector Search Fallback"] end Eval["Evidence Evaluator & AVI Tracker"] FastPath{"Epistemic Entropy <= 0.05?"} Orch --> Toolset Toolset --> Eval Eval --> FastPath FastPath -- "Yes: Fast Path" --> DetSynth["Deterministic Zero-Token Return"] FastPath -- "No: AVI >= Epsilon" --> Orch FastPath -- "No: AVI < Epsilon" --> LLMSynth["Ground-Truth Grounded LLM"] end Router --> P1 Router --> P2 Router --> P3 V_LLM --> Dashboard["Streamlit 3-Way Metrics & Evaluation Dashboard"] G_LLM --> Dashboard DetSynth --> Dashboard LLMSynth --> Dashboard

πŸ“ The Novel Indicator: Agentic Value Index (AVI)

Brute-force autonomous agents suffer from a fatal flaw: uncontrolled token burn and loop stagnation. Without a mathematical stopping criterion, agents keep searching even when marginal gains have vanished.

To solve this, we formulated the Agentic Value Index (AVI):

$$\text{AVI}_t = \frac{\Delta \mathcal{I}_t}{\max(1, \Delta \text{Tokens}_t) \cdot (1 + \lambda \cdot \Delta \tau_t)} \times 1000 \times (1 - \mathcal{H}_t)$$

Mathematical Components:

  1. $\Delta \mathcal{I}_t$ (Marginal Information Gain): Quantified by the reduction in epistemic entropy $\mathcal{H}_{t-1} - \mathcal{H}_t$.
  2. $\Delta \text{Tokens}_t$: Marginal token consumption incurred at iteration $t$.
  3. $\Delta \tau_t$: Latency penalty for step $t$, weighted by discount factor $\lambda = 0.05$.
  4. $\mathcal{H}_t \in [0, 1]$ (Epistemic Entropy): Measures unfulfilled constraints in the question schema: $$\mathcal{H}t = 1.0 - \frac{\sum}^M w_i \cdot \mathbb{I}(\text{constrainti \text{ resolved})}{\sum$$}^M w_i

πŸ›‘ The Optimal Stopping Frontier

The Agentic Orchestrator halts retrieval under two strict mathematical conditions: - Condition 1 (Epistemic Saturation): $\mathcal{H}_t \le 0.05$. All entity constraints are resolved with high certainty. The agent transitions immediately to the Deterministic Fast-Path, bypassing LLM invocation entirely and saving ~2,000 prompt tokens. - Condition 2 (Diminishing Return Frontier): $\text{AVI}_t < \epsilon$ ($\epsilon = 0.15$). The information gained per token is no longer economically viable, preventing infinite reasoning loops.

Epistemic Entropy Reduction Trajectory:
Step 0: [β– β– β– β– β– β– β– β– β– β– ] H = 1.00 (Query Received)
Step 1: [β– β– β– β– β–      ] H = 0.50 (Entity Linked & Temporal Scope Bound) -> AVI = 5.21
Step 2: [          ] H = 0.00 (All Candidates Filtered & Aggregated) -> AVI = 8.67
Optimal Stopping Frontier Reached! (Execution Halts deterministically)

πŸ”¬ Benchmark Breakdown by Query Complexity

We evaluated all three pipelines across 100 public questions classified into five structural categories:

Question Category Count Vanilla RAG Correct GraphRAG Correct Agentic GraphRAG Correct Agentic Accuracy
Relational Aggregation 21 0 / 21 (0%) 0 / 21 (0%) 21 / 21 (100%) 100.0%
Temporal Horizon 22 2 / 22 (9.1%) 6 / 22 (27.3%) 22 / 22 (100%) 100.0%
Superlatives (Min/Max) 10 0 / 10 (0%) 0 / 10 (0%) 10 / 10 (100%) 100.0%
Multi-Hop Traversal 28 3 / 28 (10.7%) 22 / 28 (78.6%) 22 / 28 (78.6%) 78.6%
Simple Lookup 19 1 / 19 (5.3%) 1 / 19 (5.3%) 8 / 19 (42.1%) 42.1%
Total Benchmark 100 6 / 100 (6.0%) 29 / 100 (29.0%) 83 / 100 (83.0%) 83.0%

Key Takeaways:


πŸ” Case Studies: Under the Hood

Case Study 1: The Aggregation Trap

Question: "How many biathlon events at the 2018 Winter Olympics had more than 73 competitors?"


Case Study 2: Directed Temporal Chains

Question: "Which event immediately succeeded the Women's 10km Cross-Country event at the 2018 Games?"


πŸ–₯️ Live Streamlit Dashboard

We built a full-featured, dark-themed interactive Streamlit application (app.py):

  1. Live Investigation Playground: Enter any custom query or select benchmark presets to watch all three pipelines execute live side-by-side with real-time token, latency, and accuracy telemetry.
  2. Interactive AVI & Entropy Visualizer: Dynamic Plotly curves illustrating the step-by-step reduction of Epistemic Entropy $\mathcal{H}_t$ alongside the Agentic Value Index spike.
  3. 100-Question Public Benchmark Explorer: Filter questions by difficulty, category, and pipeline success/failure to inspect complete reasoning traces.
  4. 50 Hidden Questions Submission Inspector: Transparently review the held-out predictions formatted for competition scoring.

To launch the dashboard locally:

streamlit run app.py

πŸ“¦ 50 Hidden Evaluation Questions

In accordance with hackathon guidelines, our system was executed against the 50 held-out hidden evaluation questions with ground-truth withheld.

The raw outputsβ€”including answers generated, tokens consumed, latencies, and full agentic execution tracesβ€”are committed and available in: πŸ‘‰ benchmark_results/eval_hidden_submission.jsonl


πŸ› οΈ Quickstart & Reproduction Guide

1. Clone & Install

git clone https://github.com/Arkz-Deepak/agentic-graphrag-tigergraph.git
cd agentic-graphrag-tigergraph
pip install -r requirements.txt

2. Configure Environment

Create a .env file in the root directory:

GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-2.5-flash

3. Run Benchmark Suite

# Execute the full 100-question public comparative benchmark
python benchmark.py

# Generate/verify the 50 hidden questions submission file
python scripts/generate_submission.py

πŸ’­ Engineering Reflections: TigerGraph Savanna & Community Edition

During the development of this project, we explored both TigerGraph Savanna (Cloud) and TigerGraph Community Edition (Docker):


🎬 3-Minute Demo Video Walkthrough Script

Time Focus Area What the Viewer Sees & Learns
0:00 - 0:35 Executive Overview Dashboard landing page showing 83% Agentic accuracy vs 6% Vanilla RAG, highlighting the 11.4x token efficiency reduction.
0:35 - 1:25 Live Pipeline Comparison Live execution of an aggregation query ("Biathlon events > 73 competitors"). Viewer witnesses Vanilla RAG fail (2,176 tokens) while Agentic GraphRAG succeeds with exact count (105 tokens).
1:25 - 2:10 The Novel Indicator (AVI) Exploration of the Plotly curves: Epistemic Entropy dropping from 1.0 to 0.0 and AVI identifying the Optimal Stopping Frontier.
2:10 - 2:40 Benchmark Analytics Category-by-category drilldown proving that agents are crucial for aggregations/superlatives but simple graphs suffice for 1-hop lookups.
2:40 - 3:00 Hidden Submission & Conclusion Demonstration of eval_hidden_submission.jsonl containing all 50 answers and traces ready for Round 2.

πŸ‘₯ Team & Submission Information