Larson compares regular RAG with GraphRAG on a small, previously unseen game codebase of about 200 lines across seven files. Regular RAG gives a generic description, while GraphRAG identifies the player, moving obstacles, background, and keyboard controls. He also shows GraphRAG translating the Python game into Rust that runs, while a direct LLM translation fails to compile.
GraphRAG methods to create optimized LLM context windows for Retrieval
Speaker
Jonathan Larson, who leads the Graph team at Microsoft Research, presents at AI Engineer on using GraphRAG to give LLMs structured context for code understanding, evaluation, and agent tasks.
Larson applies the approach to the 100,000-line Doom codebase, spread across 231 files. GraphRAG generates documentation at both repository and module level, and supports questions about the code. In a demonstration, GitHub Copilot coding agent uses GraphRAG for Code to plan and implement a player jump feature across multiple files, which Larson says worked out of the box.
Larson announces Benchmark QED as open source, with three components: AutoQ generates questions for a dataset, AutoE uses an LLM judge to evaluate results, and AutoD summarizes and samples datasets. AutoQ covers local and global questions, as well as data-driven and persona or activity-driven questions. AutoE reports a composite score using comprehensiveness, diversity, empowerment, and relevance.
On the reported benchmarks, LazyGraphRAG beats vector RAG 92%, 90%, and 91% of the time on data-local questions against 8K, 120K, and one-million-token context windows, respectively. Larson says the longer context window made little difference, and LazyGraphRAG cost one-tenth as much as the million-token configuration in their test. He says LazyGraphRAG is being incorporated into Azure Local and Microsoft Discovery.
Takeaways
- Use repository structure to help agents plan changes that span multiple files.
- Test code assistants on unfamiliar projects; model familiarity with a codebase may not include its specifics.
- Evaluate retrieval across local and global questions, including questions grounded in activities or personas.
- Compare retrieval quality and cost across context window sizes instead of assuming a longer window helps.
- Use structured LLM memory as a foundation for applications that need broad codebase understanding.
Mentioned in this talk
Search inside this talk
What was claimed 12
- works atJonathan Larson works at
Microsoft ResearchSenior Principal Data Architect, Special Projects; leads the GraphRAG team“I run the Graph team at Microsoft Research.”
YouTube Verified2 sources· Talk, Web· archived
- built
Microsoft Research built GraphRAG“our Graphite paper ... inspired many other offerings.”
YouTube Verified2 sources· Talk, Web· archived
- featureGraphRAG: Supports local and global queries over repositories
“It requires understanding the whole repository to answer correctly.”
YouTube Unverified1 source· Talk
- featureGraphRAG: Helps translate a Python game codebase into working Rust files
“we had a full video game translated from Python and working natively in Rust.”
YouTube Unverified1 source· Talk
- featurecoding agents: Created a holistic plan and implemented Doom jumping across multiple files
“It changed a lot of files and worked out of the box.”
YouTube Unverified1 source· Talk
- uses
QED benchmark uses GitHub
open source“The QED benchmark is available now as open source on GitHub.”
YouTube Unverified1 source· Talk
- feature
QED benchmark: Includes AutoQ for query generation, AutoE for evaluation, and AutoD for dataset summarization and sampling“There are three components to this.”
YouTube Unverified1 source· Talk
- metricLazyGraphRAG: Won 92% of data-local comparisons against 8K context, 90% against 120K, and 91% against one-million-token context
“It wins 92%, 90%, and 91% of the time.”
YouTube Unverified1 source· Talk










