Knowledge Graph
The knowledge graph connects entities with directional edges so you can traverse related context instead of only reading raw text.
What this page covers
Section titled “What this page covers”This page covers edge types, how links are created, and how graph traversal is used in retrieval and entity inspection.
Core workflow
Section titled “Core workflow”- Create manual links with relation labels:
pgm link <source-id> <target-id> --relation involves- Expand a node’s neighborhood to see neighbors and relationship direction:
pgm expand <entity-id> --depth 2- Delete outdated or incorrect edges when needed:
pgm unlink <edge-id>- Use the same pattern through API endpoints:
POST /api/edgesDELETE /api/edges/:idGET /api/entities/:id/graph
- Default relation examples include
involves,assigned_to,part_of,blocked_by,mentioned_in, andrelated_to. - Manual edges are typically high-confidence (
confidence = 1.0); extracted edges carry model-derived confidence. - Duplicate edges are prevented by source/target/relation constraints.