What hybrid search does that pure vector RAG does not
Pure vector RAG finds similar chunks. Hybrid search adds exact-match precision for names and identifiers, on a connected knowledge graph.
By Trellis

Pure vector RAG is good at “find me something like this sentence.” Coding agents need something harder: find the exact symbol, ticket, or error string, then walk the edges to the PR, the table, and the decision that still owns the side effect. Semantic-only retrieval answers the first half of that sentence. Hybrid search — and a graph behind it — is how the second half stops being a guess.
What pure vector RAG is good at — and where it stops
Embed the corpus, embed the question, return nearest chunks. That pattern is strong when users rephrase: “make the database faster” can still surface writing about query latency even when the words never match. For conceptual Q&A over long prose, pure dense retrieval is often enough.

It breaks in three places agents hit every day.
Exact terms. Industry hybrid-search writeups use the classic miss: a query for “PostgreSQL performance” can rank below a document titled “Optimizing Postgres queries” when the embedding space softens proper nouns and product spellings. The same failure mode hits codebases: AuthMiddlewareV2, INV-1842, ECONNRESET, and commit SHAs are not synonyms of nearby English. Dense retrieval optimizes for meaning; agents also need literal hits.
Multi-hop joins. Vector RAG returns a list of similar snippets. It does not, by itself, answer “which open tickets touch modules that import this broken util?” That answer lives in relationships — imports, PR file lists, work items — not cosine distance between paragraphs. A codebase knowledge graph is the structure for those joins; a bag of embeddings is not.
Confident wrong neighbors. Similarity is not provenance. Two handlers can embed close because they share boilerplate while the one that owns production traffic sits further away. Without typed edges and citations back to nodes, the model fills gaps with plausible structure.
Pure vector RAG is a strong recall of similar text. Agent memory needs recall of the right entities and the paths between them.

Keyword is not a step backward
Teams sometimes treat keyword search as the old world they left for embeddings. For technical work, sparse matching is the precision layer dense search does not reliably replace.
Keyword (and BM25-style ranking) excels when the query already knows the noun: error codes, package names, table names, ticket IDs, “exactly this ADR title.” Hybrid search systems run a sparse path and a dense path in parallel, then fuse the rankings so neither failure mode dominates. Published industry comparisons of hybrid vs vector-only vs keyword-only on production indexes often show hybrid winning on average relevance — the magnitude varies by corpus, but the pattern is stable: mixed query types want mixed retrieval.
You do not choose keyword instead of semantic. You refuse to ship an agent that can only do one.
Hybrid over prose and code, not docs alone
Most hybrid-RAG explainers stop at document corpora: manuals, tickets-as-text, wiki pages. Coding agents live in a messier dual world: prose (READMEs, ADRs, runbooks, PDFs) and code (symbols, imports, tests, SQL).
Trellis’s shipped hybrid-search surface is explicit about that dual world: search by meaning over prose and code, plus search of code by name. That is not “search the wiki better.” It is one retrieval posture across the artifacts an agent must open in the same session — the failing test file and the incident note that named the flag.
Prose can still be chunked, embedded, and cited. Code still needs exact tokens. Hybrid is how both stay first-class without forcing the team to maintain two products that never agree.

Graph + summaries: hybrid is not just two indexes
Running BM25 beside vectors is necessary and not sufficient for agent memory. Two indexes over the same files still answer “which chunks look like this?” They do not answer “how are these things connected?”
A useful stack for coding agents combines three marketed pieces:
- Hybrid search — search by meaning over prose and code, plus search of code by name (surface: hybrid-search).
- A queryable graph — code, docs, decisions, PRs, and work items as memory the agent can expand (surface: agent-memory).
- LLM summaries written from the graph — code symbols summarized; tours through the call graph; decisions linked to their reasons — so retrieval is both connected and semantic, not a raw edge dump or an embedding pile (surface: llm-summaries).
Trellis’s public product framing is not “a pile of embeddings.” It is a connected graph, with model-written summaries on its code and decisions, stored as a graph database and a vector store that can stay on your machine (marketed with Neo4j and Qdrant on the local path), so agents get neighborhood structure and similarity. Typed entities and typed edges are the deposit shape: everything becomes typed nodes from connectors and files with relationships you can cite, not only snippets you can rank.
That is closer to vector-first then graph-expansion patterns (semantic entry, multi-hop relationships) plus the exact-name precision pure graph-only essays often skip. The point for a dev team is practical: seed with whatever the human typed (a name or natural language), search by name and by meaning, then expand along typed edges to the summarized code and decisions they reach instead of re-deriving the map from raw files every turn.

When semantic-only is enough (and when it is not)
Use pure vector-style retrieval when:
- The ask is conceptual and paraphrase-heavy (“how do we think about retries?”).
- The corpus is mostly narrative and identifiers are rare.
- A wrong-but-related chunk is cheap to discard and you are not editing production code from the answer.
Prefer hybrid search on a graph-backed memory when:
- The ask contains exact nouns an agent must not “almost” match.
- The answer needs citations to specific files, tickets, or decisions.
- The work is multi-hop: change → PR → table → owner → open incident.
- You care that next session starts from durable structure, not a new similarity lottery — and that memory stays honest without continuous ingest when the tree moves.
If your agent keeps inventing the right kind of answer while missing the right instance, you do not need a larger context window. You need keyword precision and edges.
Pick one painful question
Pure vector RAG finds similar text. Search by meaning over prose and code, plus search of code by name, on top of a connected knowledge graph, is what lets agents hit exact identifiers and still walk the map. Ranking internals and NDCG bake-offs against cloud search vendors are a different conversation. The console remains account ops — not a full graph explorer UI for clicking every node.
If you are choosing an agent memory stack, pick one painful question that already mixes an identifier and a join — “what still calls the old webhook after INV-1842?” — and see whether your current RAG returns a hop path with citations, or only a stack of almost-right paragraphs.
Want this for your team?
Trellis builds local-first knowledge graphs for coding agents, and the Free plan runs on your own machine.