Lesson overview
Explain how systems interpret, rewrite and expand queries using normalisation, spelling correction, synonyms, thesauri and pseudo-relevance feedback while managing query drift.
Starter
Write down the user need, the data being stored or searched, and the decision the system has to support. Then predict which representation, index, query method or governance control will matter most in this lesson.
Learning objectives
- Describe the stages of query processing.
- Explain query expansion using thesaurus, synonyms and pseudo-relevance feedback.
- Evaluate query drift as a risk of expansion.
Learning outcomes
- Students can describe the stages of query processing.
- Students can explain query expansion using thesaurus, synonyms and pseudo-relevance feedback.
- Students can evaluate query drift as a risk of expansion.
Key vocabulary, acronyms and terminology
- query processing
- The interpretation and transformation of a user query before retrieval.
- query expansion
- Adding related terms to improve matching.
- thesaurus
- A structured source of synonyms or related terms.
- pseudo-relevance feedback
- Expansion using terms from top-ranked results assumed to be relevant.
- query drift
- A failure where expansion changes the query away from the user's need.
- spell correction
- Repairing likely spelling mistakes in a query.
Detailed teaching notes
Core concept
Users often enter short, ambiguous or misspelled queries. Query processing cleans and interprets the input; query expansion may add terms that improve recall.
Representation choice
A raw query can become a processed query containing tokens, corrected spellings, synonyms, field restrictions, phrase constraints and expanded terms with weights.
Method and reasoning
Apply conservative processing first: decoding, normalisation, tokenisation and spelling suggestions. Add expansion terms only when the domain evidence supports them, and track the original query separately.
Risk and limitation
Expansion can improve recall but reduce precision. Query drift occurs when added terms pull the search toward a different topic, especially when top-ranked feedback documents are not actually relevant.
Degree-level deep dive
Expansion changes the query
Query expansion can improve recall by adding synonyms, controlled terms or feedback terms, but it also changes the evidence used for ranking. That makes query drift a central risk.
Controlled sources reduce drift
A domain thesaurus, authority file or manually curated vocabulary often gives safer expansion than taking terms blindly from top-ranked documents. Pseudo-relevance feedback is useful only when early results are reasonably reliable.
What excellent work shows
A strong answer names the original query, proposed expansion terms, their source and their weighting. It should state how the system would detect that expansion has moved away from the user's intent.
Concrete example to study
Controlled expansion
Original query: car emissions law
Controlled terms: vehicle emissions, emissions standard, environmental regulation
Risky expansion: transport policy, fuel prices, traffic congestionReasoning
- Controlled terms preserve the legal and emissions focus.
- Risky terms may increase recall but drift toward a broader transport topic.
- The system can weight original terms more heavily and evaluate whether expanded results still answer the need.
Reveal takeaway
Query expansion is a controlled rewrite, not a random synonym dump, and students should always explain how added terms preserve or change the original intent.
Worked example
Scenario
A user searches for 'heart attack treatment' in a medical collection.
Worked solution
- Normalise the query and preserve the original terms.
- Use a medical thesaurus to add myocardial infarction as a related controlled term.
- Weight original terms strongly so expansion does not dominate.
- Evaluate whether retrieved results still answer treatment rather than diagnosis or general heart disease.
Reveal model result
Expansion is useful because medical terminology varies, but uncontrolled expansion can create risky drift in a high-stakes domain.
Applied retrieval task
Design query expansion for a university module catalogue.
Deliverables
- Choose one ambiguous student query.
- Add two controlled expansion terms and one term you would reject.
- Explain how you would detect query drift.
Success checks
- Expansion terms are domain-relevant.
- The design preserves the original query intent.
Common misconception
Query expansion is not simply adding every related word. It is controlled evidence-based rewriting of the user's query.
Quick checks
1. In this lesson, why does query processing matter?
2. Which answer best shows degree-level understanding of query processing and query expansion?
Digital exam practice
Example exam task
A search for 'car emissions law' should also find documents using 'vehicle pollution regulation', but expansion sometimes returns unrelated transport-policy pages. In your answer, define the relevant objects or data structures, use course-specific vocabulary, show the method rather than only the result, and finish with a decision about the storage or retrieval system.
Notation and technical toolkit
What a good answer is expected to show
A strong answer for Query Processing and Query Expansion the answer should explain query expansion, thesaurus support, pseudo-relevance feedback and query drift, then propose a controlled expansion strategy. It should connect the formal or technical representation to the user's information need instead of listing terms without using them.
How to solve it
- Identify the original query and possible related terms.
- Use a thesaurus or domain vocabulary to justify expansion.
- Weight or constrain expansion terms to protect the original intent.
- Describe how query drift would be detected and reduced.
Model answer
Reveal model answer
The system can expand q = 'car emissions law' with controlled terms such as vehicle, pollution, emissions standard and regulation. A thesaurus is safer than unrestricted pseudo-relevance feedback because feedback terms from early results may pull the query toward general transport policy. I would keep original terms highly weighted, add field or topic constraints for legal documents, and evaluate whether expanded results still answer the emissions-law need. Query drift is present if added terms dominate and the result topic changes.
Practise next
- Give a query where synonym expansion improves recall.
- Give a query where expansion would clearly damage precision.
Self-marking criteria
- Defines the scenario objects, data forms or system components before solving.
- Uses the lesson vocabulary accurately and in context.
- Shows a clear method with enough working for a marker to follow.
- Connects the result back to retrieval, storage, analytics or governance.
- States a limitation, trade-off or quality risk rather than presenting the answer as absolute.
Extension
Compare manual thesaurus expansion with pseudo-relevance feedback for one ambiguous query.
Study route
Save a short worked answer from this lesson using this pattern: define the need or data, choose the representation, show the method, state the result and interpret the implication for the system.
Next lesson: Semantic Web and Linked Data.
