GrabMd RiyadhBenchmark
LLM-assisted vector similarity search
Summary
Vector similarity search can struggle with queries containing negation, constraints, or conceptual requirements, even though it efficiently retrieves semantically similar records. The proposed method uses FAISS and OpenAI text-embedding-ada-002 embeddings to shortlist 15 candidates, then asks GPT-4o to rank the candidates against the original query and return the top three. On two GPT-4o-curated synthetic datasets—100 food dishes and 100 Asian tourist spots—the assisted method matched raw search on straightforward queries but produced more relevant results for complex ones, including excluding fish or shrimp and identifying wildlife-related places. The authors note limits from the small datasets and query set, report similar relevance improvements in an internal deployment involving more than 4,500 relational-database rows, and identify shortlist size and added LLM latency as areas for further evaluation.
Context
Traditional vector similarity search may return semantically close but contextually wrong results when queries contain negation, additional constraints, or conceptual requirements. The experiments evaluate whether LLM-based ranking can improve relevance for structured data stored in relational-database-style records.
Approach / What changed
The method performs vector similarity search with FAISS and OpenAI text-embedding-ada-002 embeddings to produce a shortlist of 15 candidates. GPT-4o then receives the shortlist and original query and ranks the candidates, returning the top three results.
Takeaways
LLM-assisted ranking filtered out fish- and shrimp-containing dishes for the query “food with no fish or shrimp,” while raw vector search returned seafood-related results.
For complex queries, the assisted method improved relevance; for straightforward queries aligned with textual content, it performed comparably to raw similarity search.
The approach adds an LLM query and therefore introduces latency considerations; future evaluation includes varying shortlist size and testing larger, more diverse datasets.
Source and freshness
- Source
- engineering.grab.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.