Skip to content

Commit 2417ebc

Browse files
improve reference, add hallucination warnings
1 parent 6cf1834 commit 2417ebc

File tree

3 files changed

+82
-28
lines changed

3 files changed

+82
-28
lines changed

learn/chat/conversational_search.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ Meilisearch's chat completions API consolidates RAG creation into a single proce
4646

4747
Follow the [chat completions tutorial](/learn/chat/getting_started_with_chat) for information on how to implement a RAG with Meilisearch.
4848

49+
<Warning>
50+
Conversational search is still in early development. Conversational agents may occasionally hallucinate innacurate and misleading information, so it is important to closely monitor it in production environments.
51+
</Warning>
52+
4953
### Model Context Protocol (MCP)
5054

5155
An alternative method is using a Model Context Protocol (MCP) server. MCPs are designed for broader uses that go beyond answering questions, but can be useful in contexts where having up-to-date data is more important than comprehensive answers.

learn/chat/getting_started_with_chat.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ curl \
2929
}'
3030
```
3131

32+
<Warning>
33+
Conversational search is still in early development. Conversational agents may occasionally hallucinate innacurate and misleading information, so it is important to closely monitor it in production environments.
34+
</Warning>
35+
3236
### Find your chat API key
3337

3438
When Meilisearch runs with a master key on an instance created after v1.15.1, it automatically generates a "Default Chat API Key" with `chatCompletions` and `search` permissions on all indexes. Check if you have the key using:

reference/api/chats.mdx

Lines changed: 74 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ curl \
2121
```
2222
</Note>
2323

24+
<Warning>
25+
Conversational search is still in early development. Conversational agents may occasionally hallucinate innacurate and misleading information, so it is important to closely monitor it in production environments.
26+
</Warning>
27+
2428
## Authorization
2529

26-
When working with a secure Meilisearch instance, Use an API key with access to both the `search` and `chatCompletions` actions, such as the default chat API key. You may also use tenant tokens instead of an API key, provided you generate the tokens with access to the required actions.
30+
When implementing conversational search, use an API key with access to both the `search` and `chatCompletions` actions such as the default chat API key. You may also use tenant tokens instead of an API key, provided you generate the tokens with access to the required actions.
2731

2832
Chat queries only search indexes its API key can access. The default chat API key has access to all indexes. To limit chat access to specific indexes, you must either create a new key, or [generate a tenant token](/learn/security/generate_tenant_token_sdk) from the default chat API key.
2933

30-
LLM credentials used to querying your AI provider are stored securely in the chat workspace settings.
31-
3234
## Chat workspace object
3335

3436
```json
@@ -89,7 +91,7 @@ List all chat workspaces. Results can be paginated by using the `offset` and `li
8991

9092
<RouteHighlighter method="GET" path="/chats/{workspace_uid}" />
9193

92-
Get information about a workshop.
94+
Get information about a workspace.
9395

9496
### Path parameters
9597

@@ -131,16 +133,60 @@ Get information about a workshop.
131133
}
132134
```
133135

134-
#### The prompts object
136+
#### `source`
135137

136-
```json
137-
{
138-
"system": "Description of the general search context",
139-
"searchDescription": "Description of internal search processes",
140-
"searchQParam": "Description of expected input inside `q`",
141-
"searchIndexUidParam": "Description of content inside each accessible index"
142-
}
143-
```
138+
**Type**: String<br />
139+
**Default value**: N/A<br />
140+
**Description**: Name of the chosen embeddings provider. Must be one of: `"openAi"`, `"azureOpenAi"`, `"mistral"`, `"gemini"`, or `"vLlm"`
141+
142+
#### `orgId`
143+
144+
**Type**: String<br />
145+
**Default value**: N/A<br />
146+
**Description**: Organization ID used to access the LLM provider. Required for Azure OpenAI, incompatible with other sources
147+
148+
#### `projectId`
149+
150+
**Type**: String<br />
151+
**Default value**: N/A<br />
152+
**Description**: Project ID used to access the LLM provider. Required for Azure OpenAI, incompatible with other sources
153+
154+
#### `apiVersion`
155+
156+
**Type**: String<br />
157+
**Default value**: N/A<br />
158+
**Description**: API version used by the LLM provider. Required for Azure OpenAI, incompatible with other sources
159+
160+
#### `deploymentId`
161+
162+
**Type**: String<br />
163+
**Default value**: N/A<br />
164+
**Description**: Deployment ID used by the LLM provider. Required for Azure OpenAI, incompatible with other sources
165+
166+
#### `baseUrl`
167+
168+
**Type**: String<br />
169+
**Default value**: N/A<br />
170+
**Description**: Base URL Meilisearch should target when sending requests to the embeddings provider. Required for Azure OpenAI and vLLM
171+
172+
#### `apiKey`
173+
174+
**Type**: String<br />
175+
**Default value**: N/A<br />
176+
**Description**: API key to access the LLM provider. Optional for vLLM, mandatory for all other providers
177+
178+
#### `prompts`
179+
180+
**Type**: Object<br />
181+
**Default value**: N/A<br />
182+
**Description**: Prompts giving baseline context to the conversational agent.
183+
184+
The prompts object accepts the following fields:
185+
186+
- `prompts.system`: Default prompt giving the general usage context of the conversational search agent. Example: "You are a helpful bot answering questions on how to use Meilisearch"
187+
- `prompts.searchDescription`: An internal description of the Meilisearch chat tools. Use it to instruct the agent on how and when to use the configured tools. Example: "Tool for retrieving relevant documents. Use it when users ask for factual information, past records, or resources that might exist in indexed content."
188+
- `prompts.QParam`: Description of expected user input and the desired output. Example: "Users will ask about Meilisearch. Provide short and direct keyword-style queries."
189+
- `prompts.IndexUidParam`: Instructions describing each index the agent has access to and how to use them. Example: "If user asks about code or API or parameters, use the index called `documentation`."
144190

145191
### Get chat workspace settings
146192

@@ -189,31 +235,31 @@ If a workspace does not exist, querying this endpoint will create it.
189235

190236
#### Path parameters
191237

192-
| Name | Type | Description |
193-
| :-------------- | :----- | :----------------------------------- |
238+
| Name | Type | Description |
239+
| :------------------ | :----- | :----------------------------------- |
194240
| **`workspace_uid`** | String | The workspace identifier |
195241

196242
#### Settings parameters
197243

198244
| Name | Type | Description |
199245
| :---------------- | :----- | :---------------------------------------------------------------------------- |
200-
| **`source`** | String | LLM source: `"openAi"`, `"azureOpenAi"`, `"mistral"`, `"gemini"`, or `"vLlm"` |
201-
| **`orgId`** | String | Organization ID for the LLM provider (required for azureOpenAi) |
202-
| **`projectId`** | String | Project ID for the LLM provider |
203-
| **`apiVersion`** | String | API version for the LLM provider (required for azureOpenAi) |
204-
| **`deploymentId`**| String | Deployment ID for the LLM provider (required for azureOpenAi) |
205-
| **`baseUrl`** | String | Base URL for the provider (required for azureOpenAi and vLlm) |
206-
| **`apiKey`** | String | API key for the LLM provider (optional for vLlm) |
207-
| **`prompts`** | Object | Prompts object containing system prompts and other configuration |
246+
| [`source`](#source) | String | LLM source: `"openAi"`, `"azureOpenAi"`, `"mistral"`, `"gemini"`, or `"vLlm"` |
247+
| [`orgId`](#orgid) | String | Organization ID for the LLM provider |
248+
| [`projectId`](#projectid) | String | Project ID for the LLM provider |
249+
| [`apiVersion`](#apiversion) | String | API version for the LLM provider |
250+
| [`deploymentId`](#deploymentid) | String | Deployment ID for the LLM provider |
251+
| [`baseUrl`](#baseurl) | String | Base URL for the provider |
252+
| [`apiKey`](#apikey) | String | API key for the LLM provider |
253+
| [`prompts`](#prompts) | Object | Prompts object containing system prompts and other configuration |
208254

209255
##### Prompt parameters
210256

211257
| Name | Type | Description |
212258
| :------------------------ | :----- | :---------------------------------------------------------------- |
213-
| **`system`** | String | A prompt added to the start of the conversation to guide the LLM |
214-
| **`searchDescription`** | String | A prompt to explain what the internal search function does |
215-
| **`searchQParam`** | String | A prompt to explain what the `q` parameter of the search function does and how to use it |
216-
| **`searchIndexUidParam`** | String | A prompt to explain what the `indexUid` parameter of the search function does and how to use it |
259+
| [`system]` (#prompts) | String | A prompt added to the start of the conversation to guide the LLM |
260+
| [`searchDescription`](#prompts) | String | A prompt to explain what the internal search function does |
261+
| [`searchQParam`](#prompts) | String | A prompt to explain what the `q` parameter of the search function does and how to use it |
262+
| [`searchIndexUidParam`](#prompts) | String | A prompt to explain what the `indexUid` parameter of the search function does and how to use it |
217263

218264
#### Request body
219265

@@ -379,7 +425,7 @@ Create a chat completion using Meilisearch's OpenAI-compatible interface. The en
379425

380426
| Name | Type | Required | Description |
381427
| :------------- | :------ | :------- | :--------------------------------------------------------------------------- |
382-
| **`model`** | String | Yes | Model to use and will be related to the source LLM in the workspace settings |
428+
| **`model`** | String | Yes | Model the agent should use when generating responses |
383429
| **`messages`** | Array | Yes | Array of message objects with `role` and `content` |
384430
| **`stream`** | Boolean | No | Enable streaming responses. Must be `true` if specified |
385431

0 commit comments

Comments
 (0)