Skip to content

Commit 24152b6

Browse files
committed
fix prompt
1 parent 7840643 commit 24152b6

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

optillm/plugins/spl/prompts.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,16 @@
5454

5555
# Strategy application prompt for system prompt augmentation
5656
STRATEGY_APPLICATION_PROMPT = """
57-
## Problem-Solving Strategies
57+
Problem-Solving Strategies
5858
59-
The following strategies have been developed for different problem types and may help you solve the user's query effectively.
59+
The following strategies can help solve the user's query effectively. Use them as guidance when formulating your response:
6060
61-
These strategies represent approaches that have worked well for similar problems in the past. Consider using them as guidance when formulating your response:
62-
63-
- Review the strategies below to find approaches relevant to the current problem
64-
- Apply the steps and techniques from these strategies in your solution process
65-
- Use the reasoning patterns in the example processes as inspiration
66-
67-
These strategies can enhance your problem-solving capabilities for specific types of problems.
61+
- Find the strategies most relevant to the current problem
62+
- Apply the techniques from these strategies in your solution
63+
- Use the reasoning examples as a guide for your approach
6864
6965
{strategies_section}
7066
71-
Feel free to use <think>...</think> tags to work through your reasoning process before providing the final answer. This helps with complex problem-solving.
67+
You can use <think>...</think> tags to work through your reasoning process before providing the final answer.
7268
"""
7369

optillm/plugins/spl/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def extract_thinking(response: str) -> Tuple[str, Optional[str]]:
4343
def augment_system_prompt(system_prompt: str, strategies: List[Any]) -> str:
4444
"""
4545
Augment the system prompt with selected strategies and reasoning examples.
46-
Uses a directive prompt to explicitly instruct the LLM to apply the strategies.
46+
Instructs the LLM to apply the strategies in its solution.
4747
4848
Args:
4949
system_prompt: The original system prompt
@@ -59,14 +59,14 @@ def augment_system_prompt(system_prompt: str, strategies: List[Any]) -> str:
5959
strategies_section = ""
6060

6161
for i, strategy in enumerate(strategies, 1):
62-
strategies_section += f"### Strategy {i} for {strategy.problem_type} problems\n{strategy.strategy_text}\n\n"
62+
strategies_section += f"Strategy {i} for {strategy.problem_type} problems:\n{strategy.strategy_text}\n\n"
6363

6464
# Add a sample reasoning example if available
6565
if strategy.reasoning_examples:
6666
# Use the most recent reasoning example (last one)
6767
reasoning = strategy.reasoning_examples[-1]
6868
if reasoning:
69-
strategies_section += f"#### Example reasoning process:\n<think>\n{reasoning}\n</think>\n\n"
69+
strategies_section += f"Example reasoning process:\n<think>\n{reasoning}\n</think>\n\n"
7070

7171
# Format the application prompt with the strategies section
7272
strategy_prompt = STRATEGY_APPLICATION_PROMPT.format(strategies_section=strategies_section)

0 commit comments

Comments
 (0)