Answer from your data
Part 6 · Design6 min read

Design a hybrid system and choose where to start

Four layers of knowledge, a router that sends each question down a different path, a small-to-large stack, and starting points by scale.

You do not need a full graph on day one. The point is not to buy several databases. It is to keep raw evidence, searchable text, relationships, and synthesized knowledge separate.

Four layers

LayerHoldsAnalogy
1. Raw evidenceDocuments and data stored unchangedThe filing cabinet
2. Searchable knowledgeChunks, embeddings, keyword index, labelsThe card catalog
3. Structured knowledgeEntities, relationships, claims, events, timeA map of who is connected to whom
4. Synthesized knowledgeWiki, topic summaries, comparisons, analysesThe finished briefing

Over time this stops being a search box and becomes a way to reuse experience and the reasons behind decisions. The second project can follow the wiki and the graph instead of rereading every old file, and update only what is new. The cost is coordination: when the wiki changes, the index, graph, summaries, and cache have to change with it.

A different path for each question

QuestionSend it toWhy
What are the termination terms of this contract?Hybrid search plus parent-childYou need the clause, the exception, and the source together
What failure is common across projects?Global graph search or the wiki summary layerThe question scans the whole set
What was last quarter's revenue?SQLIt is a count or a sum
Review this report from start to finishLong contextOne document, read whole
How are company A and company B related, and what is in dispute?Graph traversal plus source searchFind the link, then confirm in the text
Research this and write a briefingAgentic explorationSeveral steps

One question often uses more than one path. The graph finds the relationship, hybrid search confirms the contract language, and SQL checks the amount.

In one sentence: keep document knowledge prepared in advance, query databases and business apps live, let the question type pick the tool, and answer with sources.

Start small, grow when the questions demand it

JobStartGrow into
Original filesObject storageVersioned storage
Labels and relationshipsPostgreSQLPostgreSQL plus an event log
Meaning searchpgvectorA dedicated vector database
Keyword searchPostgreSQL full textElasticsearch or OpenSearch
GraphRelationship tablesA graph database such as Neo4j
WikiMarkdown plus a databaseA wiki with versions and approval
ParsingA Python parserA pipeline per document type
JobsA queueEvent processing such as Kafka
EvaluationAn evaluation set and a logAutomated regression and tracing

PostgreSQL full text is a fine start and pairs with pgvector, but its ranking is not BM25. You also do not need Neo4j on day one. Relationship tables are enough while the graph is small. Move when the queries get deep. For Korean keywords, an analyzer with morphological analysis and a custom dictionary, such as Nori, is the better tool.

The methods side by side

MethodBest questionsScaleHow often data changesDifficultyCost per questionMain weakness
Long context plus cacheAlmost any, on a small setUnder a few hundred thousand tokensRarelyVery easyMany tokens, softened by cacheAccuracy fades with length; hard ceiling
Hybrid plus contextual retrieval plus rerankFacts in one placeUnboundedOften is fineMediumLow and fastGlobal and multi-hop
Graph familyGlobal summaries, multi-hop, relationshipsMedium to largeDepends on the variantHighVaries widelySimple facts; entity quality
LLM wikiSynthesis and a growing personal body of knowledgeHundreds of documents, one topicSteady additionsEasyLow to mediumScale, permissions, accumulated error
Agent plus MCPLive source systems, multi-step workUnboundedReal timeMediumSlow, token-heavyLatency; repeated exploration
Text-to-SQLTotals, numbers, periodsUnboundedReal timeMediumFastMisread schema, bad queries
Page-image searchSlides, scans, chartsMany documentsOccasionalMediumMedium, storage-heavyStorage; weak exact text match
Fine-tuningFormat, voice, judgment habitsNot a corpus-size questionNeeds retrainingTraining costFast at question timeChanging facts; no citations

Where to start, by scale

One person or a small set. A few hundred documents, around 200,000 tokens: start with long context or a wiki. Building a vector store first is usually the wrong order. An agent maintaining a Markdown wiki can cite sources without a retrieval stack. Add a stronger search layer when you outgrow the index.

A team product. Thousands to tens of thousands of documents, questions every day: the improved search stack is the default. Structure-aware chunks, contextual retrieval, hybrid search, reranking, forced citations. Attach the evaluation set and a way to collect failed questions from the start. Add a graph only after you measure that relationship questions are actually common.

Large or regulated. Law, medicine, finance, and policy need the improved search stack plus structured-data tools, permission filters, and an audit trail. Open the agent path only for hard questions, and check citations on every answer.

Five questions set the order.

  1. Does the whole corpus fit in context and rarely change? Start with long context.
  2. Are most questions a fact inside one document? Use the improved search stack.
  3. Are relationships, multi-hop chains, or global summaries the actual value? Look at a graph or a linked wiki.
  4. Is this a person's growing notes, or an organization's official record? Wiki for the first, search plus governance for the second.
  5. Is the problem the model's behavior rather than the knowledge? Start with fine-tuning or instruction design.

The LaRA study at ICML 2025 points the same way. Whether retrieval or long context wins depends on the model, document length, retrieval setup, and question type. Neither side always wins.