Skip to main content
Each index you want to make available to conversational search must have its chat settings configured. These settings tell the LLM what the index contains, how to format document data, and what search parameters to use.
chat is an index-level setting, distinct from the workspace-level configuration that connects Meilisearch to an LLM provider. Workspace settings define the model, API key, and global prompts; index chat settings describe each individual index to the LLM and control how it is queried. Both must be configured: first set up a workspace, then configure chat settings on every index you want the agent to access.

Update chat settings

Use the /indexes/{index_uid}/settings/chat endpoint to configure chat settings for an index:

Settings reference

Description

The description field is the most important setting. It tells the LLM what the index contains, so it can decide which index to search when answering a question. A well-written description significantly improves answer relevance. Write your description as if you were explaining the index to a person who has never seen your data:
If you have multiple indexes, make each description specific enough that the LLM can distinguish between them. For example:
  • movies index: “A movie database with titles, overviews, genres, and ratings”
  • actors index: “A database of actors with names, biographies, and filmographies”
  • reviews index: “User-submitted movie reviews with ratings and comments”

Document template

The documentTemplate field is a Liquid template that defines what data Meilisearch sends to the LLM for each matching document. By default, Meilisearch sends all searchable fields, which may not be ideal if your documents have many fields. A good document template includes only the fields relevant to answering questions:
The documentTemplateMaxBytes field truncates the rendered template to a maximum size in bytes (default 400). This ensures a good balance between context quality and response speed. Increase this value if your documents contain long text fields that are important for answering questions. For more guidance, see the document template best practices article.

Search parameters

The searchParameters object controls how the LLM searches the index. This is useful for enabling hybrid search, limiting the number of results, or applying default sorting.

Available parameters

If you have configured embedders on your index, enable hybrid search in chat to combine keyword and semantic search:
A semanticRatio of 0.7 favors semantic search while still using keyword matching. Adjust this value based on your data and query patterns.

Retrieve current settings

Get the current chat settings for an index:

Reset settings

Reset chat settings to their defaults:

Next steps