Skip to content

Commit 4d7b10a

Browse files
address reviewer feedback
1 parent 53d9175 commit 4d7b10a

File tree

5 files changed

+45
-30
lines changed

5 files changed

+45
-30
lines changed

docs.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,23 @@
165165
"group": "AI-powered search",
166166
"pages": [
167167
"learn/ai_powered_search/getting_started_with_ai_search",
168-
"learn/ai_powered_search/conversational_search_with_chat",
169168
"learn/ai_powered_search/configure_rest_embedder",
170169
"learn/ai_powered_search/document_template_best_practices",
171170
"learn/ai_powered_search/image_search_with_user_provided_embeddings",
172171
"learn/ai_powered_search/search_with_user_provided_embeddings",
173172
"learn/ai_powered_search/retrieve_related_search_results",
174-
"learn/ai_powered_search/chat_tooling_reference",
175173
"learn/ai_powered_search/choose_an_embedder",
176174
"learn/ai_powered_search/difference_full_text_ai_search"
177175
]
178176
},
177+
{
178+
"group": "Conversational search",
179+
"pages": [
180+
"learn/ai_powered_search/getting_started_with_chat",
181+
"learn/ai_powered_search/chat_tooling_reference",
182+
"learn/ai_powered_search/conversational_search"
183+
]
184+
},
179185
{
180186
"group": "Self-hosted",
181187
"pages": [

guides/ai/getting_started_with_chat.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,10 @@ curl -N \
179179
}'
180180
```
181181

182-
Take particular note of the `tools` array. These settings ensure Meilisearch includes the relevant information in its database in the chat queries:
182+
Take particular note of the `tools` array. These settings are optional, but greatly improve user experience:
183183

184-
- **`_meiliSearchProgress`**: Shows users what searches are being performed
185-
- **`_meiliSearchSources`**: Provides the actual documents used to generate responses
186-
187-
If you do not include any tools in your request, the chat will only use the LLM's general knowledge and will not search your actual Meilisearch indexes.
184+
- **`_meiliSearchProgress`**: shows users what searches are being performed
185+
- **`_meiliSearchSources`**: displays the actual documents used to generate responses
188186

189187
## Build a chat interface using the OpenAI SDK
190188

@@ -263,7 +261,7 @@ import OpenAI from 'openai';
263261

264262
const client = new OpenAI({
265263
baseURL: 'http://localhost:7700/chats/my-assistant',
266-
apiKey: 'OPENAI_API_KEY',
264+
apiKey: 'MEILISEARCH_KEY',
267265
});
268266

269267
try {
@@ -287,7 +285,7 @@ from openai import OpenAI
287285

288286
client = OpenAI(
289287
base_url="http://localhost:7700/chats/my-assistant",
290-
api_key="OPENAI_API_KEY"
288+
api_key="MEILISEARCH_KEY"
291289
)
292290

293291
try:

learn/ai_powered_search/chat_tooling_reference.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,30 @@ description: An exhaustive reference of special chat tools supported by Meilisea
66
When creating your conversational search agent, you may be able to extend the model's capabilities with a number of tools. This page lists Meilisearch-specific tools that may improve user experience.
77

88
<Note>
9-
These special tools are handled internally by Meilisearch and are not forwarded to the LLM provider. They serve as a communication mechanism between Meilisearch and your application to provide enhanced user experience features.
9+
This is an experimental feature. Use the Meilisearch Cloud UI or the experimental features endpoint to activate it:
10+
11+
```sh
12+
curl \
13+
-X PATCH 'MEILISEARCH_URL/experimental-features/' \
14+
-H 'Content-Type: application/json' \
15+
--data-binary '{
16+
"chatCompletions": true
17+
}'
18+
```
1019
</Note>
1120

1221
## Meilisearch chat tools
1322

1423
For the best user experience, configure all following tools.
1524

16-
2. **Handle progress updates** by displaying search status to users during streaming
17-
3. **Append conversation messages** as requested to maintain context for future requests
18-
4. **Display source documents** to users for transparency and verification
19-
5. **Use the `call_id`** to associate progress updates with their corresponding source results
25+
1. **Handle progress updates** by displaying search status to users during streaming
26+
2. **Append conversation messages** as requested to maintain context for future requests
27+
3. **Display source documents** to users for transparency and verification
28+
4. **Use `call_id`** to associate progress updates with their corresponding source results
29+
30+
<Note>
31+
These special tools are handled internally by Meilisearch and are not forwarded to the LLM provider. They serve as a communication mechanism between Meilisearch and your application to provide enhanced user experience features.
32+
</Note>
2033

2134
### `_meiliSearchProgress`
2235

learn/ai_powered_search/conversational_search_with_chat.mdx renamed to learn/ai_powered_search/conversational_search.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Conversational search with chat
2+
title: Conversational search
33
sidebarTitle: Conversational search
44
description: Learn how to implement AI-powered conversational search using Meilisearch's chat feature
55
---
@@ -17,8 +17,6 @@ curl \
1717
"chatCompletions": true
1818
}'
1919
```
20-
21-
When you enable the chat route for the first time, Meilisearch creates a new API key named "Default Chat API Key".
2220
</Note>
2321

2422
## What is conversational search?
@@ -50,12 +48,14 @@ This approach bridges the gap between traditional search and modern AI experienc
5048
## When to use chat completions vs traditional search
5149

5250
### Use conversational search when:
51+
5352
- Users need direct answers to specific questions
5453
- Content is informational (documentation, knowledge bases, FAQs)
5554
- Users benefit from follow-up questions
5655
- Natural language interaction improves user experience
5756

5857
### Use traditional search when:
58+
5959
- Users need to browse multiple options
6060
- Results require comparison (e-commerce products, listings)
6161
- Exact matching is critical
@@ -68,7 +68,7 @@ The chat completions feature implements a complete Retrieval Augmented Generatio
6868
1. **Query understanding**: automatically transforms questions into search parameters
6969
2. **Hybrid retrieval**: combines keyword and semantic search for better relevancy
7070
3. **Answer generation**: uses your chosen LLM to generate responses
71-
4. **Context management**: maintains conversation history automatically
71+
4. **Context management**: maintains conversation history by constantly pushing the full conversation to the dedicated tool
7272

7373
### Alternative: MCP integration
7474

reference/api/chats.mdx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ curl \
1919
"chatCompletions": true
2020
}'
2121
```
22-
23-
When you enable the chat route for the first time, Meilisearch creates a new API key named "Default Chat API Key".
2422
</Note>
2523

2624
## Authorization
2725

2826
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.
2927

30-
Chat queries only search indexes its API key can access. The default chat API key has access to all indexes.
28+
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.
3129

3230
## Chat workspace object
3331

@@ -154,7 +152,7 @@ Retrieve the current settings for a chat workspace.
154152

155153
#### Response: `200 OK`
156154

157-
Returns the settings object without the `apiKey` field.
155+
Returns the settings object. For security reasons, the `apiKey` field is obfuscated.
158156

159157
```json
160158
{
@@ -172,7 +170,7 @@ Returns the settings object without the `apiKey` field.
172170
```bash cURL
173171
curl \
174172
-X GET 'http://localhost:7700/chats/WORKSPACE_UID/settings' \
175-
-H 'Authorization: Bearer MASTER_KEY'
173+
-H 'Authorization: Bearer MEILISEARCH_KEY'
176174
```
177175

178176
</CodeGroup>
@@ -209,7 +207,7 @@ If the workspace does not exist, querying this endpoint will create it.
209207
```json
210208
{
211209
"source": "openAi",
212-
"apiKey": "OPEN_AI_SECURITY_KEY",
210+
"apiKey": "OPEN_AI_API_KEY",
213211
"prompts": {
214212
"system": "DEFAULT CHAT INSTRUCTIONS"
215213
}
@@ -229,7 +227,7 @@ Returns the updated settings object. `apiKey` is write-only and will not be retu
229227
```bash openAi
230228
curl \
231229
-X PATCH 'http://localhost:7700/chats/customer-support/settings' \
232-
-H 'Authorization: Bearer MASTER_KEY' \
230+
-H 'Authorization: Bearer MEILISEARCH_KEY' \
233231
-H 'Content-Type: application/json' \
234232
--data-binary '{
235233
"source": "openAi",
@@ -243,7 +241,7 @@ curl \
243241
```bash azureOpenAi
244242
curl \
245243
-X PATCH 'http://localhost:7700/chats/customer-support/settings' \
246-
-H 'Authorization: Bearer MASTER_KEY' \
244+
-H 'Authorization: Bearer MEILISEARCH_KEY' \
247245
-H 'Content-Type: application/json' \
248246
--data-binary '{
249247
"source": "azureOpenAi",
@@ -261,7 +259,7 @@ curl \
261259
```bash mistral
262260
curl \
263261
-X PATCH 'http://localhost:7700/chats/customer-support/settings' \
264-
-H 'Authorization: Bearer MASTER_KEY' \
262+
-H 'Authorization: Bearer MEILISEARCH_KEY' \
265263
-H 'Content-Type: application/json' \
266264
--data-binary '{
267265
"source": "mistral",
@@ -275,7 +273,7 @@ curl \
275273
```bash gemini
276274
curl \
277275
-X PATCH 'http://localhost:7700/chats/customer-support/settings' \
278-
-H 'Authorization: Bearer MASTER_KEY' \
276+
-H 'Authorization: Bearer MEILISEARCH_KEY' \
279277
-H 'Content-Type: application/json' \
280278
--data-binary '{
281279
"source": "gemini",
@@ -289,7 +287,7 @@ curl \
289287
```bash vLlm
290288
curl \
291289
-X PATCH 'http://localhost:7700/chats/customer-support/settings' \
292-
-H 'Authorization: Bearer MASTER_KEY' \
290+
-H 'Authorization: Bearer MEILISEARCH_KEY' \
293291
-H 'Content-Type: application/json' \
294292
--data-binary '{
295293
"source": "vLlm",
@@ -334,7 +332,7 @@ Returns the settings object without the `apiKey` field.
334332
```bash cURL
335333
curl \
336334
-X DELETE 'http://localhost:7700/chats/customer-support/settings' \
337-
-H 'Authorization: Bearer MASTER_KEY'
335+
-H 'Authorization: Bearer MEILISEARCH_KEY'
338336
```
339337

340338
</CodeGroup>

0 commit comments

Comments
 (0)