Architecture & Pipeline
Graph-RAG Engine Architecture
CodeAtlas bridges static AST analysis, SQLite metadata caching, and Neo4j graph traversal to deliver context to AI Agents.
System Pipeline
User Question
β
βΌ
AI Agent (Cursor / Antigravity / Claude)
β (MCP stdio)
βΌ
CodeAtlas MCP Server
β
βββΊ Query Normalizer (Strips stop words, extracts tokens)
β
βββΊ Candidate Search Engine (Stage 1 lookup)
β
βββΊ Neo4j Graph Expansion (Depth 1-3 traversal)
β
βββΊ 6-Factor Reranker (Computes graph proximity & layer score)
β
βββΊ Context Compiler (Packages line ranges & evidence)
β
βΌ
Grounded AI Answer
6-Factor Reranking Formula
Every candidate symbol and node is scored dynamically using 6 parameters:
final_score = semantic_score
+ lexical_score
+ symbol_score
+ graph_proximity
+ entry_point_score
+ relationship_score
Architectural Layer Derivation
CodeAtlas precomputes architectural layers during AST extraction:
ROUTE
HTTP endpoints (e.g.
POST /upload, GET /api/users).CONTROLLER
Request handler functions mapping HTTP routes to business logic.
SERVICE
Core domain logic, media processors, and transcoding services.
REPOSITORY
Data access objects, database queries, and storage adapters.