From 29b05c87c79750e4bf7a53e64cda1f46da13a247 Mon Sep 17 00:00:00 2001 From: GhostC <1276537536@qq.com> Date: Sat, 23 May 2026 11:50:21 +0800 Subject: [PATCH] Fix reasoning prompt injection to append skill_text only when present --- .../EvoAgentBench/src/domains/reasoning/omnimath.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/benchmarks/EvoAgentBench/src/domains/reasoning/omnimath.py b/benchmarks/EvoAgentBench/src/domains/reasoning/omnimath.py index 1148db3d..cdcfad82 100644 --- a/benchmarks/EvoAgentBench/src/domains/reasoning/omnimath.py +++ b/benchmarks/EvoAgentBench/src/domains/reasoning/omnimath.py @@ -114,8 +114,14 @@ def get_agent_timeout(self, task: dict, env_info: dict) -> int: return int(_cfg().get("agent_timeout", 600)) def build_prompt(self, task: dict, env_info: dict) -> str: - return _PROMPT_TEMPLATE.format( - problem=task["problem"], + prompt = _PROMPT_TEMPLATE.format(problem=task["problem"]) + skills_text = task.get("skill_text", "") + if not skills_text: + return prompt + return prompt + ( + "\n\n## Domain-Specific Strategies\n\n" + "The following strategies are specifically designed for this type of task. " + "You MUST apply them:\n\n" + skills_text ) def verify(self, task: dict, env_info: dict, trial_dir: Path,