An AI search feature can work without a separate vector database. Start by checking what people need to find, which records they may see and how well your existing search handles those requests. Add semantic search, combine approaches or introduce another store when the results and operating requirements justify it.
Imagine a product catalogue. One customer enters an exact model number. Another asks for “light shoes for rainy walks”. Both may need an available item in their size. Finding a product with a similar description is useful only if it also meets the requirements that matter.
What must people be able to find?
Collect representative requests before asking a supplier to choose the architecture. Include ordinary searches and the awkward ones people still need to complete. For each request, have someone who knows the catalogue identify useful results, essential matches and records that must stay out.
- Exact identifiers: a model number, reference code or named item. Check exact fields and matching explicitly; a full-text ranking alone may not preserve the distinction you need.
- Different wording: a customer describes the intended use without knowing the words in the product description.
- Required filters: the result must meet conditions such as size, availability or date. Relevance cannot excuse a failed condition.
- Different access: the same request from two users may have different permitted results. Include a change to someone’s access.
- Changing information: an item is updated, withdrawn or replaced. Check whether search returns the current permitted version.
- No suitable result: the catalogue cannot satisfy the request. Agree how the feature should make that clear.
Write the required filters separately from preferences. “Available in size 39” is a condition to enforce; “good for rainy walks” may require a judgement about relevance. That distinction helps you see why a plausible-looking result can still fail the task.
Planning search for your application?
We create custom software and business systems. Bring the searches people need to complete, the data they should search and the access restrictions. We can discuss the application work those requirements call for.
Discuss your search feature
What do lexical, semantic and hybrid search change?
These names describe ways of finding candidate results. They do not decide which records a person is allowed to see or whether the result satisfies every business rule.
Lexical search
Finds results through words and their processed forms. It can suit requests that use the vocabulary in your records. Start with the existing search as a baseline, while checking identifiers through the fields and exact matching they need.
Semantic search
Uses numerical representations, often called embeddings, to compare meaning. It can help when people describe the same idea in different words. Similarity still needs to be judged against the actual task.
Hybrid search
Combines lexical and semantic retrieval. It may cover different kinds of request better, but adds choices about combining and ordering results. Test whether that extra work improves the searches you need.
Elastic’s search approach documentation describes these options and their different uses. It is a useful explanation of the mechanisms, rather than evidence that one approach will win on your catalogue.
How should you compare the results?
Ask the team to run the lexical baseline, semantic search and any proposed hybrid against the same permitted records and representative requests. Keep the required filters and access rules in the comparison. A result from the whole catalogue tells you little if the real user can search only a small part of it.
Review whether useful results appear near the top, whether essential results are missing, and whether unauthorized or stale records appear. Measure response time and operating cost under the conditions you expect to support. Look at each type of request as well as the overall result: better paraphrase matching can hide worse model-number searches.
Choose the simplest supported approach that passes the important tasks. A permission failure can rule out an option even when its average relevance score looks good.
Agree what a failure means for this feature before choosing a winner. There is no universal pass percentage. Record the searches that failed, their consequences and the version tested, so a later change can be compared against the same requirements.
If the proposal uses approximate vector search, ask what its speed trade-off loses. The pgvector documentation distinguishes exact and approximate retrieval and discusses checking recall against exact search. Here, recall concerns whether the approximate search finds the neighbours the exact vector calculation would find. Those neighbours still need to be relevant to your business question.
Finding a useful source and writing a correct answer are separate checks. An AI can retrieve the right document and still omit a condition or invent an explanation. Exact vector search does not make a generated answer exact.
If the search feeds an answer-writing feature, assess those answers separately. Our guide to testing an AI feature before staff rely on it covers that wider acceptance decision.
Do vectors need their own database?
Vectors do not automatically require a separate database. PostgreSQL provides full-text search, and the pgvector extension adds vector similarity search within PostgreSQL, with documented options for combining it with full-text search. That establishes a possible architecture, not a recommendation to use it for every application.
Ask what a proposed separate store solves that the supported existing system cannot. The answer should connect to measured retrieval quality, response time, update needs or operating requirements. A record count by itself does not settle the choice.
Then follow the data through a normal change. When a source record changes, who updates its searchable text and embedding? When it is deleted or someone loses access, how does that change reach every searchable copy? Agree how failures are detected and corrected, including while synchronization is delayed.
Include backup and restore, monitoring, rebuilding indexes and ongoing maintenance in the decision. Name the owner of each part. Where an embedding model or hosted search service is involved, include its charges and identify what data leaves the approved environment. A vector store’s presence does not establish privacy or authorization.
These responsibilities belong in the proposed work and ongoing costs. If you are comparing suppliers, see what changes a custom software quote for the broader scope questions.
What should you ask for before approving the choice?
Ask for a short decision record: the representative requests and expected results, mandatory filters and permissions, the approaches compared, important failures, measured response time and cost, and who maintains the chosen system. Include how updates, removals and access changes were checked.
If lexical search meets the need, you have a reason to keep it. If semantic or hybrid search improves the important requests enough to justify its costs and responsibilities, you have a reason to add it. A separate store should earn its place in the same way.
Questions about AI search and vector databases
Can ordinary search be enough for an AI feature?
Yes, if it finds the material the feature needs under the required filters and permissions. Compare the existing lexical search with the proposed alternatives on representative requests before adding complexity.
Does semantic search require a separate vector database?
No. Vector search can run within some existing database systems, such as PostgreSQL with pgvector. Choose the supported architecture using measured results and operating requirements rather than assuming vectors need a separate service.
Is hybrid search always the best choice?
No. Combining approaches adds decisions about retrieval and ranking. It should improve the important requests enough to justify its cost and maintenance, while preserving required filters and access rules.
Does retrieving the right source prove an AI answer is correct?
No. Retrieval finds source material; answer generation can still misstate it or omit an important condition. Check the generated answer against the approved material separately.