Knowledge assistants

Choose a vector database for RAG by operating needs

Reading time
11 minutes
Updated
Published
Written by
modernagents editorial teammodernagents is an AI automation agency from Austria for SMEs, based in the Vienna region.
AI-generated image: An index wheel with an indigo hub on terrazzo

Your AI knowledge assistant needs a store, and vendors advertise large vector counts and fast searches. You wonder how to choose a vector database for RAG that fits your business, and whether you need an additional one at all.

Choose a RAG vector database by what is searched, which filters are needed, how often content changes and whether your team can operate it. The largest advertised vector count is rarely the decisive criterion for a company assistant. What matters is whether the right sources, which the person asking may see, can be found quickly enough under real conditions, and whether changes and deletion work reliably. Below we compare architecture paths and evaluation criteria, not completed vendor benchmarks.

An example: a supplier to the engineering industry in Girona has 120 employees. Sales, quality assurance and purchasing are to get a knowledge assistant that searches inspection reports, drawing standards, supplier contracts and quotation templates. Not every department may see everything, because these contracts are meant only for purchasing. Laia runs the two-person IT team, already looks after a PostgreSQL database for the customer portal and is asked to decide where the assistant's data will live.

Key takeaways

  • First check whether your existing database or search technology is enough.
  • The vector database is only one part of RAG. It does not deliver complete sources, valid permissions and correct answers by itself.
  • A filter is not complete user authorization. Deletion, model migration, restoration and isolation belong among the selection criteria.

First check whether existing database or search infrastructure meets the need. Another service is justified when it fulfils a concrete requirement better. But it also brings new tasks: access, backup, cost and change. For Laia, this means she checks her PostgreSQL database first before she introduces another service.

01 / 15

A vector store is one component of RAG

The store holds numerical representations, meaning numerical values, and often extra metadata such as department or version. It does not automatically create complete sources, valid permissions or correct answers. Reading out the documents, splitting them into passages, the business approval and writing the answer remain separate tasks.

A poorly prepared passage remains poorly prepared in a faster database. If, for example, product codes or exceptions are missing from one of the supplier's inspection reports, the store cannot reliably recreate them. So start with a clean reference collection and with passages you know the assistant must find.

The RAG architecture guide shows the complete flow. Derive the database choice from it, instead of building the rest of the application around a product you have already chosen.

02 / 15

Which workload does the vector database have to carry?

Record the number and size of the search objects, the vector dimensions, how often things change and how many requests to expect at the same time. The number of original files is not enough. A long manual may produce many passages, a short form only a few.

List the filters you need. These can include tenant, user group, product, language, location and effective period. How strongly these filters narrow the collection also matters. At the supplier, sales searches almost the whole collection, while purchasing often searches only a small part, the supplier contracts. A request across almost all documents behaves differently from a request on a very small authorized subset.

Also describe how long the assistant may be down and when it has to run. An assistant that someone inside the company uses only occasionally may need different availability from a central service application. These requirements affect architecture and cost more than a demo with a single search query.

03 / 15

Which three architecture paths can you compare?

For vector storage in RAG, there are three architecture paths you can compare. They differ in when you should consider each path and what responsibility it adds.

Path Consider when Additional responsibility
Existing relational database with vector capability Data and operating skills already live there Coordinate search indexing and other workloads
Specialist vector store Retrieval and filtering have specific requirements Operate another service and synchronize data
Managed search service Text, vector and related features are needed together Verify limits, region and billing model

What the three paths can do overlaps. So decide by the functions you actually use. A long feature list is not an advantage when the application needs only a few of them and operations become harder.

With existing technology, also check the additional load. A shared system can simplify administration, but it must not disrupt important ongoing work when large search indexes are built. At the supplier, the customer portal must not slow down while Laia reads in the inspection reports. A separate service isolates this load, but creates work for keeping the data in sync.

04 / 15

Existing database: PostgreSQL and pgvector as a baseline

pgvector adds a search for similar vectors to PostgreSQL and documents exact and approximate methods (pgvector: official documentation). For teams that already know PostgreSQL, like Laia, this path can therefore be a good baseline for the comparison. That does not mean it is superior for every size or workload.

One design advantage can be keeping metadata and vectors close together. Still check the actual queries, the index settings and the competition with other database tasks. A familiar database does not make a new search workload free.

PostgreSQL also provides rules that restrict access to individual rows (PostgreSQL: row security policies). Whether they work in your application depends on roles and the execution context. The feature alone does not prove correct preservation of external document permissions, for example from your document stores.

05 / 15

Specialist vector store: evaluate through filters and operations

A specialist vector store can suit particular retrieval or scaling needs, meaning growing with data volume and load. Qdrant, for example, documents filtering on stored properties and points out how important suitable indexes for the filter fields are (Qdrant: filtering).

But providing a filter does not fully control what each user is allowed to access. The application must derive the correct filter from an authenticated identity and prevent users from expanding it. When someone from sales asks a question, the application itself must make sure that the supplier contracts are not searched. Deletions and permission changes in the source must also reach the stored properties.

Besides queries, check the everyday operating tasks: reading in data, backup, restoration, troubleshooting and version upgrades. A good retrieval benchmark does not do these jobs. The right service is the one whose complete responsibilities your team can carry or reliably buy in.

06 / 15

Managed search service: select for needed capabilities

Managed search services can combine text and vector search, filters and additional ranking in one product. That can save integration work when you actually need these functions. But it can also bind the application to particular query and index models.

Azure documents hybrid search as a combination of text and vector signals (Azure AI Search: hybrid search). For a comparison, test the same questions and filters as with the other options.

Compare the particular operating model and its current billing. Managed offerings can have different dedicated or usage-based variants. Do not assume across the board that every service always charges the same fixed price for capacity or rests completely free of charge when idle.

07 / 15

How do exact and approximate retrieval differ?

Exact search determines the nearest hits under the chosen distance measure across the collection considered. Approximate methods can reduce search effort, but allow possible differences in which neighbours are found. Whether this matters in practice depends on the data and the task.

For a bounded test collection, use a traceable reference to spot relevant hits that were missed. The highest speed is of little value if precisely the rare valid procedure is regularly missing, such as the special inspection for a single component.

The distance between two vectors is not the same as business correctness. Even an exactly calculated nearest vector can belong to an unsuitable source. So evaluate separately how precisely the technology finds the nearest hits and whether they are actually relevant to the answer.

Got a workflow like this?

Tell me about it. Honest take and a rough price, usually within a day.

08 / 15

Why can filters unexpectedly reduce results?

The order of filtering and approximate search affects the results. pgvector explains, for example, that with approximate indexes, filters can apply only after the index has been scanned, so fewer matching hits remain. Its documentation describes several countermeasures (pgvector: filtering and iterative search).

Do not assume without checking that other products behave the same way. Test each option with strongly and weakly narrowing filters. An unrestricted search across all documents is not a realistic stand-in for a permission-sensitive assistant with many user groups. At the supplier, a test therefore includes someone from purchasing searching only in the supplier contracts.

If the application gets too few hits, it must not simply remove the security filters. Instead, check the search parameters, the partitioning of the index or another retrieval path. A correct empty answer is better than a full list from other teams' areas.

09 / 15

Estimate raw storage without confusing it with total capacity

An illustrative example: 100,000 vectors with 1,536 values each and four bytes per value need 614,400,000 bytes for these raw values. That is approximately 614 MB in decimal units. These assumptions are not a recommendation for a particular embedding model.

The actual database also needs index structures, metadata, text, management data and potentially copies on further servers. Backups and a parallel rebuild add more. A calculation with the vectors alone is therefore only one part of the planning, not a complete storage order.

Also check whether the numerical values are stored compressed and what that means for quality. Weigh saved storage against retrieval behaviour and operating effort. Do not take a vendor's figure as the result for your own collection.

10 / 15

How do you run a controlled comparison?

Compare under the same conditions, meaning with the same state of the sources, the same embeddings and the same filters. If the model or the way of splitting into passages changes at the same time, a difference cannot be attributed to the store alone. Start with a few candidates that are seriously in question.

Test realistic cases. These include questions with exact identifiers such as a part number, questions worded differently from the document, where meaning matters, and questions within small authorized subsets. Measure the quality of the hits and the response time at a realistic number of simultaneous requests. Read in new data at the same time, so that you do not only evaluate an unchanged ideal state.

Record the instance size, the configuration and the software version used. Without these details, a comparison is hard to repeat. The goal is not a universal leaderboard but a defensible decision for your task and your operating conditions.

Include failed and slow requests in the result, not only the averages of successful queries. A service can have an attractive median and still occasionally exceed the response time that is still usable for the application. Decide which failure rate and which response time your business can tolerate before you compare options.

11 / 15

Treat deletion and model migration as selection criteria

Suppose a supplier contract is terminated and has to disappear from the assistant. A withdrawn source such as this contract must be removable together with its associated passages. Check whether stable document identifiers allow targeted clean-up, and determine which stored answers or other derivatives also need treatment.

Changing the embedding model may mean new dimensions or a different vector space. Plan how the new collection is built, evaluated and activated. A temporary parallel index needs extra capacity but can enable a controlled transition.

Keep original texts and metadata in a traceable enough form that you can create new numerical values. Vectors alone are not a convenient format for taking your company knowledge into another system. Test the exit from a product in practice.

12 / 15

Include restore and isolation tests

Restore a small backup that represents your collection well into a controlled environment. Check the source identifiers, the metadata and the search behaviour. Then reconcile the changes that have occurred since the backup. Pay particular attention to revoked permissions and withdrawn documents.

If several organizations or departments use the assistant, test separate search areas and how they are enforced technically. One area must not be able to affect another's authorized results. Separating the load can matter too. A large import for one area should not unnoticed make another team's essential search unusable. At the supplier, this means that such an import of new inspection reports must not bring the sales team's search to a halt. The right boundary depends on what has been agreed for operation.

These tests reveal operational properties that a query-only benchmark misses. They also show whether documentation and access are sufficient for a stand-in to restore the service, for example when Laia is on holiday. Record the measured restoration effort and compare it with how long the assistant may be down. A backup without a tested way back is not yet a dependable recovery plan.

13 / 15

What does total operating responsibility include?

Include hosting or service usage, storage, backups, data transfer, monitoring and people's working time. For components you run yourself, upgrades and restoration belong to this. Even with managed services, configuration, source maintenance and cost control still matter.

Decide who responds when an index builds slowly, a deletion fails or usage is unexpectedly high. A cheap plan without anyone to operate it can become more expensive than a properly looked-after solution. Conversely, a large range of features does not justify ongoing effort that the task does not need.

Selection comes last. Make the choice only after you have checked retrieval quality, permissions, update processes and restoration. The vector database then becomes a justified component of your knowledge assistant rather than a goal in itself. The cost guide supports the calculation.

Record what would change the decision, for example a substantially greater volume, a new permission model, additional languages or a tighter response-time target. This prevents a premature migration, and it also prevents you from holding on indefinitely to a choice whose original assumptions no longer apply.

Finally, check the handover package with someone other than the person who originally implemented the solution. This person should be able to name the active collections, check the latest backup and explain how a withdrawn document is blocked. Missing access or undocumented dependencies are concrete operating costs. Resolve them before you treat a successful prototype as a maintainable production choice.

14 / 15

Take the worksheet

Worksheet

Download the editable CSV table

RequirementQuestionTest
Access filtersCorrect allowed subset?Two user groups
UpdatesReplace versions?No stale duplicate
DeletionRemove all chunks?Delete by document ID
RecoverySupported backup?Isolated restore
OperationMaintainer available?Named owner
CostStorage, queries, care?Own workload

Columns to fill in, in the file: Your value / observation, Owner, Next action.

Download the editable CSV table (CSV). Add your own values, owners and open actions. This worksheet contains no measured client results.

15 / 15

These modernagents guides cover related decisions about AI knowledge assistants:

For a workflow review, start with the task, systems involved and typical exceptions. Discuss it with modernagents.

ShareEmail

Related reading

AI knowledge assistants

Got a workflow like this?

Tell me about it. Honest take and a rough price, usually within a day.

Robert Van Ysendyck · Founder & Managing Director