Skip to content
Ask for a Budget
EngineeringAugust 31, 20267 min read

You probably don't need a vector database

On 638 real questions, keyword search put the right document in the top 10 for 96.2% of article questions. Where it wins, where it loses, how to decide.

You probably don't need a vector database
Índice do artigo
faltam 7 min de leitura

In a test with 638 real questions, keyword search put the correct document in the top 10 for 96.2% of the questions whose target was an article. No embeddings, no vector database and no per-query cost.

Ask any introductory guide to RAG where to start and the answer will be the same: generate embeddings of your documents and store them in a vector database. That became step one through repetition, not through evidence about your case.

So we measured it. We built an index over 374 documents using keyword search, the kind that has existed for decades, and evaluated it with questions written by real people. The result does not say embeddings are useless. It says the order in which the industry recommends building the system is a bad one for those who are just starting.

Article summary

  • In an institutional corpus of a few hundred documents, keyword search delivers results good enough to validate the whole project, at zero cost per query.
  • Performance depends on the type of target: 96.2% when the correct document has body text, 67.8% when the target is a short FAQ entry.
  • The real weakness of keyword search is synonyms and paraphrase, and it is predictable: you can know in advance whether your case suffers from it.
  • Start simple, not to save money, but because without a baseline you cannot prove the vector database improved anything.

The short answer

If your knowledge base has a few hundred documents, if the people asking use more or less the same vocabulary as the documents, and if everything is in the same language, keyword search will probably do the job, and do it fast enough for you to find out whether the project is viable before spending money.

If your case is the opposite, and especially if the vocabulary of the people asking is systematically different from the vocabulary of whoever wrote the documents, then a vector database solves a problem you really have.

The mistake is not using embeddings. It is adopting them at step one, without a baseline, and never knowing exactly what they improved.

What a vector database does, without jargon

Keyword search finds documents that contain the words in the question, giving more weight to rare words. If you search for "warranty period", it finds texts with those words and ignores a text that says the same thing with other words.

Vector search works by closeness of meaning. Each chunk and each question becomes a list of numbers that represents its meaning, and the system looks for the chunks whose numbers are closest to the question's. That is why it relates "warranty period" to "coverage term" even without a word in common.

Isometric illustration comparing a search that matches identical words and another that brings similar ideas together

Put that way, the second seems obviously better, and that is usually where the decision gets made. The missing question is a different one: how often, in your knowledge base, is the right answer written in words different from the ones the user uses?

In corporate documentation the answer is usually "less often than you imagine", because the people asking normally learned the vocabulary inside the company itself.

The cost of that extra capability is not just the service. Embeddings add a paid step at indexing time and another on every query, and they create a second representation of the data that has to stay in sync with the text. An index out of sync with the text is one of the nastiest sources of bugs in a RAG system, because the system answers confidently using a version that no longer exists.

The test: 638 questions, zero embeddings

We built the index over X-Apps' public content, which is institutional content in Portuguese: articles, service pages, case studies and FAQs. The evaluation used questions written by the content team, each with a known source document, and the test removes the text of the questions themselves from the index to simulate a new, unseen question.

Target is an article with body text96.2%
Target is a short FAQ entry67.8%
Overall average across 638 questions74.9%
How often the correct document appeared among the top ten results, by type of target document.

The difference between the first two bars is the most useful information in the chart, and it is not about the algorithm. When the correct document has body text, there is plenty of material to match the question and the hit rate is high. When the target is a short FAQ entry and the test removed exactly that text, little is left to find.

In other words: much of what looks like a limitation of search is actually a shortage of text in the target document. Changing the search method does not create content.

Where keyword search wins

It wins on three fronts that are often underestimated at decision time.

Isometric illustration of a tiny filing cabinet and a huge data center producing exactly the same flow

The first is operational. The entire index of our 2,563 chunks takes up 2.15 MB and is built in 0.4 seconds. It fits in the deploy package, needs no database and needs no synchronization.

More importantly: it cannot fall out of sync with the published text, because both are generated in the same process. That eliminates an entire class of bug, the one where the system answers confidently citing a version that no longer exists.

The second is the exact term, and this is a real and frequently ignored advantage. Product codes, regulation numbers, field names, internal acronyms and contract references need to match literally. Search by meaning is precisely the one that can bring two similar but different codes together, which in a technical knowledge base is worse than not finding anything.

The third is diagnosis. When keyword search gets it wrong, you can see why: the words are there, or they are not. When proximity search gets it wrong, the explanation is a distance between lists of numbers, and improving that is trial and error.

Where it really loses

There are cases where keyword search is the wrong tool, and the useful part is that they can be identified before any testing. There are three, and none of them requires measurement to recognize.

Isometric illustration of three differently shaped tags hanging from the same object

The clearest case is divergent vocabulary. If the customer writes "ticket", the agent writes "service request" and the regulation writes "incident", keyword search treats all three as different subjects.

This is common when an external audience consults documentation written by engineering, or when the company went through a merger and has two vocabularies living side by side in the same knowledge base.

The second is multilingual. Asking in Portuguese and having the answer written in English is exactly the problem search by meaning solves and keyword search does not solve at all.

The third is the short, context-dependent question. In our collection, 87 of 730 questions carried no distinctive term from the document that should answer them. These are questions like "and what about the annual plan?", crystal clear to someone reading the page and impossible to place as a standalone query. Embeddings help a little here, but the main fix is something else: rewriting the question with the conversation context before searching.

Why the standard recommendation is the opposite

It is worth understanding where it comes from, because that explains the mismatch without having to attribute bad intent to anyone.

The example that popularized the pattern is semantic search over large, heterogeneous collections, where the vocabulary of the people asking really has nothing to do with that of the people who wrote the content. In that format, embeddings are the piece that makes the system exist, and the correct tutorial starts with them.

The typical corporate case has a different shape: fewer documents, a single domain, shared vocabulary and a content problem bigger than the search problem. The tutorial was copied; the shape of the problem was not.

What each path really costs

CriterionKeyword searchVector searchHybrid
Cost per queryOne paid call per questionOne paid call per question
Indexing costPaid call per chunk, repeated with every changeSame as vector
InfrastructureDatabase or external service, with synchronizationBoth paths, plus the combination
Exact terms and codesWeak, brings similar codes togetherStrong
Synonyms and paraphraseStrongStrong
MultilingualSolves itSolves it
Error diagnosisOpaque, requires trial and errorIntermediate

The highlighted column is the recommended starting point, not the best option in every scenario. The two weakness rows in the first column are real.

The honest reading of this table is that hybrid wins on capability and loses on simplicity, and that it is the natural destination for a project that started simple and measured the gain from each piece added.

The decision criterion

Two questions settle the choice in most cases, and neither of them is about technology.

Divergent vocabulary, small corpusStart with keywords and add synonyms to the index
Divergent vocabulary, large corpusHere the vector database pays for itself
Shared vocabulary, small corpusStart here, measure, and probably stop
Shared vocabulary, large corpusKeywords with filters first, hybrid if the measurement calls for it

To know which quadrant you are in, you do not need to build anything. Take thirty real questions from your operation and check whether the words that appear in them also appear in the documents that answer them. If they do in most cases, you are in the bottom half.

How not to pay twice when you migrate

Starting simple is only an advantage if migrating later is cheap, and it is, as long as two things are done from day one.

The first is separating the step of chunking documents from the step of indexing them. The work of turning documents into chunks with metadata is the same on both paths, and it is most of the effort. If that step produces a structure independent of the search method, adding embeddings later just means adding another consumer of the same output.

The second is having the evaluation set ready beforehand. It is what turns the migration into a measured decision instead of a renovation based on faith. With a baseline, you add embeddings, run the same questions and watch the number change. Without a baseline, you swap the system, feel that it improved and have no way of knowing.

Sources and method

The numbers come from a retrieval prototype over X-Apps' public content, run on August 31, 2026: 374 documents, 2,563 chunks, 14,519 terms in the index, built in 0.4 seconds.

The evaluation used 730 questions written by the content team with a known source document, of which 638 were evaluated after discarding 5 with no document body and 87 with no distinctive term in common with the expected document. The setup removes the text of the questions themselves from the index.

We did not compare here against a vector implementation on the same corpus, so this article does not claim how much embeddings would improve these numbers. It claims that the lexical baseline is high enough to validate the project and to serve as a reference for any subsequent decision.

Frequently asked questions

Yes, and with a small corpus it is usually the right start. In our index of 2,563 chunks, keyword search put the correct document in the top 10 for 96.2% of questions whose target was an article, without a single embedding.

Previous post
AI meeting minutes: what they cost at 10,000 meetings a month
Next post
When not to use n8n: cheap automation in an operation that cannot leak
Newsletter

One email a month, no noise

What we learn shipping custom software and applied AI.

Related articles

What is DevOps?4 min · Engineering
Understanding the Angular framework2 min · Engineering
APIs and microservices: the reinvention of technology2 min · Engineering
Blockchain APIs: what can we learn from the application?2 min · Engineering
Docker: smart storage2 min · Engineering

Accelerate your business with X-Apps

Ask for a Budget
X-Apps is an IT provider partner and advised by
Gartner
Receive our e-mails
News on software and applied AI.
Follow X-Apps