INDIA-BASED · INTERNATIONAL DELIVERYsupport@maukaz.com
MAUKAZ — Your Technology Partner
Insights/Knowledge & RAG
EXPANDED GUIDE · Knowledge & RAG

Testing keyword and semantic retrieval together

Exact terms and semantic similarity solve different retrieval problems. Product codes, names and specialized phrases may need lexical matching alongside semantic search.

Test exact matching and meaning separately

Some questions rely on exact identifiers, while others use paraphrases. Product codes, error numbers and names often benefit from lexical matching. Questions expressed in ordinary language may benefit from semantic retrieval. Evaluate a combined approach against both types of request, keeping the candidate selection and later ranking steps understandable.

Worked example

Illustrative scenario; not a claim of measured client results.

A user searching for error E104 needs the passage for that exact code, not a semantically similar description of another failure. Another user may describe the symptom without knowing the code. Include both questions in the evaluation set and inspect the retrieved passages. Combining methods is useful only if it improves the evidence selected for the actual workload.

Checks, limitations and next decisions

When results degrade, identify whether the issue is missing exact terms, poor semantic candidates or the way result lists are combined. Do not judge success solely by a plausible final answer. Compare relevant evidence coverage, irrelevant material and operating cost. Keep the evaluation stable while changing retrieval settings so the team can explain what improved and which cases still need a different approach.

A practical starting point

Work through these checks in order. Use the results to decide what needs to change in your own workflow.

  1. Create queries containing exact identifiers and natural-language descriptions.
  2. Compare candidate results from each retrieval method.
  3. Evaluate a combined approach against the same relevance judgments.

A mistake to avoid

Do not assume semantic search always outperforms straightforward keyword retrieval.

How to check progress

Measure relevant-source recall and the review burden caused by irrelevant results.

Your action checklist

Use this checklist while reviewing your own setup. Checkmarks are temporary and stay in this open page.

For the wider decision process, read When retrieval is the right addition to an AI assistant.

Further reading

Official background resources for this topic. The workflow above is general guidance, not a guarantee of a particular result.

AI-assisted editorial content. Examples are illustrative, not client case studies. Read our editorial policy or report a correction.