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
The changes in smart.py include an update to the version number from 0.5 to 0.6. The logic for selecting models based on task difficulty and reasoning requirements has been refined, adding support for an online model. Additionally, the handling of user input tags has been
improved to better manage model selection and reasoning flags.
Copy file name to clipboardExpand all lines: pipes/smart.py
+46-34Lines changed: 46 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
description: SMART is a sequential multi-agent reasoning technique.
6
6
required_open_webui_version: 0.3.30
7
7
requirements: langchain-openai==0.1.24, langgraph
8
-
version: 0.5
8
+
version: 0.6
9
9
licence: MIT
10
10
"""
11
11
@@ -31,32 +31,30 @@
31
31
Guidelines:
32
32
- Don't over or estimate the difficulty of the task. If the user just wants to chat try to see that.
33
33
- Don't create tasks where there aren't any. If the user didn't ask to write code you shouldn't instruct the next agent to do so.
34
-
- Follow user wishes. The # tags below OVERWRITE ALL YOUR OTHER GUIDELINES. NEVER IGNORE THESE!
35
-
- If the user includes "#*no" in their message, ALWAYS set reasoning to NO
36
-
- If the user includes "#*yes" in their message, ALWAYS set reasoning to YES
37
-
- If the user includes "#!" in their message, ALWAYS set the task difficulty to BELOW 5.
38
-
- If the user includes "#!!" in their message, ALWAYS set the task difficulty to EQUAL OR ABOVE 5.
39
34
40
35
You should respond by following these steps:
41
36
1. Within <reasoning> tags, plan what you will write in the other tags. This has to be your first step.
42
37
1. First, reason about the task difficulty. What kind of task is it? What do your guidelines say about that?
43
38
2. Second, reason about if the reasoning and tool use agent is needed. What do your guidelines say about that?
44
39
3. Third, think about what should be contained in your prompt. Don't write the prompt here already. Just think about what should be in it.
45
-
2. Within <task_difficulty> tags, write a number between 1 and 10 to indicate how difficult you think the task is. 1 being the easiest and 10 being the hardest.
46
-
1. If you choose a number above or equal to 5, a bigger model will be used for the final answer. This is good for example creative tasks but bad for summarization etc. because the cost will be higher.
47
-
3. Within <is_reasoning_or_tool_needed> tags, write YES or NO. This will determine if the user request will go straight to the final agent or if it will go to the reasoning and tool use agent.
48
-
1. Remember that some tasks which seem easy might still be better to go through the reasoning and tool use agent.
49
-
2. Try to reason if LLMs are good at solving the problem or if they usually struggle with that task.
50
-
3. Categories of problems that you HAVE TO answer YES to: Any Counting task (Numbers, Letters...), Math, Programming, Logic, Problem Solving, Analysis (even simple one), Trick Questions, Puzzles, Proof Reading, Text Editing, Fact Checking, Research, ...
51
-
4. Categories of problems that you HAVE TO answer NO to: Writing, Spelling, Summarizing (text, website, etc.), Translation, Simple Conversation, Simple Clarification, ...
40
+
2. Within the <answer> tag, write out your final answer. Your answer should be a comma seperated list.
41
+
1. First choose the model the final-agent will use. Try to find a good balance between performance and cost. Larger models are bigger.
42
+
- Use #small for the simple queries or queries that mostly involve summarization or simple "mindless" work. This also invloves very simple tool use, like converting a file, etc.
43
+
- Use #medium for task that requiere some creativity, writing of code, or complex tool-use.
44
+
- Use #large for tasks that are mostly creative or involve the writing of complex code, math, etc.
45
+
- Use #online for tasks that mostly requiere the use of the internet. Such as news or queries that will benifit greatly from up-to-date information. However, this model can not use tools.
46
+
2. Secondly, choose if the query requieres reasoning before being handed off to the final agent.
47
+
- Queries that requeire reasoning are especially queries where llm are bad at. Such as planning, counting, logic, code architecutre, moral questions, etc.
48
+
- Queries that don't requeire reasoning are queries that are easy for llms. Such as "knowledge" questions, summarization, writing notes, simple tool use, etc.
49
+
- If you think reasoning is needed, include #reasoning. If not #no-reasoning.
50
+
- When you choose reasoning, you should (in most cases) choose at least the #medium model.
0 commit comments