Skip to content

Add Real-World Project: Turn a Folder of PDFs, Configs, and SQL Schemas Into a Queryable Knowledge Graph #278

Description

@abderrahim-lectures

Scope

  • Lesson: docs/projects/folder-knowledge-graph/index.md — a no-LLM, no-API-key knowledge-graph walkthrough (config parsing with tomllib/configparser, SQL schema extraction with regexes, PDF text extraction with pypdf, two-pass graph building with networkx, pyvis visualization, graph queries), following the codebase-knowledge-graph house template.
  • Example: examples/folder-knowledge-graph/build_graph.py CLI, make_pdf_data.py (deterministic pure-Python PDF writer), committed sample folder data/sample/ (3 SQL schemas, 3 config files, 3 tiny hand-crafted PDFs), notebook.ipynb (self-contained, ~12 cells, sample files written inline), pyproject.toml + uv.lock (pypdf, networkx, pyvis), .gitignore, .python-version.
  • Registration: src/data/projects.ts, docs/projects/index.mdx, src/pages/index.tsx — inserted as the first entry/card in each.
  • Badges/notebook: Colab/Kaggle/Binder badges + opencode blurb in the lesson, pointing at the example's self-contained notebook.

Framing note

Heterogeneous folders are a knowledge-graph problem, not a search problem — the structure is hidden in references you can extract deterministically with the standard library plus pypdf, and a graph query answers questions a keyword search cannot (indirect relationships like "which configs reference table users?"). Honest framing: this uses hand-written extraction rules, so the graph is only as good as its rules; an LLM doing the relation extraction is left as an optional next step, not built.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:capstoneCapstone project content, examples, or architectureprojectBacklog: a candidate Real-World Project ideatopic:ragRAG, vector search & knowledge graph projectstype:content

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions