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
feat(gepa): implement tool-specific proposer for tool descriptions
- Add ToolProposer with GenerateImprovedToolDescription signature
- Implement routing logic to separate tools from signatures
- Tools use ToolProposer, signatures use custom or parent default
- Backward compatible: preserves existing custom_instruction_proposer behavior
- Add test verifying routing splits components correctly
logger.warning("The score returned by the metric with pred_name is different from the overall metric score. This can indicate 2 things: Either the metric is non-deterministic (e.g., LLM-as-judge, Semantic score, etc.) or the metric returned a score specific to pred_name that differs from the module level score. Currently, GEPA does not support predictor level scoring (support coming soon), and only requires a feedback text to be provided, which can be specific to the predictor or program level. GEPA will ignore the differing score returned, and instead use module level score. You can safely ignore this warning if using a semantic metric, however, if this mismatch is caused due to predictor scoring, please return module-level scores. To disable this warning, set warn_on_score_mismatch=False.")
339
+
logger.warning(
340
+
"The score returned by the metric with pred_name is different from the overall metric score. This can indicate 2 things: Either the metric is non-deterministic (e.g., LLM-as-judge, Semantic score, etc.) or the metric returned a score specific to pred_name that differs from the module level score. Currently, GEPA does not support predictor level scoring (support coming soon), and only requires a feedback text to be provided, which can be specific to the predictor or program level. GEPA will ignore the differing score returned, and instead use module level score. You can safely ignore this warning if using a semantic metric, however, if this mismatch is caused due to predictor scoring, please return module-level scores. To disable this warning, set warn_on_score_mismatch=False."
"""I provided an assistant with the following description for a tool:
317
+
```
318
+
<current_tool_description>
319
+
```
320
+
321
+
This tool is available to the assistant. The following are examples of task inputs provided to the assistant, the assistant's decisions about which tools to use, and feedback on whether those decisions were correct:
322
+
```
323
+
<examples_with_feedback>
324
+
```
325
+
326
+
Your task is to write a better description for this tool.
327
+
328
+
Read the examples carefully and identify patterns in when the tool was used successfully versus when it was misused or overlooked. Identify any domain-specific information about the tool's capabilities or appropriate usage that may not be available to the assistant in the future. The assistant may have developed effective patterns for tool selection - if so, ensure the tool description supports those patterns.
329
+
330
+
Provide the new tool description within ``` blocks."""
331
+
332
+
current_tool_description=dspy.InputField(desc="The current description of the tool")
333
+
examples_with_feedback=dspy.InputField(desc="Examples showing tool usage decisions and feedback on correctness")
334
+
335
+
improved_tool_description=dspy.OutputField(
336
+
desc="An improved description that helps with tool selection decisions"
337
+
)
338
+
339
+
340
+
classSingleComponentToolProposer(dspy.Module):
341
+
"""dspy.Module for proposing improved tool descriptions based on feedback."""
0 commit comments