# Natural Language Search restaurants
This demo restaurant search showcases the Natural Language Search feature of Typesense. This allows users to type a free-form sentence into the search bar. Typesense then leverages Large Language Models (LLMs) to understand users' intent, automatically translating the natural language query into structured search parameters like filters, sort orders, and relevant keywords.
This implementation uses Next.js 14 App Router for the front end, typesense-js (opens new window) client SDK for sending queries to Typesense, TanStack query (opens new window) for infinite scroll pagination, and gemini-2.5-flash-lite (opens new window) as the natural language search model.
Live Demo (opens new window) | Source Code (opens new window)
# Key Highlights
- Here's (opens new window) how to configure Typesense to create or update the natural language search model.
- Here's (opens new window) an example of using a custom system prompt to fine-tune the model's behaviorfor this specific restaurant collection.
- Here's (opens new window) how to perform a natural language search query using the typesense-js (opens new window) client SDK.
- Here's (opens new window) how to implement pagination using the generated params of the initial search request.
- Here's (opens new window) an example use case where the user's location is embedded in the query to enable geosearch for nearby restaurants.