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: backend/prompts/managed_system_prompt_template_en.yaml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,8 @@ system_prompt: |-
61
61
- Write code in simple Python
62
62
- Follow Python coding standards and Python syntax
63
63
- Call tools correctly according to format specifications
64
+
- To distinguish between code execution and displaying user code, use 'Code: \n```<RUN>\n' to start executing code and '```<END_CODE>' to indicate its completion. Use 'Code: \n```<DISPLAY:language_type>\n' to start displaying code and '```<END_CODE>' to indicate its completion.
65
+
- Note that executed code is not visible to users. If users need to see the code, use 'Code: \n```<DISPLAY:language_type>\n' as the start and '```<END_CODE>' to denote displayed code.
64
66
65
67
3. Observe Results:
66
68
- View code execution results
@@ -99,7 +101,7 @@ system_prompt: |-
99
101
{{ constraint }}
100
102
101
103
### Python Code Specifications
102
-
1. If it is considered to be code that needs to be executed, the code content begins with 'code: \n```py\n' and ends with '```<end_code>'. If the code does not need to be executed for display only, the code content begins with 'code:\n```code:language_type\n', and ends with '```<end_code>', where language_type can be python, java, javascript, etc;
104
+
1. If it is considered to be code that needs to be executed, the code content begins with 'code: \n```<RUN>\n' and ends with '```<END_CODE>'. If the code does not need to be executed for display only, the code content begins with 'code:\n```<DISPLAY:language_type>\n', and ends with '```<END_CODE>', where language_type can be python, java, javascript, etc;
103
105
2. Only use defined variables, variables will persist between multiple calls;
104
106
3. Use "print()" function to let the next model call see corresponding variable information;
105
107
4. Use tool input parameters correctly, use keyword arguments, not dictionary format;
Copy file name to clipboardExpand all lines: backend/prompts/manager_system_prompt_template_en.yaml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,8 @@ system_prompt: |-
62
62
- Write code in simple Python
63
63
- Follow Python coding standards and Python syntax
64
64
- Correctly call tools or agents to solve problems
65
+
- To distinguish between code execution and displaying user code, use 'Code: \n```<RUN>\n' to start executing code and '```<END_CODE>' to indicate its completion. Use 'Code: \n```<DISPLAY:language_type>\n' to start displaying code and '```<END_CODE>' to indicate its completion.
66
+
- Note that executed code is not visible to users. If users need to see the code, use 'Code: \n```<DISPLAY:language_type>\n' as the start and '```<END_CODE>' to denote displayed code.
65
67
66
68
3. Observe Results:
67
69
- View code execution results
@@ -127,7 +129,7 @@ system_prompt: |-
127
129
{{ constraint }}
128
130
129
131
### Python Code Specifications
130
-
1. If it is considered to be code that needs to be executed, the code content begins with 'code: \n```py\n' and ends with '```<end_code>'. If the code does not need to be executed for display only, the code content begins with 'code: \n```code:language_type\n', and ends with '```<end_code>', where language_type can be python, java, javascript, etc;
132
+
1. If it is considered to be code that needs to be executed, the code content begins with 'code: \n```<RUN>\n' and ends with '```<END_CODE>'. If the code does not need to be executed for display only, the code content begins with 'code: \n```<DISPLAY:language_type>\n', and ends with '```<END_CODE>', where language_type can be python, java, javascript, etc;
131
133
2. Only use defined variables, variables will persist between multiple calls;
132
134
3. Use "print()" function to let the next model call see corresponding variable information;
133
135
4. Use tool/agent input parameters correctly, use keyword arguments, not dictionary format;
Copy file name to clipboardExpand all lines: backend/prompts/utils/prompt_generate_en.yaml
+18-16Lines changed: 18 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -53,14 +53,16 @@ FEW_SHOTS_SYSTEM_PROMPT: |-
53
53
- Write code in simple Python
54
54
- Follow Python coding standards and Python syntax
55
55
- Call tools/assistants correctly according to format specifications
56
+
- To distinguish between code execution and displaying user code, use 'Code: \n```<RUN>\n' to start executing code and '```<END_CODE>' to indicate its completion. Use 'Code: \n```<DISPLAY:language_type>\n' to start displaying code and '```<END_CODE>' to indicate its completion.
57
+
- Note that executed code is not visible to users. If users need to see the code, use 'Code: \n```<DISPLAY:language_type>\n' as the start and '```<END_CODE>' to denote displayed code.
56
58
57
59
3. Observe Results:
58
60
- View code execution results
59
61
60
62
After thinking, when you believe you can answer the user's question, you can generate a final answer directly to the user without generating code and stop the loop.
61
63
62
64
### Python Code Specifications
63
-
1. If it is considered to be code that needs to be executed, the code content begins with 'Code:\n```py\n' and ends with '```<end_code>'. If the code does not need to be executed for display only, the code content begins with 'Code:\n```code:language_type\n', and ends with '```<end_code>', where language_type can be python, java, javascript, etc.;
65
+
1. If it is considered to be code that needs to be executed, the code content begins with 'Code:\n```<RUN>\n' and ends with '```<END_CODE>'. If the code does not need to be executed for display only, the code content begins with 'Code:\n```<DISPLAY:language_type>\n', and ends with '```<END_CODE>', where language_type can be python, java, javascript, etc.;
64
66
2. Only use defined variables, variables will persist between multiple calls;
65
67
3. Use "print()" function to let the next model call see corresponding variable information;
66
68
4. Use tool/assistant input parameters correctly, use keyword arguments, not dictionary format;
@@ -77,18 +79,18 @@ FEW_SHOTS_SYSTEM_PROMPT: |-
77
79
78
80
Think: I will first use the knowledge_base_search tool to find if there is relevant information in the local knowledge base.
79
81
Code:
80
-
```py
82
+
```<RUN>
81
83
knowledge_info = knowledge_base_search(query="Oriental Pearl Tower introduction", index_names=["local_knowledge_base1", "local_knowledge_base2"])
82
84
print(knowledge_info)
83
-
```<end_code>
85
+
```<END_CODE>
84
86
Observe Results: No results found for query "Oriental Pearl Tower introduction". The search results are insufficient to support an answer.
85
87
86
88
Think: Since no relevant information was found in the local knowledge base, I need to use the web_search tool to query network information.
87
89
Code:
88
-
```py
90
+
```<RUN>
89
91
web_info = web_search(query="Oriental Pearl Tower introduction")
90
92
print(web_info)
91
-
```<end_code>
93
+
```<END_CODE>
92
94
Observe Results: The Oriental Pearl TV Tower is located in Lujiazui, Pudong New Area, Shanghai, China...
93
95
94
96
Think: I have obtained the relevant information, now I will generate the final answer.
@@ -100,10 +102,10 @@ FEW_SHOTS_SYSTEM_PROMPT: |-
100
102
101
103
Think: I need to call the travel planning assistant to plan the trip.
102
104
Code:
103
-
```py
105
+
```<RUN>
104
106
itinerary_result = travel_planning_assistant(task="Help me plan tomorrow's trip from Shanghai to Beijing")
105
107
print(itinerary_result)
106
-
```<end_code>
108
+
```<END_CODE>
107
109
Observe Results: Tomorrow's trip planning from Shanghai to Beijing, including transportation, accommodation, attractions, etc.
108
110
109
111
Think: I have obtained the travel planning, now I will generate the final answer.
@@ -115,18 +117,18 @@ FEW_SHOTS_SYSTEM_PROMPT: |-
115
117
116
118
Think: I need to first get weather data, then let the analysis assistant help me analyze.
0 commit comments