Vai al contenuto

root / tags / rag

#RAG

6 fiches

Qualità e Sicurezza Traduzione verificata automaticamente

Comparing Context Retrieval Approaches for AI Code Review

Empirical study by the **Compare the Market** engineering team (Meerkat Careers, UK) evaluating four approaches to **context retrieval for AI code review**: Baseline (no additional context), **RAG** (vector search), **GKG** (GitLab Knowledge Graph, AST-based knowledge graph), and **GKG+RAG** (hybrid). Evaluation on **79 real merge requests** with **MLflow on Databricks**. Striking result: **RAG performs worse than the baseline** on almost every metric — vector noise is counterproductive for code review. **GKG outperforms RAG by +21%** in inline comments coverage (0.696 vs 0.577) through structural AST understanding (Tree-sitter + Kuzu graph database). Code requires **structural** understanding (callers, signatures, hierarchies), not mere semantic similarity. GKG costs 4× the baseline but delivers measurable improvements; RAG costs 3× with no improvement. Implemented as a **Docker sidecar** in CI/CD wrapping the GKG binary (still in GitLab beta) with a local MCP server.

#Compare the Market#Meerkat Careers#AI code review

Équipe Engineering Compare the Market (Meerkat Careers, UK — site de comparaison d'assurances et services financiers).