A hands-on build of Microsoft GraphRAG, run on local and cloud models through Ollama. An LLM extracts entities and relationships from the source text into a knowledge graph, Leiden community detection clusters related concepts, and each community gets an LLM-written summary report. I first indexed an Enron email sample to learn how the pipeline behaves, then a separate project over Computer Organization & Architecture course chapters, a subject I can check answers against myself. I documented every step, and every bug I fixed, in a step-by-step quickstart guide.
Built a GraphRAG index over Computer Organization & Architecture course chapters: converted the source documents to text (python-docx, pdfplumber), had an LLM extract concepts and their relationships into a knowledge graph, and stored the embeddings in LanceDB for retrieval.
Compared global search, which answers from community summary reports, with local search, which answers from entity and relationship neighborhoods. Global search handled broad cross-document questions, local search returned grounded specifics, and both cited the graph records they came from.
Checked that Leiden community detection produced a real multi-level hierarchy on a 320-email Enron sample, tracing level-0 reports up to their parent summaries; the original 3-file toy corpus had collapsed into a single flat community.
Diagnosed an Ollama Cloud “too many concurrent requests” failure during graph extraction and fixed it by tuning concurrency and async mode, then corrected wrong CLI flags in the guide after they failed against the real CLI.
Tech Stack
Other Projects