Why I Added a Vector Database to Our Knowledge Base—Then Removed It Three Months Later

    This article walks through why a team added a dedicated vector database to an enterprise knowledge base, the three hidden costs that emerged, how they moved vector search back into their relational database using a vector extension, and the signals that justify adopting a standalone vector database instead. You will find practical guidance on table design, indexing choices, and hybrid retrieval for semantic search.

    1. The Starting Point: A Simple Retrieval Requirement

    When we kicked off our enterprise knowledge base project last year, the first problem we hit was straightforward: documents needed to be searchable not only by keyword, but also by meaning. Traditional relational databases rely on literal matching. If a user searches for “refund,” the system only returns passages that contain the word “refund.” But real users rarely phrase questions the same way the documentation does. Someone might ask, “I don’t want the thing I bought anymore—when do I get my money back?” That question never uses the word “refund,” so literal search returns nothing.

    This gap is common across customer support knowledge bases, product documentation, and internal policy libraries. Documents are written by business teams; questions come from users. The two use naturally different language. Relying only on synonym lists, tokenization expansion, or rule-based rewriting drives maintenance costs up quickly over time and still leaves coverage gaps.

    From Literal Matching to Semantic Matching

    The common industry approach is to map text into high-dimensional vectors, often called vectorization or embedding representation. The core idea is simple: texts with similar meaning sit closer together in vector space. Retrieval no longer compares characters; it compares vector distances. This mechanism is generally referred to as vector search, and the components that store vector data and compute similarity are commonly grouped under the term vector database.

    At this point, “just install a dedicated database” sounds like the obvious move. It is specialized, fast at retrieval, supports multiple index structures, and nearly every tutorial recommends it. We did exactly that. Three months later, we removed it. This article covers four things in full: why we installed it, what extra trouble it created, how we ultimately solved the problem with a relational database, and when you should do the opposite and install one.

    2. Three Hidden Costs of a Standalone Vector Database

    1. One More Piece of Software to Own Long-Term

    A dedicated vector database comes with its own deployment method, backup strategy, monitoring metrics, and upgrade path. Our initial assumption was naive: install it and forget about it. That was not the case. Any long-running component needs a clear owner: where the data directory lives, how to restart the process when it fails, how to roll out version upgrades, and how to alert on disk usage. For a team with only two operations engineers, this is a continuous, hidden labor cost.

    2. Keeping Data Consistent Across Two Storage Systems

    Document text lived in the relational database, while vectors lived in the new component. That created very concrete engineering problems: delete a document, and you have to delete it in both places. Miss one side even once, and users get the broken experience of “the search result shows up, but the page is blank.”

    Document updates were even more troublesome. After the text changed, it had to be re-vectorized. If the old vector was not cleaned up correctly, the same passage would appear twice or more in retrieval results. When the model receives duplicate fragments, answers become verbose and self-contradictory. This was not theoretical—we reproduced it in a pre-release environment.

    The root of the consistency problem is that an operation once covered by a single-database transaction is split into a cross-system eventual-consistency flow, requiring additional compensation jobs, idempotent writes, and reconciliation checks.

    3. One More Alert That Goes Off in the Middle of the Night

    Once the new component goes down, the entire search path goes down with it. We used to watch only one database; now we watch two. The failure surface grows, and on-call pressure rises accordingly. We later wrote one principle into our selection criteria: one less piece of middleware means one less midnight phone call.

    3. Putting Vectors Back in the Original Database: A Relational Vector Extension

    The relational database ecosystem has mature vector extension capabilities that let an ordinary database store vectors directly and rank by similarity, typically provided by extensions like pgvector. To assess whether this is enough, two things matter: how you define the table and how you build the index.

    Table Design: Keep Vectors and Text in the Same Row

    1. CREATE TABLE embeddings (
    2. embedding_id UUID PRIMARY KEY,
    3. doc_id UUID NOT NULL,
    4. embedding vector(768),
    5. text TEXT,
    6. metadata JSONB
    7. );

    Putting the vector, the original text, and the document identifier in the same row turns deletion and updates into a single local transaction, eliminating cross-storage inconsistency at the root.

    Indexing: Choose the Retrieval Method Based on Data Scale

    • For small datasets (for example, under a hundred thousand rows), start with exact nearest-neighbor computation. It is simple to implement and accurate in recall.
    • As data grows, introduce an approximate nearest-neighbor index (such as graph-based HNSW or quantization-based IVF), balancing recall against latency.
    • Index build parameters need to be determined through load testing against vector dimensions, data distribution, and query concurrency. Do not copy default values.

    Retrieval: Hybrid Ranking Is Closer to the Real Experience

    1. SELECT text
    2. FROM embeddings
    3. ORDER BY embedding <=> $1
    4. LIMIT 5;

    In production, we recommend a hybrid strategy of “vector recall + keyword recall,” followed by a reranking model that scores results uniformly. This covers both semantic generalization and exact matching of proper nouns.

    4. When You Should Install a Dedicated Vector Database Instead

    Removing it does not mean it is wrong for everyone. Introducing a standalone component makes more sense when these signals appear:

    • Vector scale reaches tens of millions or more, and single-database index building and memory overhead become hard to bear;
    • Retrieval QPS is high and latency requirements are strict, requiring independent scaling and resource isolation;
    • Multiple business lines share vector capabilities and need unified vector governance and lifecycle management;
    • The team already has a mature operations system that can absorb the cost of backups, monitoring, and upgrades.

    5. Conclusion

    The core of technology selection is not chasing what is new, but matching complexity to benefit. For most small and mid-sized knowledge bases, start by running the full loop with a relational database’s vector extension, keeping consistency, observability, and cost on a single path. When scale and concurrency genuinely hit the limit, then split out a dedicated component. This path saved us the operational burden of an entire system within three months, and gave us a more stable retrieval experience in return.