change prompt about making a quick guess on chess
Browse files
app.py
CHANGED
|
@@ -141,7 +141,7 @@ class BasicAgent:
|
|
| 141 |
if not api_key:
|
| 142 |
raise ValueError("OPENAI_API_KEY not set in environment variables!")
|
| 143 |
model = LiteLLMModel(
|
| 144 |
-
model_id="gpt-
|
| 145 |
api_key=api_key
|
| 146 |
)
|
| 147 |
|
|
@@ -149,7 +149,7 @@ class BasicAgent:
|
|
| 149 |
self.agent = CodeAgent(
|
| 150 |
model=model,
|
| 151 |
tools=my_tool_list,
|
| 152 |
-
max_steps=
|
| 153 |
)
|
| 154 |
|
| 155 |
def __call__(self, question: str, files=None, idx=None, total=None) -> str:
|
|
@@ -163,11 +163,13 @@ class BasicAgent:
|
|
| 163 |
You may freely think, reason, and use tools or your own knowledge as needed to solve the problem.
|
| 164 |
|
| 165 |
Core principles:
|
| 166 |
-
- Use available tools when helpful
|
|
|
|
|
|
|
| 167 |
- Apply your knowledge and experience
|
| 168 |
- Don't be afraid to make educated guesses when you have partial information
|
| 169 |
- Try multiple approaches if the first one doesn't work
|
| 170 |
-
-
|
| 171 |
|
| 172 |
When you have enough information to give a reasonable answer, go for it.
|
| 173 |
Only use "unknown" when you truly cannot make any reasonable attempt.
|
|
|
|
| 141 |
if not api_key:
|
| 142 |
raise ValueError("OPENAI_API_KEY not set in environment variables!")
|
| 143 |
model = LiteLLMModel(
|
| 144 |
+
model_id="gpt-4.1",
|
| 145 |
api_key=api_key
|
| 146 |
)
|
| 147 |
|
|
|
|
| 149 |
self.agent = CodeAgent(
|
| 150 |
model=model,
|
| 151 |
tools=my_tool_list,
|
| 152 |
+
max_steps=3,
|
| 153 |
)
|
| 154 |
|
| 155 |
def __call__(self, question: str, files=None, idx=None, total=None) -> str:
|
|
|
|
| 163 |
You may freely think, reason, and use tools or your own knowledge as needed to solve the problem.
|
| 164 |
|
| 165 |
Core principles:
|
| 166 |
+
- Use available tools when helpful, but don't over think
|
| 167 |
+
- Chess puzzles usually have forcing moves (checks, captures, threats)
|
| 168 |
+
- Math problems often have straightforward calculations
|
| 169 |
- Apply your knowledge and experience
|
| 170 |
- Don't be afraid to make educated guesses when you have partial information
|
| 171 |
- Try multiple approaches if the first one doesn't work
|
| 172 |
+
- When in doubt, try the most likely answer
|
| 173 |
|
| 174 |
When you have enough information to give a reasonable answer, go for it.
|
| 175 |
Only use "unknown" when you truly cannot make any reasonable attempt.
|