Knowledge Representation for Agent Context

Knowledge Representation for Agent Context: LSE, Knowledge Graphs, Concept Maps, and Document Compression for Large-Scale Context Management

2026-03-03 · agentic-ai memory-context rag-retrieval knowledge-graphs knowledge-management · medium · source → · wiki →
key claims
  1. LSA is superseded by dense embeddings for agent context retrieval. Dense embeddings (SBERT, MiniLM, Model2Vec) consistently outperform LSA on MTEB benchmarks for semantic search, clustering, and retrieval. LSA discards word order, sentence structure, and contextual disambiguation. LSA has residual value for topic modelling and interpretability but should not be a primary retrieval mechanism in new systems. Confidence: high
  2. GraphRAG (Microsoft, Edge et al. 2024, arXiv:2404.16130) solves the global-query problem via Leiden community detection and LLM community summaries. Standard RAG cannot answer corpus-level sensemaking queries. GraphRAG's entity graph + community summaries + map-reduce significantly outperforms standard RAG on comprehensiveness and diversity for global queries. Critical limitation: batch-rebuild-only updates make it unsuitable for frequently updated corpora. Confidence: high
  3. LightRAG (arXiv:2410.05779, EMNLP 2025) is the practical successor to GraphRAG for dynamic corpora. LightRAG supports incremental updates (no full rebuild), dual-level retrieval (coarse global + fine entity-level), and achieves 10–100× lower token costs while matching or exceeding GraphRAG accuracy. For a growing research corpus, LightRAG is preferred. Confidence: high
  4. HippoRAG's PPR-based retrieval achieves up to 20% improvement on multi-hop QA benchmarks at 10–30× lower cost than iterative retrievers. Personalised PageRank traversal from query-matched seed nodes surfaces cross-document associative chains without expensive iterative query cycles. Best approach for queries that require linking concepts across multiple research items. Confidence: high (NeurIPS 2024)
  5. RAPTOR's recursive abstractive hierarchy achieves +20 percentage points on multi-step reading comprehension (QuALITY benchmark, ICLR 2024). Recursive clustering and abstractive summarisation creates a multi-resolution retrieval tree. The "collapsed tree" query selects nodes from any level within the token budget. The research corpus already has structured Executive Summaries at Layer 2; only Layer 3–4 generation is needed. Confidence: high
  6. Concept maps do not constitute a separate agent-accessible knowledge layer. Concept maps (Novak & Gowin 1984) are not natively machine-readable at the precision required for automated agent retrieval. A knowledge graph with typed, labelled edges subsumes all navigability value while adding queryability. Concept maps are a valid *rendered view* of a knowledge graph, not an independent architecture layer. Confidence: high
  7. A five-layer knowledge architecture provides principled agent context management. Layer 0 = raw documents (archival); Layer 1 = extractive summaries (~20% length, key sentences); Layer 2 = abstractive document summaries (3–5 sentences); Layer 3 = knowledge graph nodes and community summaries; Layer 4 = domain schema/ontology. Pull-based injection selects the appropriate layer based on task intent. Maps directly onto the Letta memory framework. Confidence: high
  8. RRF is the established standard for combining retrieval signals. RRF(d) = Σ 1/(k + rank_i(d)) with k=60 combines cosine similarity, BM25, graph centrality (PPR), and recency without score calibration. Natively implemented in Azure AI Search, Milvus, Elasticsearch, OpenSearch, MongoDB Atlas, Qdrant. The same mechanism underpins the hybrid BM25+Model2Vec+sqlite-vec pattern from the context-mode research item. Confidence: high

Research Question

What techniques — latent semantic extraction, knowledge graphs, concept maps, hierarchical document compression, and layered abstraction — most effectively represent and compress large knowledge corpora (thousands of files) for retrieval-augmented agent systems operating under context-window constraints, and how should these techniques be combined so that agents can retrieve the right knowledge at the right level of abstraction for a given intent?

Findings

Executive Summary

For agent-accessible large knowledge corpora (100–10,000 documents), the most effective knowledge representation architecture combines four complementary techniques in a layered stack: dense embeddings + hybrid BM25 retrieval for document-level semantic search; a knowledge graph (LightRAG pattern for dynamic corpora) for multi-hop relationship queries; RAPTOR-style hierarchical abstractive summaries for cross-document query integration; and RRF for fusing heterogeneous retrieval signals. LSA/LSE is superseded by dense embeddings and should not be the primary retrieval mechanism in new systems. Concept maps are subsumed by knowledge graphs for machine-facing use — they add value only as human-facing views rendered from the graph. A five-layer knowledge architecture (raw → extractive → abstractive → graph nodes → domain schema) maps onto the Letta context-engineering framework and enables pull-based injection at the appropriate depth for each agent intent type. For this research corpus, RAPTOR-style hierarchical summarisation has the highest immediate value, with knowledge graph construction justified at ~200+ completed items.

Key Findings

  1. LSA is superseded by dense embeddings for agent context retrieval. Dense embeddings (SBERT, MiniLM, Model2Vec) consistently outperform LSA on MTEB benchmarks for semantic search, clustering, and retrieval. LSA discards word order, sentence structure, and contextual disambiguation. LSA has residual value for topic modelling and interpretability but should not be a primary retrieval mechanism in new systems. Confidence: high.

  2. GraphRAG (Microsoft, Edge et al. 2024, arXiv:2404.16130) solves the global-query problem via Leiden community detection and LLM community summaries. Standard RAG cannot answer corpus-level sensemaking queries. GraphRAG's entity graph + community summaries + map-reduce significantly outperforms standard RAG on comprehensiveness and diversity for global queries. Critical limitation: batch-rebuild-only updates make it unsuitable for frequently updated corpora. Confidence: high.

  3. LightRAG (arXiv:2410.05779, EMNLP 2025) is the practical successor to GraphRAG for dynamic corpora. LightRAG supports incremental updates (no full rebuild), dual-level retrieval (coarse global + fine entity-level), and achieves 10–100× lower token costs while matching or exceeding GraphRAG accuracy. For a growing research corpus, LightRAG is preferred. Confidence: high.

  4. HippoRAG's PPR-based retrieval achieves up to 20% improvement on multi-hop QA benchmarks at 10–30× lower cost than iterative retrievers. Personalised PageRank traversal from query-matched seed nodes surfaces cross-document associative chains without expensive iterative query cycles. Best approach for queries that require linking concepts across multiple research items. Confidence: high (NeurIPS 2024).

  5. RAPTOR's recursive abstractive hierarchy achieves +20 percentage points on multi-step reading comprehension (QuALITY benchmark, ICLR 2024). Recursive clustering and abstractive summarisation creates a multi-resolution retrieval tree. The "collapsed tree" query selects nodes from any level within the token budget. The research corpus already has structured Executive Summaries at Layer 2; only Layer 3–4 generation is needed. Confidence: high.

  6. Concept maps do not constitute a separate agent-accessible knowledge layer. Concept maps (Novak & Gowin 1984) are not natively machine-readable at the precision required for automated agent retrieval. A knowledge graph with typed, labelled edges subsumes all navigability value while adding queryability. Concept maps are a valid rendered view of a knowledge graph, not an independent architecture layer. Confidence: high.

  7. A five-layer knowledge architecture provides principled agent context management. Layer 0 = raw documents (archival); Layer 1 = extractive summaries (~20% length, key sentences); Layer 2 = abstractive document summaries (3–5 sentences); Layer 3 = knowledge graph nodes and community summaries; Layer 4 = domain schema/ontology. Pull-based injection selects the appropriate layer based on task intent. Maps directly onto the Letta memory framework. Confidence: high.

  8. RRF is the established standard for combining retrieval signals. RRF(d) = Σ 1/(k + rank_i(d)) with k=60 combines cosine similarity, BM25, graph centrality (PPR), and recency without score calibration. Natively implemented in Azure AI Search, Milvus, Elasticsearch, OpenSearch, MongoDB Atlas, Qdrant. The same mechanism underpins the hybrid BM25+Model2Vec+sqlite-vec pattern from the context-mode research item. Confidence: high.

  9. KG construction cost at this corpus's scale is economically negligible. 500 items × ~3,000 tokens/item = 1.5M tokens for one-time extraction; incremental updates <3,000 tokens/day. Total cost <$1 at current API prices. The dominant cost is engineering implementation, not API usage. Confidence: medium (cost estimate based on LightRAG token benchmarks; actual cost depends on model choice).

  10. RAPTOR implementation on the research corpus requires minimal additional work. Each completed item already has Executive Summary (Layer 2), Key Findings (Layer 1), and full text (Layer 0). Only cluster-level summaries (Layer 3) across related items and a corpus-level summary (Layer 4) need to be generated. This is a 2–3 hour implementation task using LangChain's RAPTOR integration or a custom clustering script. Confidence: high.

  11. Knowledge rot is an active risk requiring lifecycle management. Without review policies, the knowledge graph will accumulate stale entries as AI/ML knowledge evolves. Research items in fast-moving sub-domains (LLM architectures, agent memory) should be flagged for review at 12–18 months. The added and completed date fields in each item serve as lightweight TTL markers. Confidence: medium.

  12. The convergent architecture (embeddings + knowledge graph + graph-traversal reasoning) is the highest-quality long-term path. Dense embeddings index into the knowledge graph; the graph provides relational structure; PPR or GoT traversal provides the reasoning scaffold for multi-hop queries. Demonstrated in HippoRAG (NeurIPS 2024) and KGoT (ETH Zurich 2024). Practical stack: Model2Vec (sqlite-vec) + LightRAG (NetworkX) + PPR for multi-hop queries. Confidence: high.

Assumptions

Analysis

The evidence supports a staged adoption path that avoids over-engineering at current corpus scale while positioning for the full convergent architecture as the corpus grows.

Stage 1 (now, <100 items): BM25 + dense embedding hybrid search (per semantic-full-text-search.md). Add RAPTOR Layer 3–4 generation as a near-zero-cost enhancement that unlocks multi-item query capability immediately, given that Layers 0–2 already exist in every completed item.

Stage 2 (~150–200 items): Build a LightRAG knowledge graph. This is the threshold where cross-item relationship queries justify graph construction overhead. LightRAG's incremental merge model is operationally sustainable for a daily-updated corpus.

Stage 3 (~500+ items): Add community detection and community summaries (GraphRAG pattern within LightRAG). Global sensemaking queries ("what does the corpus say about X?") become the dominant query type at this scale.

The choice of LSA/LSE is resolved definitively: it adds no value over dense embeddings for this corpus and should not be implemented. The choice of concept maps is resolved: they are not a separate implementation concern; any concept-map-like view is a rendered artefact of the knowledge graph.

The four-signal RRF (cosine + BM25 + PPR + recency) is the recommended ranking combination. LLM cross-encoder reranking is optional and should be added only if retrieval quality falls short after the four-signal RRF is deployed.

Risks, Gaps, and Uncertainties

Open Questions

  1. KG construction pipeline: What entities and relationships should be extracted from research items, and what graph schema is optimal? (Candidate backlog item: knowledge-graph-construction-pipeline)
  2. RAPTOR offline vs. on-demand: Should cluster summaries be generated in a CI/CD step (offline) or cached on first query (on-demand)? Offline is more token-efficient; on-demand avoids stale cache management.
  3. Existing item structure as RAPTOR input: Can the Executive Summary fields be used directly as Layer 2 leaf nodes in the RAPTOR tree, or does RAPTOR's clustering require raw text re-chunking?
  4. Staleness threshold: What is the right review trigger (12 months? 18 months?) and does it vary by tag (e.g., llm, agents = 12 months; philosophy, neuroscience = 24 months)?
  5. Backlog dependency edges in the graph: Should research item blocks/is-blocked-by relationships from YAML front matter be first-class edges in the knowledge graph?

sources


Connected items

Loading…

View full knowledge graph →