A Bag-of-Documents Model for Query Understanding & Retrieval

Hosted by Daniel Tunkelang, Trey Grainger, and Doug Turnbull

Tue, May 19, 2026

5:00 PM UTC (1 hour)

Virtual (Zoom)

Free to join

Invite your network

Go deeper with a course

AI-Powered Search: Modern Retrieval for Humans & Agents
Trey Grainger and Doug Turnbull
View syllabus

What you'll learn

What is the bag-of-documents model?

Learn an approach to align query and document representations in order to improve retrieval and ranking.

How do you implement the bag-of-documents model?

Build a retrieval model by aggregating queries, results and relevance judgments; and then fine-tuning a base model.

What are the pros and cons of the bag-of-documents model?

Learn where the bag-of-documents model outperforms alternative approaches, but also where it can be tripped up.

Why this topic matters

A search query is not just a string. It represents a distribution over the kinds of results it should retrieve. The bag-of-documents model reframes query understanding as predicting result distributions rather than encoding text directly. It is a simple, powerful approach to align query and document representations in order to improve retrieval and ranking.

You'll learn from

Daniel Tunkelang

Independent Search Consultant. LinkedIn / Google / Endeca alum.

Daniel Tunkelang is an independent consultant specializing in search, information retrieval, and machine learning / AI, with a focus on query understanding, ranking, and large-scale retrieval systems. He was part of the founding team at Endeca and has held leadership roles in search at Google and LinkedIn. He has since advised organizations including Apple, Algolia, Canva, eBay, Etsy, Salesforce, Pinterest, and Zoom on search and discovery systems, helping them improve relevance and retrieval quality at scale. His work bridges classical information retrieval models and modern ML/AI approaches, with an emphasis on practical system design and evaluation.

Trey Grainger

Author, AI-Powered Search

Trey Grainger is lead author of the book AI-Powered Search (Manning 2025) and founder of Searchkernel, a software consultancy building the next generation of AI-powered search. He also serves as a technical advisor at OpenSource Connections.

He previously served as CTO of Presearch, a decentralized web search engine, and as Chief Algorithms Officer and SVP of Engineering at Lucidworks, a search company whose technology powers hundreds of the world’s leading organizations. Trey is also co-author of the book Solr in Action (Manning 2014), as well as over a dozen other publications including books, journals, and research papers. Trey has 18 years of experience in search and data science focused on building self-learning search platforms integrating the most successful AI Search techniques.

Trey teaches AI Search in the course AI-Powered Search: Modern Retrieval for Humans & Agents with Doug Turnbull.

Doug Turnbull

Co-Author, AI-Powered Search

In 2012, Doug got bit by the search bug and he's still trying to keep up. From full-text search, to Learning to Rank models, to search agents that generate their own code, he knows the endless landscape first hand. Yet Doug wants to deeply understand the what / how / why, and help teams use these technologies practically, distinguishing hype from reality.

He’s led search at Reddit, Shopify, and Wikipedia, authored Relevant Search and AI Powered Search, and advised 100+ organizations over the years - all in pursuit of the same question: how does search actually work?

Previously at

Google
LinkedIn
Apple
Reddit
Shopify.com
See all products from AI-Powered Search

Sign up to join this lesson

By continuing, you agree to Maven's Terms and Privacy Policy.