IntermediateEnglish19 lectures · 2h 8m

GraphRAG in Production

Real documents, production indexing and cost, LLM-judge evaluation, multi-source provenance, and a GraphRAG agent

Watch 3 lectures free

What you'll learn

  • Prepare real PDF and HTML documents for indexing: parsing pitfalls, cleaning, and a token diet that cuts cost
  • Run a production-size GraphRAG index and read its wall time, token usage and dollar cost
  • Evaluate a knowledge graph: structure metrics, LLM-judged extraction quality, and answer quality against a vector baseline
  • Build a multi-source graph and trace an answer back to its source document and type
  • Build a GraphRAG agent with function calling and compare it with a simple router
  • Decide, with numbers, when GraphRAG is worth its cost and when it is not

About this course

A tutorial corpus never taught anyone what production feels like. This course runs GraphRAG on real public documents — US congressional records, bills and committee reports about artificial intelligence legislation, all public domain — and answers the question that decides whether you ship it: is this graph actually any good?

Session 1 is the document work nobody demos: downloading from govinfo, parsing PDFs and HTML, headers and reprinted text, a token diet that cut our corpus by a quarter, and a cost estimate before you spend anything. Then a production index, with settings, entity types and prompt tuning, and its real wall time and bill. Session 2 evaluates it: graph-structure metrics, entity-extraction quality judged by an LLM against the source text, automatically generated evaluation questions, and answer quality for local search, global search and a plain vector baseline. Session 3 builds multi-source graphs with provenance so an answer can be traced back to the source type it came from. Session 4 puts a function-calling agent in front of the graph and compares it with a simple router.

Every number in the course comes from a run you can repeat — including the uncomfortable one: on simple factual questions the vector baseline outscored both graph retrievals at a thirtieth of the cost. That is taught as the first decision rule, not hidden.

**Licensing.** The corpus is deliberately unencumbered: Congressional Record extracts, House bills and committee reports from govinfo.gov are works of the United States Government and carry no copyright under 17 U.S.C. § 105, so you may redistribute, train on and build commercially on `data/congress/` freely. `Resources/LICENSES.md` records this and covers Microsoft GraphRAG (MIT) and the optional local Ollama models.

Curriculum5 sections · 19 lectures · 2h 8m

Section 0. Welcome

Free preview

Section 1. Real Documents and Production Indexing

Free preview

Section 2. Evaluation Pipeline

  • 🔒section 2 intro0:06
  • 🔒graph structure metrics and the meter8:36
  • 🔒llm judge question generation three answerers8:30
  • 🔒answer judging dashboard and tuning8:30

Section 3. Multi-source GraphRAG

  • 🔒section 3 intro0:06
  • 🔒three source types and existing provenance7:48
  • 🔒csv metadata indexing and source tracking8:18
  • 🔒tracing answers cross source and single vs multi8:30

Section 4. GraphRAG Agent

  • 🔒section 4 intro0:06
  • 🔒function calling and three graphrag tools7:48
  • 🔒the agent loop tool choice and multi turn8:06
  • 🔒behaviour analysis router comparison and course finale8:18

Requirements

  • · A computer with Python 3.10+ (a free Google Colab account is enough for most sessions)
  • · Comfort reading Python code; you do not need to be an expert
  • · GraphRAG basics: indexing, local and global search (our course GraphRAG Fundamentals, or equivalent)
  • · An OpenAI API key; the whole course costs a couple of dollars in gpt-4o-mini calls

Who this is for

  • · Engineers taking a GraphRAG prototype towards production
  • · Teams that must justify retrieval cost with measurements
  • · Data engineers dealing with messy PDF and HTML corpora
  • · Anyone building agents on top of a knowledge graph

Read alongside the course

    The voice-over in this course is synthesized with a text-to-speech model from scripts written and reviewed by the instructor, and the on-screen material (notebooks, code, slides) is the instructor's own work.

    GraphRAG in Production | SOTAAZ Blog