You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn/chat/conversational_search.mdx
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,29 @@
1
1
---
2
2
title: What is conversational search?
3
-
description: Conversational search is an AI-powered feature that allows users to ask questions in everyday language and receive answers based on the information in Meilisearch's indexes
3
+
description: Conversational search allows people to make search queries using natural languages.
4
4
---
5
5
6
+
Conversational search is an AI-powered search feature that allows users to ask questions in everyday language and receive answers based on the information in Meilisearch's indexes.
7
+
6
8
## When to use conversational vs traditional search
7
9
8
10
Use conversational search when:
9
11
10
12
- Users need easy-to-read answers to specific questions
11
-
- You are handling informational-dense content, such as software documentation and knowledge bases
13
+
- You are handling informational-dense content, such as knowledge bases
12
14
- Natural language interaction improves user experience
13
15
14
16
Use traditional search when:
15
17
16
18
- Users need to browse multiple options, such as an ecommerce website
17
-
-Approximative answers are not acceptable
19
+
-Approximate answers are not acceptable
18
20
- Your users need very quick responses
19
21
20
-
## How conversational search usage differs from traditional search
22
+
<Warning>
23
+
Conversational search is still in early development. Conversational agents may occasionally hallucinate inaccurate and misleading information, so it is important to closely monitor it in production environments.
24
+
</Warning>
25
+
26
+
## Conversational search user workflow
21
27
22
28
### Traditional search workflow
23
29
@@ -46,10 +52,6 @@ Meilisearch's chat completions API consolidates RAG creation into a single proce
46
52
47
53
Follow the [chat completions tutorial](/learn/chat/getting_started_with_chat) for information on how to implement a RAG with Meilisearch.
48
54
49
-
<Warning>
50
-
Conversational search is still in early development. Conversational agents may occasionally hallucinate inaccurate and misleading information, so it is important to closely monitor it in production environments.
51
-
</Warning>
52
-
53
55
### Model Context Protocol (MCP)
54
56
55
57
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.
Copy file name to clipboardExpand all lines: learn/chat/getting_started_with_chat.mdx
+21-20Lines changed: 21 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Getting started with conversational search
3
3
description: This article walks you through implementing Meilisearch's chat completions feature to create conversational search experiences in your application.
4
4
---
5
5
6
-
To successfully implement a conversational search interface you must follow three steps: configure indexes for chat usage, create chat workspaces targeting different use-cases, and building a chat interface.
6
+
To successfully implement a conversational search interface you must follow three steps: configure indexes for chat usage, create a chat workspaces, and build a chat interface.
@@ -38,19 +38,19 @@ Conversational search is still in early development. Conversational agents may o
38
38
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:
39
39
40
40
```bash
41
-
curl http://localhost:7700/keys \
41
+
curl MEILISEARCH_URL/keys \
42
42
-H "Authorization: Bearer MEILISEARCH_KEY"
43
43
```
44
44
45
-
Look for the key with the description "Default Chat API Key" Use this key when querying the `/chats` endpoint.
45
+
Look for the key with the description "Default Chat API Key".
46
46
47
47
#### Troubleshooting: Missing default chat API key
48
48
49
49
If your instance does not have a Default Chat API Key, create one manually:
50
50
51
51
```bash
52
52
curl \
53
-
-X POST 'http://localhost:7700/keys' \
53
+
-X POST 'MEILISEARCH_URL/keys' \
54
54
-H 'Authorization: Bearer MEILISEARCH_KEY' \
55
55
-H 'Content-Type: application/json' \
56
56
--data-binary '{
@@ -68,7 +68,7 @@ After activating the `/chats` route and obtaining an API key with chat permissio
-`description` gives the initial context of the conversation to the LLM. A good description improves relevance of the chat's answers
84
-
-`documentTemplate` defines the document data Meilisearch sends to the AI provider. Consult the best [document template best practices](/learn/ai_powered_search/document_template_best_practices) article for more guidance
84
+
-`documentTemplate` defines the document data Meilisearch sends to the AI provider. This template outputs all searchable fields in your documents, which may not be ideal if your documents have many fields. Consult the best [document template best practices](/learn/ai_powered_search/document_template_best_practices) article for more guidance
85
+
-`documentTemplateMaxBytes` establishes a size limit for the document templates. Documents bigger than 400 bytes are truncated to ensure a good balance between speed and relevancy
85
86
86
87
## Configure a chat completions workspace
87
88
88
89
The next step is to create a workspace. Chat completion workspaces are isolated configurations targeting different use cases. Each workspace can:
89
90
90
-
- Use different embedding providers (openAi, azureOpenAi, mistral, gemini, vLlm)
91
+
- Use different embedding providers (OpenAI, Azure OpenAI, Mistral, Gemini, vLLM)
91
92
- Establish separate conversation contexts via baseline prompts
92
93
- Access a specific set of indexes
93
94
@@ -99,7 +100,7 @@ Create a workspace setting your LLM provider as its `source`:
Which fields are mandatory will depend on your chosen provider `source`. In most cases, you will have to provide an `apiKey` to access the provider.
175
176
176
-
`baseUrl` indicates the URL Meilisearch queries when users submit questions to your chat interface.
177
+
`baseUrl` indicates the URL Meilisearch queries when users submit questions to your chat interface. This is only mandatory for Azure OpenAI and vLLM sources.
177
178
178
-
`prompts.system` gives the conversational search bot the baseline context of your users and their questions. The `prompts` object accepts a few other fields that provide more information to improve how the agent uses the information it finds via Meilisearch. In real-life scenarios filling these fields would improve the quality of conversational search results.
179
+
`prompts.system` gives the conversational search bot the baseline context of your users and their questions. [The `prompts` object accepts a few other fields](/reference/api/chats#prompts) that provide more information to improve how the agent uses the information it finds via Meilisearch. In real-life scenarios filling these fields would improve the quality of conversational search results.
179
180
180
181
## Send your first chat completions request
181
182
182
183
You have finished configuring your conversational search agent. To test everything is working as expected, send a streaming `curl` query to the chat completions API route:
183
184
184
185
```bash
185
186
curl -N \
186
-
-X POST 'http://localhost:7700/chats/WORKSPACE_NAME/chat/completions' \
187
+
-X POST 'MEILISEARCH_URL/chats/WORKSPACE_NAME/chat/completions' \
187
188
-H 'Authorization: Bearer MEILISEARCH_API_KEY' \
188
189
-H 'Content-Type: application/json' \
189
190
--data-binary '{
@@ -243,7 +244,7 @@ Integrating Meiliearch and the OpenAI SDK with JavaScript would look lik this:
0 commit comments