2025-12-10 –, Horace Mann
We present a hybrid framework for typeahead search that combines prefix matching with semantic retrieval using open-source tools. Applied at Quizlet, it indexed 200 million terms and improved coverage, boosted relevance, and lifted suggestion engagement by up to 37 percent—offering a reusable approach for building scalable, robust query suggestions.
Typeahead search is one of the most widely used discovery tools, yet most systems still rely on prefix matching alone. Prefix approaches are efficient for short queries but come with inherent limitations: they cannot handle typos, require storing exploding prefixes for longer queries, and favor precision over recall. Our work shows that semantic retrieval using transformer-based embeddings addresses these gaps by capturing query meaning rather than exact string matches.
Instead of treating prefix and semantic retrieval as competing methods, we designed a hybrid framework combining the best of both. Prefix matching remains valuable for short inputs where embeddings are less effective, while semantic retrieval shines for longer, more complex queries. By combining these approaches in parallel, we achieved both relevance and robustness.
Our implementation uses open-source tools end-to-end: Sentence Transformers for encoding, FAISS for vector indexing across 200M documents, and GPU acceleration for real-time performance with P90 < 25ms. We share lessons on encoder selection, index tuning, balancing recall against latency, and deployment at scale.
Most importantly, A/B tests showed that complementing prefix with semantic retrieval increased suggestion engagement by 20%–37%. This framework powers Quizlet’s millions of users and gives attendees reusable techniques for building scalable, robust typeahead search.
(1) Problem:
Prefix-only typeahead search fails on typos, long queries, and delivers low coverage.
(2) Solution:
A hybrid approach that runs prefix matching alongside semantic retrieval using open-source tools.
(3) Results:
Increased suggestion engagement by 20–37%, serving 60M Quizlet users on 200M documents with P90 <25ms.
(4) Methodology:
Encode queries and documents with Sentence Transformers, index and retrieve with FAISS, complement with prefix results, and fine-tune for speed and quality.
(5) Audience Takeaway:
A practical, reusable, production-ready framework for building faster, smarter typeahead search.
Brandon (Anbang) Wu is a Senior Machine Learning Engineer at Quizlet, where he drives search relevance for tens of millions of learners worldwide. Previously at Shopify At Shopify, he built large-scale recommendation systems that powered product discovery for hundreds of thousands of merchants. Earlier at NBCUniversal’s Fandango, he led machine learning initiatives developing content recommendation algorithms for both theatrical and streaming platforms. Brandon holds master’s degrees in Computer Science from Georgia Tech and Analytics from UCLA.