← All drillsBuild a Codebase Knowledge Graph
What you'll be able to do- ✓Parse a Python repo into a navigable call/import graph using only the stdlib ast module
- ✓Resolve calls honestly — same-class and unique-name heuristics, everything else reported as ambiguous or external, never guessed
- ✓Build bounded-depth graph traversal (callers, callees, related-within-N-hops) — the retrieval unit a coding agent actually wants
- ✓Combine graph proximity with embedding similarity into one retriever, and prove with a benchmark that combining actually helps — or doesn't
- ✓Swap a deterministic hashing-trick embedder for a real local embedding model and see what changes
- ✓Package the habit as a reusable Claude Code skill
Give a coding agent the repo context it needs before it edits code it didn't write — who calls this, what does it depend on, is this actually reachable — the layer underneath any disciplined plan.
⌁ The code-intelligence layer behind Sourcegraph, GitHub code search, and the repo-level retrieval every serious coding agent needs before it can safely edit an unfamiliar codebase.
Start this internshipCreate an account to unlock the 9 sections, the workbench, and AskThili.
BeginSections
1. Build a Codebase Knowledge Graph
🔒 locked2. Lesson 1 - Facts Before a Graph Exists
🔒 locked3. Lesson 2 - Resolving Calls, Honestly
🔒 locked4. Lesson 3 - Traversal
🔒 locked5. Lesson 4 - Embeddings, Deterministic First
🔒 locked6. Lesson 5 - Combining Graph and Text
🔒 locked7. Lesson 6 - Measuring Retrieval Quality
🔒 locked8. Lesson 7 - A Real Embedding Model
🔒 locked9. Lesson 8 - Packaging It as a Skill
🔒 lockedDig deeper
🔗thilicodegraph — the reference implementation you build in this course
code📄Learning to Represent Programs with Graphs (Allamanis et al., 2017)
paper📄Repository-Level Prompt Generation for Large Language Models of Code (Shrivastava et al., 2023)
paper🔗Ollama — run open LLMs locally
docs