LLM engineering · Python

Graph RAG

Vector search finds passages that sound like the question; it cannot follow a relationship. This retriever keeps a knowledge graph of the 500 most-downloaded PyPI packages (what each depends on, and under which licence) beside the vector index, and a small router sends each question to the right one. Ask it something below: the router and the graph walk run in your browser, exactly as in the code.

Ask the graph

Name one or two packages and ask what they depend on, what depends on them, their dependencies' licences, or what two of them share. Anything else goes to vector search, which needs the embedding model and does not run here.

Vector search against the graph, by question kind

Recall@10 on 360 generated questions, 60 of each kind, whose answers are known from the metadata. Relationship questions are where vector search falls apart.