Live demo: talk-with-lex.vercel.app

Key features
- Passages as documents: Each document is about one minute of speech (110 to 190 words) that never mixes two speakers. It keeps its episode, guest, speaker, chapter, and start time, so every result can point to
youtube.com/watch?v=…&t=…s. - Exact phrases and typos: Wrapping a query in double quotes, such as
"love is the answer", runs a phrase search that returns the 7 moments where it was said. A misspelledDostoyevskistill finds Dostoevsky thanks to typo tolerance. - Words to meaning slider: The slider sets the
semanticRatioof a hybrid search. The embedder is a HuggingFace model (BAAI/bge-small-en-v1.5) running inside Meilisearch, so a query like “afraid to die” finds conversations about mortality that never use those words. - Who said it: A filter on the
isLexfield keeps only Lex’s own words or only his guests, and facet counts show how many passages each side has. A guest list uses facet search to type-ahead across more than 350 guests. - One result per episode: A toggle adds
distinct: "episodeId"to the query, so each episode appears once with its best passage. Because facets are then counted per episode, a second query withoutdistinctin the same multi-search request provides the “+18 more moments in this episode” counts. See distinct attribute. - Conversation around a hit: Expanding a result filters on the same
episodeIdand apositionrange, sorted byposition, to show the passages just before and after. - Chat with the archive: The chat page uses the chats API. The model searches the transcripts on its own, often several times per question, and cites the second each claim comes from. The interface lists the searches it ran and the passages it read, as described in display source documents.
- Chat with one episode: The same chat, restricted to a single episode by a tenant token whose search rule filters on
episodeId. The model cannot retrieve passages from any other episode.
Example search and conversation
- Search
meaning of lifeand choose “Lex”: Returns only the questions Lex asked about the meaning of life, each with the timestamp and the chapter it belongs to. - Turn on “One per episode”: The list switches from passages to episodes, and each result shows how many other matching moments its episode contains.
- Ask the chat “What does Lex think love is?”: The model runs searches such as “what is love” and “love is the answer”, each with the filter
isLex = true, then answers with links that jump to the moments it quotes.
How it works
The application is a Next.js app. Search requests go through API routes that use a read-only API key scoped to the two indexes. For chat, the server hands the browser a short-lived tenant token, and the browser streams the answer straight from Meilisearch:Link field of the passage, and the index chat settings render each passage with its episode, speaker, chapter, timestamp, and link. The whole configuration, including settings, synonyms, embedder, and chat prompts, lives in a single setup script in the repository.
To build a conversational search on your own data, follow the agentic search getting started guide.
Links
Try the demo
Find a moment or ask the archive a question
Source code
Next.js application and data pipeline on GitHub
Chats API
Conversational search with the /chats route
Hybrid search
Combine keyword and semantic search