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: fern/knowledge-base/migrating-from-trieve.mdx
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,6 +275,10 @@ Create a query tool using your file IDs:
275
275
276
276
For detailed instructions, see our [Query Tool documentation](/knowledge-base/using-query-tool).
277
277
278
+
<Warning>
279
+
**Don't forget**: You must update your assistant's system prompt to explicitly name the tool to use. Add instructions like: "When users ask about products or support topics, use the 'knowledge-search' tool to search the knowledge base." Replace 'knowledge-search' with your actual tool function name.
"description": "Migrated knowledge base from Trieve containing product documentation and support information",
295
+
"name": "product-support-documentation",
296
+
"description": "Contains comprehensive information about our products, services, features, pricing, and technical support documentation. Includes troubleshooting guides and company information.",
description:"Migrated knowledge base from Trieve containing product documentation and support information",
316
+
name:"product-support-documentation",
317
+
description:"Contains comprehensive information about our products, services, features, pricing, and technical support documentation. Includes troubleshooting guides and company information.",
just the toolIds field. This will overwrite any existing model configuration.
126
127
</Warning>
127
128
129
+
<Note>
130
+
**Don't forget**: After attaching the tool via API, you must also update your assistant's system prompt (in the `messages` array) to instruct when to use the tool by name. See the system prompt examples below.
131
+
</Note>
132
+
128
133
<Framecaption="Adding a query tool to your assistant">
@@ -143,31 +148,55 @@ You can configure multiple knowledge bases within a single query tool:
143
148
{
144
149
"provider": "google",
145
150
"name": "product-documentation",
146
-
"description": "Use this knowledge base for product specificationsand features",
151
+
"description": "Contains detailed product specifications, feature descriptions, and technical details",
147
152
"fileIds": ["file-id-1", "file-id-2"]
148
153
},
149
154
{
150
155
"provider": "google",
151
156
"name": "troubleshooting-guide",
152
-
"description": "Use this knowledge base for troubleshooting and support questions",
157
+
"description": "Contains troubleshooting guides, support procedures, and problem resolution steps",
153
158
"fileIds": ["file-id-3", "file-id-4"]
154
159
}
155
160
]
156
161
```
157
162
158
163
### **Knowledge Base Description**
159
164
160
-
The description field helps your assistant understand when to use a particular knowledge base. Make it specific and clear:
165
+
The description field should explain what content the knowledge base contains:
161
166
162
167
```json
163
-
"description": "Use this knowledge base when the user asks about pricing, subscription plans, or billing information"
168
+
"description": "Contains pricing information, subscription plans, and billing documentation"
164
169
```
165
170
171
+
### **Assistant System Prompt Integration**
172
+
173
+
<Warning>
174
+
**Important**: You must explicitly instruct your assistant in its system prompt about when to use the query tool. The knowledge base description alone is not sufficient for the assistant to know when to search.
175
+
</Warning>
176
+
177
+
Add clear instructions to your assistant's system messages, **explicitly naming the tool**:
178
+
179
+
```json
180
+
{
181
+
"role": "system",
182
+
"content": "You are a helpful customer support assistant. When users ask about products, pricing, features, or need troubleshooting help, use the 'knowledge-search' tool to search our knowledge base for accurate information. Always call the knowledge-search tool before providing answers to ensure accuracy."
183
+
}
184
+
```
185
+
186
+
<Note>
187
+
**Be specific**: Replace `'knowledge-search'` with your actual tool's function name from the query tool configuration.
188
+
</Note>
189
+
190
+
**Example system prompt instructions with specific tool names:**
191
+
-**Product Support**: "When users ask about product features, specifications, or troubleshooting, use the 'product-support-search' tool to find relevant information."
192
+
-**Billing Questions**: "For any questions about pricing, billing, or subscription plans, use the 'billing-query' tool to find the most current information."
193
+
-**Technical Documentation**: "When users need API documentation, code examples, or integration help, use the 'api-docs-search' tool to search the technical knowledge base."
194
+
166
195
## **Best Practices for Query Tool Configuration**
167
196
168
197
-**Organize by topic**: Create separate knowledge bases for distinct topics to improve retrieval accuracy.
169
198
-**Use descriptive names**: Name your knowledge bases clearly to help your assistant understand their purpose.
170
-
-**Keep descriptions specific**: Write clear descriptions that tell the assistant exactly when to use each knowledge base.
199
+
-**Include system prompt instructions**: Always add explicit instructions to your assistant's system prompt about when to use the query tool.
171
200
-**Update regularly**: Refresh your knowledge bases as information changes to ensure accuracy.
172
201
-**Test thoroughly**: After configuration, test your assistant with various queries to ensure it retrieves information correctly.
0 commit comments