Expand description
Context building for graph-based RAG.
Extracts N-hop subgraph neighborhoods, retrieves entity connections, filters by predicate, ranks triples by relevance, truncates to a token budget, formats structured context from templates, merges multi-entity contexts, and deduplicates redundant triples.
Structsยง
- Built
Context - Built context ready for LLM consumption.
- Context
Builder - Builds LLM context from a knowledge graph by extracting relevant subgraphs.
- Context
Builder Config - Configuration for the context builder.
- Context
Triple - A single RDF-like triple used as context.
- Knowledge
Graph - A simple in-memory knowledge graph for context extraction.
- Scored
Triple - A scored triple (used during ranking).