Problem
Shortwave, an email client, wanted an assistant that answers almost any question about a user's inbox: past correspondence, calendar, receipts, drafts. Traditional mailbox search had always fallen short of this. A single prompt cannot hold the whole mailbox, so the system must pick the right data. A question often matches a thousand or more candidate emails.
Example from the article: in a chat about a flight to Phoenix, the user asks "What about Jonny?". The question means nothing on its own and must become "When does Jonny land in Phoenix?" before any search.
Solution in brief
One strong LLM writes the final answer from one large prompt. Before it, an LLM picks which data sources ("tools") are needed and the tools fetch data in parallel. The email tool rewrites the query, combines full-text, metadata and embedding search, then re-ranks with heuristics and a cross-encoder.
Questions this case answers
- How to answer free-form questions over a large private per-user text corpus when keyword search alone misses relevant items
- How to route a question to the right mix of heterogeneous data sources when one LLM call must produce the final answer
- How to rank thousands of retrieved candidates down to a prompt-sized set within a few seconds while respecting dates, names and recency in the question
- How to build an assistant that answers questions about a user's whole email history, not just the open thread?
Tools and methods
- Tool selection — an LLM returns zero, one or several data sources to load.
- Query reformulation — an LLM rewrites a context-dependent question into a standalone one.
- LLM feature extraction — parallel fast-LLM calls pull dates, names, labels and recency from the query.
- Hybrid search — Elasticsearch full-text and metadata plus Pinecone vector search.
- Two-phase re-ranking — rule-based heuristics, then a cross-encoder.
Google or a one-time email code. No password.