A legal search app retrieves poorly on contract clauses with a general embedding model. You are testing a domain-tuned embedding model. What must you do before comparing them fairly?
- Exam domain
- Optimize generative AI systems and model performance10–15% of the exam
- Difficulty
- Hard
- In this mock
- 11 questions on this domainPractise this domain
Why the exam asks this
Objective in the exam guide: Select and fine-tune embedding models for domain-specific use cases and accuracy improvements.
The embedding model decides what retrieval can find. The exam checks you can compare models correctly.
Why B is the answer
Re-embed all documents with the candidate model and run the same retrieval test set on both indexes
Vectors from different embedding models are not comparable, so each model needs its own index; the same test set then shows which retrieves better.
Remember: Changing the embedding model means re-embedding the corpus.
How it works
An embedding model turns text into vectors; similar meanings land near each other in that model's vector space.
Each model has its own vector space, so a query must be embedded with the same model as the documents.
Switching models therefore means re-embedding the corpus and rebuilding the vector index.
Clues in the question
The words that point to the answer, and what each one tells you.
- Comparing fairly
- Same test set, each model with its own index.
- Domain-tuned embedding model
- A different vector space.
In detail
- Track retrieval metrics such as recall at k on labelled question and passage pairs.
- Check vector dimensions and cost per token too.
Side by side with look-alikes
| Approach | Valid comparison? |
|---|---|
| Re-embed all documents and run the same test set on both indexes | Yes |
| New query vectors against old index | No |
| Public benchmarks only | Not your data |
| More chunks for the current model | Does not test the new one |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Increase the number of chunks returned for the current modelWrong
More chunks can raise recall a little but does not test the new model.
B. Re-embed all documents with the candidate model and run the same retrieval test set on both indexesRight
Changing the embedding model means re-embedding the corpus.
C. Query the existing index with vectors from the new modelWrongMost tempting
Query and document vectors must come from the same model.
Why it tempts: It avoids re-indexing, which is slow and costly. But vectors from different models are not comparable, so the results are meaningless.
D. Compare the models' public benchmark scores onlyWrong
Public scores may not reflect legal text.
In practice
- Configure the vectorizer in Azure AI Search with the same model used at indexing, so query vectors always match.
Use case
An illustrative scenario, not a real incident.
The team builds a second index with the legal embedding model; recall at 5 on 300 labelled questions rises from 0.62 to 0.79, so it switches.
See how it works
xychart-beta x-axis ["General model", "Domain-tuned model"] y-axis "Recall at 5" 0 --> 1 bar [0.62, 0.79]
How to read this chart
- Each bar is the share of test questions where the right passage appears in the top five results.
- Both models were tested on the same 300 questions, each against an index built with its own vectors.
- The domain-tuned model finds the right passage far more often, which justifies re-indexing.