Memory and Knowledge

Knowledge Graphs

A knowledge graph represents information as a network of entities and relationships, providing structured, queryable knowledge that complements the unstructured retrieval of vector-based retrieval-augmented generation (RAG) systems. Vector similarity search breaks down on relationship queries: ask "which services does the payments module depend on, and which of those have open security advisories?" and the retriever returns semantically similar documents rather than traversing a dependency chain — producing an answer that sounds plausible but misses half the affected services. Knowledge graphs preserve those explicit connections so agents can follow chains of relationships that no embedding can encode. The trade-off is construction cost: building an accurate graph requires structured extraction, entity resolution, and ongoing updates, which is significantly more effort than embedding documents into a vector database.