πŸ† Hackathon 2025Powered by TigerGraph

Graphs make LLM inference smarter

A 3-pipeline system that routes queries through knowledge graphs when it matters β€” cutting tokens by 58%, resolving multi-hop questions via entity-graph traversal, and delivering measurably better answers.

graphrag_pipeline.py
# AI Factory Model β€” 4-Layer Architecture

class GraphRAGPipeline:
graph = TigerGraphCloud()
router = AdaptiveQueryRouter()
llm = UniversalLLM("gemini-2.5-flash")
eval = RAGASEvaluator()

def query(self, q):
route = self.router.classify(q)
context = self.graph.traverse(q)
return self.llm.generate(context) βœ“
βˆ’58%
Token Reduction vs RAG
4
AI Factory Layers
12
LLM Providers
5
Novel Features
50
Unit Tests
What Makes It Different

Five novel features,
one unified system

Each feature was designed to solve a specific GraphRAG challenge β€” from query routing to cost optimization.

🧠

Adaptive Query Router

Novel

Analyzes query complexity in real-time and routes simple questions to fast baseline RAG while directing multi-hop questions through the knowledge graph.

πŸ“‹

Schema-Bounded Extraction

Novel

Constrains entity extraction to TigerGraph's schema, eliminating hallucinated node types and ensuring every extracted entity maps to a valid graph vertex.

πŸ”‘

Dual-Level Keywords

Novel

Extracts both high-level concepts and low-level entities from queries, enabling graph traversal at multiple granularity levels for richer context.

πŸ”—

Graph Reasoning Paths

Novel

Traces explicit entity→relation→entity chains through TigerGraph, providing human-readable evidence paths that make LLM answers verifiable.

πŸ“Š

Real-Time Cost Tracking

Novel

Measures tokens, latency, and USD cost per query for both pipelines simultaneously, with interactive projections at scale.

🌐

12 LLM Providers

Universal

Universal LLM layer supporting Claude, GPT-4, Gemini, Llama, Mistral, DeepSeek, Grok, Cohere, and more β€” swap providers with one parameter.

How It Works

From query to answer
in four steps

01
01

Query Enters the System

A natural language question arrives. The Adaptive Router analyzes complexity, entity count, and multi-hop indicators to classify the query.

Complexity score: 0.0–1.0 | Types: bridge, comparison, factoid
02
02

3-Pipeline Activation

All 3 pipelines execute simultaneously: LLM-Only (no retrieval), Baseline RAG (vector search β†’ LLM), and GraphRAG (entity extraction β†’ graph traversal β†’ LLM).

Schema-bounded extraction ensures valid entities | GSQL multi-hop traversal
03
03

Graph Traversal & Evidence

TigerGraph traces entity→relation→entity paths through the knowledge graph, collecting structured evidence that the LLM can follow.

2-hop traversal | Reasoning paths | Dual-level keywords
04
04

LLM Generation & Evaluation

Any of 12 LLM providers (Gemini, GPT-4, Llama, etc.) generates answers. Evaluated with F1, Exact Match, LLM-as-a-Judge (PASS/FAIL), and BERTScore in real-time.

Cost tracking | Token counting | Latency measurement
Key Insights

Why graphs change the game

🧠
Adaptive Intelligence

β€œGraphRAG reduces token usage by routing simple queries to baseline while giving complex multi-hop questions the structured reasoning they need.”

40% fewer tokens on simple queries
πŸ“‹
Graph Integrity

β€œSchema-bounded extraction ensures every entity maps to a valid TigerGraph vertex β€” no hallucinated node types, no broken traversals.”

Zero invalid entity types
πŸ”—
Explainability

β€œThe reasoning path visualization shows exactly which graph edges were traversed, making every LLM answer traceable and verifiable.”

Full evidence chain per answer
Ready to explore?

See the difference
graphs make

Run a live comparison across all 3 pipelines β€” LLM-Only, Basic RAG, and GraphRAG. Measure tokens, cost, LLM-Judge accuracy, and BERTScore β€” all in your browser.