Enterprise Search
Fixing semantic search on scientific topics.
- Role
- Proposed and Built
- Where
- a Knowledge Discovery Platform
- Year
- 2025
Note: Anonymized. Client and platform related specifics are intentionally left out.
LLM-powered query expansion using AWS Bedrock and OpenSearch, surfacing scientific documents, for ~3× higher search relevance.
The problem
The company had an internal platform for surfacing assets, tools and utilities built across teams.
It used a hybrid search structure (with a BM25 keyword search + KNN vector search) over OpenSearch hosted on AWS.
The semantic side underperformed, especially on niche topics from scientific literature.
The path not taken
The plan was to replace the embedding model with one that handled scientific terms better, either trained in house or found online.
That meant a long build and evaluation process, the cost of hosting a new model, and no promises of being a complete solution.
I instead proposed a smaller query expansion module. Which would be easier to build and evaluate if it worked.
Original plan
Custom embedding model
Proposed plan
Query expansion module
What got built
We went ahead with the query expansion module. Every query would now get expanded by an LLM on AWS Bedrock before hitting the index.
The module handled both the keyword and vector legs of the search in a single LLM call.
The BM25 query was appended with exact related terms. The KNN vector search received standardized phrases explaining the intent of the user.
The refinement
While integrating this module, the keyword index was found to store each asset's name, descriptions, tags and metadata as one combined field.
These were split into separate fields, and a new query weighted each by relevance. This improved the reliability of keyword matches, especially against typos.


Result
Together, the changes scored ~3× higher on an internal search relevance benchmark.
✱ how was this measured?
How it was measured
The platform owners kept a list of search queries and the results they expected.
That list became a benchmark with two scores:
- Top-1 accuracy: was the right result first?
- Top-3 score: a right result still counts in second or third place, just for less (1, ½, ⅓).
I learned…
how to evaluate solutions on viability, cost and effort.