Typesense tutorial: build conversational search locally

Learn how to combine keyword and vector search with Typesense and Next.js, using a local book search demo with 10,000 records.

Player not loading? Watch on YouTube

This tutorial explains a conversational search implementation built with Typesense, JavaScript and Next.js. The speaker describes a setup that runs locally and uses a Hugging Face model to turn text into embeddings. Typesense stores those vectors alongside book records and combines lexical matching with semantic retrieval. Typesense sponsored the video.

The walkthrough starts with query intent: extracting topics, authors and constraints from plain English before searching. Lexical search handles exact terms, typo tolerance and synonyms, while vector search finds related material whose wording differs. The speaker uses psychology and human behavior as an example of that relationship.

The implementation defines a book collection with titles, authors, publication years, ratings and optional embedding vectors, then loads a dataset of 10,000 books. A request to the local server combines keyword and vector results and reranks the matches. The tutorial also explains how an embedding model represents queries and documents for similarity searches.

The parser is a demonstration component; the speaker recommends replacing it with a small NLP layer for production. Other suggestions include caching frequent queries at the API layer, debouncing input and reusing the last query embedding during edits. The focus is retrieval and result presentation, rather than a general-purpose chatbot.