Play 28 β Knowledge Graph RAG πΈοΈ
Graph-based RAG with entity extraction, relationship mapping, and multi-hop traversal.
Instead of vector similarity (Play 01) or agent-controlled search (Play 21), Knowledge Graph RAG builds a graph of entities and relationships, then traverses the graph to find context for multi-hop reasoning queries like βWho does Aliceβs manager report to?β
Quick Start
cd solution-plays/28-knowledge-graph-rag
az deployment group create -g $RG -f infra/main.bicep -p infra/parameters.json
code . # Use @builder for graph construction, @reviewer for entity audit, @tuner for traversalHow It Differs from Other RAG Plays
| Aspect | Play 01 (Vector) | Play 21 (Agentic) | Play 28 (Graph) |
|---|---|---|---|
| Retrieval | Similarity search | Agent-controlled multi-source | Graph traversal |
| Best for | βFind similar" | "Search and iterate" | "Who/what connects to X?β |
| Data model | Flat chunks | Flat + sources | Entities + relationships |
| Multi-hop | No | Limited | Native (2-3 hops) |
Architecture
π See architecture.md for full data flow, service roles, security architecture, and scaling tables.
Key Metrics
- Entity F1: β₯0.85 Β· Relationship precision: β₯0.80 Β· Multi-hop: β₯75% Β· Graph vs vector lift: β₯15%
DevKit (Graph RAG-Focused)
| Primitive | What It Does |
|---|---|
| 3 agents | Builder (entity extraction/graph/traversal), Reviewer (graph quality/entity resolution), Tuner (depth/hybrid weights/cost) |
| 3 skills | Deploy (103 lines), Evaluate (105 lines), Tune (101 lines) |
| 4 prompts | /deploy (graph + extraction), /test (traversal), /review (entity accuracy), /evaluate (multi-hop quality) |
Cost
π° See cost.json for full pricing breakdown with SKUs, notes, and optimization tips.
| Service | Purpose | Dev | Prod | Enterprise |
|---|---|---|---|---|
| Azure OpenAI | Entity extraction, graph-aware response generation | $60 | $400 | $1,400 |
| Cosmos DB (Gremlin) | Knowledge graph β entities + relationships | $8 | $160 | $650 |
| Azure AI Search | Vector + keyword search over document chunks | $75 | $250 | $750 |
| Container Apps | GraphRAG API, query routing, traversal | $10 | $100 | $300 |
| Azure Functions | Graph ingestion, entity extraction pipeline | $0 | $20 | $75 |
| Key Vault | Cosmos DB keys, API keys | $1 | $3 | $10 |
| App Insights | Traversal latency, retrieval quality | $0 | $25 | $100 |
| Log Analytics | Graph operations, pipeline diagnostics | $0 | $15 | $50 |
| Total | $154 | $973 | $3,335 |
π Full docs Β· π frootai.dev/solution-plays/28-knowledge-graph-ragΒ
FAI Manifest
| Field | Value |
|---|---|
| Play | 28-knowledge-graph-rag |
| Version | 1.0.0 |
| Knowledge | R2-RAG-Architecture, F1-GenAI-Foundations, O2-Agent-Coding, R3-Deterministic-AI |
| WAF Pillars | security, reliability, performance-efficiency, cost-optimization, responsible-ai |
| Groundedness | β₯ 85% |
| Safety | 0 violations max |
Last updated on