Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Product leaders want semantic search with embeddings and generative answers on top of the existing keyword search. As the senior technical leader, how do you decide the investment and sequence?

I would start from the user problems where keyword search fails, measured with search analytics, rather than from the technology. Hybrid search, combining keyword and vector results, usually beats either alone, so it is the likely target, but we first count the cost of embeddings, vector storage and model calls at our query volume and set up relevance judgements to evaluate before and after. The sequence is to fix relevance basics first, then add vectors, then add generative answers with guardrails, each step gated by measured improvement.

Why this question is asked

Semantic search and generative answers are exciting, and product leaders are right that they can help customers who struggle to describe what they want in keywords. But they are expensive to run, hard to evaluate, and can make results worse in ways that are not obvious in a demo. A senior technical leader is expected to turn enthusiasm into an investment plan with measurable steps. Interviewers ask this to see whether we lead with user problems, evidence and cost rather than with technology. In this answer, we will find where keyword search fails, see why hybrid search usually wins, estimate the cost, set up evaluation, decide the sequence, and organise the decision points.

1Start Where Keyword Search Fails

Before deciding anything, I would ask what problem we are solving, using our own search analytics. Useful numbers are the zero-result rate, the share of searches that return nothing; the reformulation rate, how often users immediately search again with different words; the click-through and conversion rate per query; and the share of sessions where search is followed by leaving the site.

Then we look at examples of failing queries. Keyword search is excellent at product names, brands and codes, such as a model number, and poor at descriptive or intent queries like warm jacket for winter hiking under 150 or a gift for a ten year old who likes space. If 30 percent of our revenue-relevant queries are of the second kind and convert badly, there is a strong case. If almost all queries are product names, the case is weak, and better synonyms may be the real need.

2Why Hybrid Search Usually Wins

Vector search represents each product and each query as an embedding, a list of numbers produced by a model, such that items with similar meaning are close together. It finds a down parka for warm winter jacket even without shared words. But it is weaker at exact matches: a search for a specific model number may return similar-looking products instead of the exact one.

Hybrid search runs both a keyword query and a vector query and merges the results, for example with reciprocal rank fusion, which scores each item by its rank in each list. In published evaluations and in practice, hybrid usually beats either method alone, because each covers the other's weak spot. Elasticsearch, OpenSearch and PostgreSQL with pgvector all support some form of it, so it may not need a new system.

Keyword, vector and hybrid search
Query typeKeywordVectorHybrid
Model number or SKUexcellentweakexcellent
Brand and product nameexcellentgoodexcellent
Descriptive intentweakgoodgood
Misspelled descriptive queryfair with fuzzygoodgood
Each method covers the other's weak spot.

3Counting the Cost at Our Volume

The costs are real and scale with volume, so I would estimate them with our numbers. Suppose we have 20 million products and 500 searches per second at peak, around 20 million searches per day. Embedding the catalogue is a one-off batch plus updates for changed products. Every search also needs a query embedding, so 20 million embedding calls per day, unless we cache popular queries, which often removes a large share.

Storage grows too. A 768-dimension embedding in 32-bit floats is about 3 KB, so 20 million products need about 61 GB of raw vectors, and an approximate nearest neighbour index such as HNSW needs memory on top of that. Quantization can shrink it several times at a small cost in accuracy. Generative answers are the most expensive part: a model call per answered query, with latency of a second or more, so we would apply them only to a fraction of queries rather than every search.

4Evaluation Before and After

Without evaluation, every change is a matter of opinion and a good demo. So before building, we create a set of relevance judgements: a few thousand real queries, sampled across query types, with results graded by trained reviewers as highly relevant, relevant or not relevant. From these we compute offline metrics such as NDCG, which rewards putting the most relevant items at the top.

Every candidate change, a new synonym list, a vector model, a fusion weight, is measured offline first, and only improvements go to an online A/B test, where the real measures are conversion, revenue per search and reformulation rate. This also protects the queries that work well today: we check that model number searches do not get worse while descriptive ones get better.

5The Sequence: Basics, Then Vectors, Then Generative Answers

The order matters because each step builds on the previous one. First, fix relevance basics: synonyms, spelling correction, field weights, and ranking signals such as popularity and availability. These are cheap and often give the biggest gains, and they make the baseline that vectors are measured against.

Second, add vectors as hybrid search for the query types that analytics showed failing. Third, add generative answers, such as a short summary comparing three suitable products, with guardrails: answers grounded only in our catalogue data, product links for every claim, no invented prices or stock, a fallback to normal results when confidence is low, and monitoring of complaints. Generative answers sit on top of retrieval, so they are only as good as the hybrid search beneath them.

Step throughInvestment sequence with gates
  1. Measure failing querieszero results, reformulations, conversion
  2. Build relevance judgementsgraded queries, offline NDCG
  3. Fix basicssynonyms, spelling, ranking signals
  4. Add hybrid vectorsfor failing query types, A/B tested
  5. Measured gain worth the cost?
    YesAdd generative answers with guardrailsNoStop and tune hybrid search
  6. Review cost per search and conversionevery quarter

6 steps in order. Play them, or step through them one at a time.

6Organising the Decision

I would present this to product leaders as a staged investment with gates rather than one big bet: a small budget for analytics, judgements and basics, a second for hybrid search if the offline numbers justify it, and a third for generative answers if hybrid search shows the expected gain. Each gate has a clear measure, for example a conversion increase on descriptive queries that pays for the added cost per search.

That gives leaders what they want, a credible path to semantic and generative search, and gives engineering what it needs: evidence before each larger commitment, and the freedom to stop if the numbers do not support the next step.

7Follow-up questions

Why not go straight to generative answers, since that is what leaders asked for?

Because generative answers depend on good retrieval; if search finds the wrong products, the model will summarise the wrong products confidently. Building retrieval first also gives us the evaluation tools to know whether the generative layer helps.

Do we need a separate vector database?

Often not. Elasticsearch, OpenSearch and PostgreSQL with pgvector support vector fields and approximate nearest neighbour search, which allows hybrid search in a system we already run. A dedicated vector store is worth it only at a scale or feature need the existing engine cannot meet.

How do you keep the cost per search under control?

Cache query embeddings for frequent queries, apply vectors only where they help, quantize stored vectors, and limit generative answers to query types where they measurably improve conversion.

8Conclusion

In this answer, we started from the queries where keyword search fails, saw why hybrid search usually beats keyword or vectors alone, estimated embedding, storage and model costs at our volume, set up relevance judgements and A/B tests to measure each change, sequenced the work as basics, then vectors, then guarded generative answers, and presented it as a staged investment with clear gates.

What to say in the interviewAbout 80 seconds aloud

Open with

I would start with the user problem, not the technology. Search analytics tell us where keyword search fails: zero-result rates, reformulations and conversion by query type. Usually keyword search is great for names and model numbers and weak for descriptive intent queries, and the size of that second group decides how much semantic search is worth.

Then, if they want more

My expected target is hybrid search, keyword plus vectors merged with something like reciprocal rank fusion, because it usually beats either alone and keeps exact matches working.

Then I would estimate cost at our volume: embedding the catalogue, a query embedding per search unless cached, vector storage, which is about 61 gigabytes raw for 20 million 768-dimension vectors before index overhead, and model calls for generative answers, which are the most expensive and slowest part.

Before building, I would create relevance judgements on a few thousand real queries so every change is measured offline with NDCG and then A/B tested on conversion. The sequence is: fix basics like synonyms, spelling and ranking signals first, then add hybrid vectors for failing query types, then generative answers grounded in our catalogue with guardrails and fallbacks. Each step is a funding gate with a measured result.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Product leaders want semantic search with embeddings and generative answers on top of...": https://scrivio-interview-library.netlify.app/architecture/backend-system-design/17f2e9a3dc/