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
{{ message }}
This repository was archived by the owner on Sep 29, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: packages/chatbot-server-mongodb-public/evalCases/system_prompt_conversations.yml
+40Lines changed: 40 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,43 @@
1
+
- name: default_system_prompt_fetch_fallback
2
+
messages:
3
+
- role: user
4
+
content: use this https://www.geeksforgeeks.org/mongodb/search-text-in-mongodb/ how do I do a vector search query
5
+
expectation: The response should let the user know if the fallback search was used.
6
+
expectedPromptAdherence:
7
+
- The response provides a disclaimer that the provided URL did not contain relevant information and that the knowledge base was searched instead.
8
+
tags:
9
+
- fetch_page
10
+
- systemPromptAdherence
11
+
- name: default_system_prompt_no_fetch_fallback
12
+
messages:
13
+
- role: user
14
+
content: What is the Atlas Architecture Center?
15
+
expectation: The response should not say a search was performed.
16
+
expectedPromptAdherence:
17
+
- The response does not say that a search was performed or mention that they used a "knowledge base". It is OK if the response is "I don't know" or similar.
18
+
tags:
19
+
- fetch_page
20
+
- systemPromptAdherence
21
+
- name: default_system_prompt_no_fetch_fallback_2
22
+
messages:
23
+
- role: user
24
+
content: How does voyage3.5 compare to voyage-3?
25
+
expectation: The response should not say a search was performed.
26
+
expectedPromptAdherence:
27
+
- The response does not say that a search was performed or mention that they used a "knowledge base". It is OK if the response is "I don't know" or similar.
28
+
tags:
29
+
- fetch_page
30
+
- systemPromptAdherence
31
+
- name: default_system_prompt_no_fetch_fallback_3
32
+
messages:
33
+
- role: user
34
+
content: What are the core values of MongoDB?
35
+
expectation: The response should not say a search was performed.
36
+
expectedPromptAdherence:
37
+
- The response does not say that a search was performed or mention that they used a "knowledge base". It is OK if the response is "I don't know" or similar.
"You should also transform the user query into a fully formed question, if relevant.",
61
65
];
62
66
63
-
constsearchContentToolNotes=[
64
-
"Search all of the available MongoDB reference documents for a given user input.",
65
-
"You must generate an appropriate search query for a given user input.",
66
-
"You are doing this for MongoDB, and all queries relate to MongoDB products.",
67
-
`Only generate ONE ${SEARCH_TOOL_NAME} tool call per user message unless there are clearly multiple distinct queries needed to answer the user query.`,
67
+
constcoordinateToolNotes=[
68
+
`When deciding whether to call ${FETCH_PAGE_TOOL_NAME}, DO NOT ASSUME that the user wants to use the ${FETCH_PAGE_TOOL_NAME} based on the pageUrl in the Front Matter.`,
69
+
`The ${FETCH_PAGE_TOOL_NAME} tool should only be used if the user asks you to reference the page they are on (e.g. "Use the page I'm on..."), or if the user explicitly provides a URL in their question.`,
70
+
`If the ${FETCH_PAGE_TOOL_NAME} tool returns the string "${SEARCH_ALL_FALLBACK_TEXT}", you MUST immediately call the ${SEARCH_TOOL_NAME} tool.`,
68
71
];
69
72
70
-
constfetchPageToolNotes=[
71
-
"Fetch the entire page content for a given URL.",
72
-
`Do not assume that the user wants to use the ${FETCH_PAGE_TOOL_NAME} based on the URL in the Front Matter. The ${FETCH_PAGE_TOOL_NAME} should ONLY be used if the user implies you should look on the page or if the user explicitly provides a URL in their question.`,
73
-
`If the user provides URLs in their query, ONLY call the ${FETCH_PAGE_TOOL_NAME} for those URLs, and do NOT call the ${FETCH_PAGE_TOOL_NAME} for the URL in the Front Matter.`,
74
-
"Sometimes, when a page is very long, a search will be performed over the page. Therefore, you must also provide a search query to the tool.",
75
-
"Do not include URLs in the search query.",
76
-
`If the ${FETCH_PAGE_TOOL_NAME} tool returns the string "${SEARCH_ALL_FALLBACK_TEXT}", you MUST immediately call the ${SEARCH_TOOL_NAME} tool.`,
73
+
consttoolUseDisclaimers=[
74
+
`If you called the ${FETCH_PAGE_TOOL_NAME} tool and it returned the string "${SEARCH_ALL_FALLBACK_TEXT}", you must tell the user in your final answer: "I couldn't use that page to answer your question, so I searched my knowledge base to find an answer."`,
`Remember - do not assume that the user wants to use the ${FETCH_PAGE_TOOL_NAME} based on the pageUrl in the Front Matter. Only call this tool when specifically instructed to use a certain page.`,
46
+
`If the user provides multiple URLs in their query, call the ${FETCH_PAGE_TOOL_NAME} once for each URL, and do not call the ${FETCH_PAGE_TOOL_NAME} for the URL in the Front Matter.`,
47
+
"Sometimes, when a page is very long, a search will be performed over the page. Therefore, you must also provide a search query to the tool.",
48
+
"Do not include URLs in the search query.",
49
+
];
50
+
41
51
exportfunctionmakeFetchPageTool({
42
52
loadPage,
43
53
findContent,
@@ -47,7 +57,9 @@ export function makeFetchPageTool({
47
57
}: MakeFetchPageToolParams): FetchPageTool{
48
58
returntool({
49
59
inputSchema: MongoDbFetchPageToolArgsSchema,
50
-
description: "Fetch all content for a specific URL",
60
+
description: `Fetches the entire page contents for a specific URL. Use this tool as follows:
"Search all of the available MongoDB reference documents for a given user input.",
62
+
"You must generate an appropriate search query for a given user input.",
63
+
"You are doing this for MongoDB, and all queries relate to MongoDB products.",
64
+
`Only generate ONE ${SEARCH_TOOL_NAME} tool call per user message unless there are clearly multiple distinct queries needed to answer the user query.`,
65
+
];
66
+
59
67
exportfunctionmakeSearchTool({
60
68
findContent,
61
69
makeReferences,
62
70
}: MakeSearchToolParams): SearchTool{
63
71
constsearchTool: SearchTool=tool({
64
72
inputSchema: MongoDbSearchToolArgsSchema,
65
-
description: "Search MongoDB content",
73
+
description: `Search MongoDB content. Use the ${SEARCH_TOOL_NAME} tool as follows:
0 commit comments