Knowledge Base
Description
Section titled “Description”A knowledge base is any structured or semi-structured information surface an agent can query to support reasoning, planning, and execution.
A knowledge base is not one storage type. It is a retrieval-reasoning system that can range from markdown repositories to vector and graph-backed systems.
Core Framing
Section titled “Core Framing”Knowledge base behavior sits on a continuum:
- Focused retrieval for specific lookups
- Exhaustive reasoning for cross-corpus synthesis
- Hybrid routing that selects the right path per query
This reflects the RAG + RLM architecture model: retrieval and reasoning are complementary, not competing.
Read more in knowledge-base/index
Codebase Knowledge: Agentic Search vs RAG
Section titled “Codebase Knowledge: Agentic Search vs RAG”The retrieval-reasoning spectrum above is about general corpora. Code is a special case, and the field has converged on a counter-intuitive default for it: agentic search (grep / glob / read on the live filesystem) beats embedding-based RAG for most coding tasks. Claude Code dropped its vector database for exactly this reason.
Why exact-symbol agentic search wins for code:
- Freshness. An index is wrong the moment a file changes; grep reads current state. Decisive during active development.
- Precision. Code symbols are exact a function name is present or it is not. Fuzzy vector matches inject “conceptually adjacent but textually unrelated” noise that rarely helps.
- Security. No index means no extra attack surface; code embeddings can leak source via inversion attacks (see Security).
- Simplicity. No vector DB, no sync pipeline, no staleness to manage.
Where a semantic or graph layer still earns its place added narrowly, not as the default:
- Renamed symbols intent survives renames that break grep.
- Unfamiliar codebases you cannot grep for a name you do not yet know; semantic search helps onboarding.
- Structural queries “who calls X”, “where is this used”, cross-file data flow answered by a code knowledge graph (containment, call, import, inheritance, and data-flow edges keyed by qualified name), not by chunk retrieval.
A cheaper middle path is the repo map (Aider’s approach): a tree-sitter symbol graph ranked by PageRank and fitted to a token budget deterministic, fresh, and far cheaper than embedding search for selecting what an agent sees. See Agent-Computer Interface for the repo map, and Context Engines for the tooling layer (GitNexus for code graphs, Graphiti for temporal interaction memory).
Default posture for Ikidna: agentic grep/glob/read for precision and freshness with zero infrastructure; add a graph/semantic layer specifically for rename-resilience, onboarding, and structural queries. Do not pre-index by default the Adoption Sequence (retrieval first, route, then exhaustive reasoning) applies here too.
Related Concepts
Section titled “Related Concepts”- Context - Context density and discoverability constrain answer quality.
- Smart Routing - Routing logic extends beyond model selection to retrieval strategy selection.
- Execution Ledger - Routing decisions and outcomes should be logged for audit and optimization.