BACK TO SELECTED WORK
06 / AI REASONING / GRAPH / 2026OPEN SOURCE

PEP Knowledge Graph

Models Python's typing PEPs as an explicit knowledge graph, then reasons over it about new proposals.

PEP Knowledge Graph interface concept
Interface concept · illustrative demo data
13Typing PEPs
0Embeddings used
InspectableReasoning

Overview

A reasoner over Python's 13 typing PEPs. Given a new feature proposal, it surfaces related prior work, current status, and likely objections — using explicit, hand-written graph logic instead of a black-box model.

Contribution Solo Project

Problem

PEP history is scattered prose. Understanding how a new typing proposal relates to prior work usually means reading a dozen documents by hand.

Approach

  1. 01

    Model entities, relationships, and mapping logic as explicit hand-written code — fully inspectable, no embeddings or NER.

  2. 02

    Layered extraction: header parsing → concept-vocabulary matching → RST section parsing.

  3. 03

    LLMs (OpenAI/Gemini) used only as a fallback for structured objection extraction.

  4. 04

    Bidirectional CLI: regenerate the knowledge state from PEPs, or query it with a new proposal.

Outcome

  • Transparent, traceable reasoning across 13 typing PEPs.
  • Interpretability-first design with documented tradeoffs.
  • Core logic runs on the standard library alone.

Stack

PythonKnowledge GraphOpenAIGemini
NEXT CASE / 01CookMate AI