{"id":212889,"date":"2026-10-21T08:02:19","date_gmt":"2026-10-21T08:02:19","guid":{"rendered":"https:\/\/www.europesays.com\/ai\/212889\/"},"modified":"2026-10-21T08:02:19","modified_gmt":"2026-10-21T08:02:19","slug":"benchmarking-the-responsiveness-of-llm-based-agentic-systems-under-controlled-mid-task-perturbations","status":"publish","type":"post","link":"https:\/\/www.europesays.com\/ai\/212889\/","title":{"rendered":"Benchmarking the responsiveness of LLM-based agentic systems under controlled mid-task perturbations"},"content":{"rendered":"<p>Appendix A metric and reward specifications<\/p>\n<p>This appendix records the operational definitions used by metrics\/engine.py and the environment reward functions. Where a phrase in the main text could be read informally, the formulas here take precedence.<\/p>\n<p>Adaptivity. Adaptation latency L: steps from the first perturbation_active step to the first later step that is marked corrective or that records a successful (non-failing) tool call; 0 if there is no perturbation. Behavioural recovery \\(\\rho _{\\textrm{rec}}\\): 1 iff at least one post-onset step has a successful non-FINISH tool call; 1 by convention when there is no perturbation. Adaptation efficiency: fraction of post-onset steps with \\(\\mathcal {F}_t=0\\). Time-to-stable-recovery: steps from the first qualifying recovery step to the first pair of consecutive non-failing steps (or \\(max\\_steps-t_\\pi \\) if never reached).<\/p>\n<p>Robustness. Performance degradation: \\((r_{\\textrm{base}}-r)\/r_{\\textrm{base}}\\) clipped to [0,\u00a01]. Normalised robustness: \\(1-\\text {degradation}\\). Failure density: fraction of steps with \\(\\mathcal {F}_t=1\\). Reward: terminal episode reward \\(G(\\tau )\\).<\/p>\n<p>Stability. Plan revision count: number of new plan_id values after the first. Oscillation index: fraction of adjacent steps whose tool_called strings differ. Action entropy: Shannon entropy of the post-onset tool distribution.<\/p>\n<p>Alignment. Constraint violation rate: fraction of steps with constraint_violation. Goal consistency: fraction of steps with a successful tool call (productive-step proxy). Goal drift: fraction of post-onset steps that fail, violate a constraint, or are tagged GoalDeviation. Self-correction rate: fraction of constraint violations followed within three steps by a corrective or successful tool call (1 if no violations).<\/p>\n<p>Reward functions. Equations\u00a02\u20134 are implemented verbatim in the three environment modules. Intermediate tool calls return \\(r_t=0\\); only FINISH yields a nonzero terminal reward under the normal path.<\/p>\n<p>Appendix B backends, sandbox, and logging schema<\/p>\n<p>Backends. The MockBackend returns deterministic canned actions per (agent, environment); it is used for CI and to exercise the metric pipeline at scale without consuming LLM time. The OllamaBackend targets a locally-hosted llama3-groq-tool-use:8b via the Ollama REST API at localhost:11434. Each request enforces a 60\u00a0s timeout, retries up to three times with exponential back-off on transport errors, and validates that the response matches the agent\u2019s output schema before being forwarded. Validation failures are re-prompted up to twice; persistent failures are recorded as a tool_error step. Sandbox. The code_executor tool runs Python in a restricted exec sandbox with a curated safe-builtins dictionary, disabled import, no file or socket I\/O, and a 2\u00a0s wall-clock limit enforced by a signal-based watchdog. Standard output is captured and returned as the tool result. Logging schema. Each StepLog record persists thirteen fields per step: step_id (t), observation (\\(o_t\\)), action (\\(a_t\\)), tool_called, tool_input, tool_output, plan_id, failure_flag, failure_type, corrective_action_flag, constraint_violation, perturbation_active, and the optional step_reward (\\(r_t\\), defaults to None in pre-v2 logs and is summed into the reward column of results.csv). Per-episode JSON files are written to &lt; output_dir &gt; \/logs\/ and the run-level CSV is written to &lt; output_dir &gt; \/results.csv.<\/p>\n<p>Appendix C agent prompts and force-finish policy<\/p>\n<p>All agents share a common system prompt template that includes the task description, the available tools, the constraints, and a strict output-schema example. Reflexion additionally appends a reflective critique to the prompt of subsequent episodes; an optional REFLEXION_PERTURBATION_AWARE environment flag swaps the default critique template for a perturbation-aware variant (\u201cAgent policies (conceptual)\u201d section).<\/p>\n<p>A force-finish policy guarantees that every episode terminates at or before \\(T = 15\\) steps: (i) at every step the agent receives a [Step i\/T \u2013  \\(T-i\\)  steps remaining] header; (ii) when \\(T &#8211; i \\le 2\\) a *** WARNING *** block instructs the agent to call FINISH; (iii) on the final step the prompt is replaced with a FORCE_FINISH_PROMPT demanding FINISH; (iv) a code-level fallback _force_finish_from_history() synthesises a FINISH action from prior tool outputs if the LLM still does not comply, ensuring that no episode is left in an undefined terminal state.<\/p>\n<p>Appendix D full grid configuration<\/p>\n<p>The headline grid uses the configuration shown below. The silent ablation uses an identical configuration except perturbation_notice: false and output_dir: results\/full_grid_no_perturbation_notice.<\/p>\n<p><img decoding=\"async\" aria-describedby=\"figure-b-desc\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/10\/41598_2026_72720_Figb_HTML.png\" alt=\"figure b\" loading=\"lazy\" width=\"685\" height=\"452\"\/>Appendix E data availability and results\/ layout<\/p>\n<p>All raw and processed data supporting the headline experiments are publicly hosted in the Benchmark repository: <a href=\"https:\/\/github.com\/AyushBalyan\/Benchmark\/tree\/main\/results\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/github.com\/AyushBalyan\/Benchmark\/tree\/main\/results<\/a>. The two primary datasets are:<\/p>\n<p>results\/full_grid\/ \u2014 noticed grid (\\(4{,}320{}\\) episodes, perturbation_notice: true).<\/p>\n<p>results\/full_grid_no_perturbation_notice\/ \u2014 silent ablation grid (\\(4{,}320{}\\) episodes, perturbation_notice: false).<\/p>\n<p>Each grid directory contains four artefacts: (i)\u00a0results.csv, a flat run-level table with one row per episode and all taxonomy metrics pre-computed; (ii)\u00a0logs\/, 4,\u00a0320 per-episode JSON files, each holding the full StepLog trace (observation, action, tool I\/O, perturbation_active, per-step reward, and failure flags for every step); (iii)\u00a0config.json, a snapshot of the grid configuration used for that run; and (iv)\u00a0analysis\/, regenerated tables (tables\/), summary CSVs, and paper figures (paper_plots\/) produced by scripts\/run_paper_analyses.py.<\/p>\n<p>Smaller development grids (small_grid\/, medium_grid\/, analysis_run\/) are also included for pipeline validation but are not used in the headline results reported here. No human-subject or personally identifiable data are contained in any released file.<\/p>\n<p>Appendix F reproducibility commands<\/p>\n<p>The following commands reproduce both grids and all paper tables and plots from a clean clone. The mock grid is provided for CI and for validating the metric pipeline before committing the LLM-time-intensive run.<\/p>\n<p><img decoding=\"async\" aria-describedby=\"figure-c-desc\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/10\/41598_2026_72720_Figc_HTML.png\" alt=\"figure c\" loading=\"lazy\" width=\"685\" height=\"570\"\/>Appendix G additional tables<\/p>\n<p>Tables\u00a0<a data-track=\"click\" data-track-label=\"link\" data-track-action=\"table anchor\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-72720-7#Tab17\" rel=\"nofollow noopener\" target=\"_blank\">17<\/a>, <a data-track=\"click\" data-track-label=\"link\" data-track-action=\"table anchor\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-72720-7#Tab18\" rel=\"nofollow noopener\" target=\"_blank\">18<\/a> and <a data-track=\"click\" data-track-label=\"link\" data-track-action=\"table anchor\" href=\"http:\/\/www.nature.com\/articles\/s41598-026-72720-7#Tab19\" rel=\"nofollow noopener\" target=\"_blank\">19<\/a> report the per-perturbation breakdown of reward and recovery probability for both grids, and the per-perturbation Mann\u2013Whitney comparison between the two grids. None of the noticed-vs-silent cells reach significance at \\(\\alpha = 0.05\\).<\/p>\n<p>Table 17 Mean reward and behavioural recovery \\(\\rho _{\\textrm{rec}}\\) by agent\u00a0\\(\\times \\)\u00a0perturbation in both grids (perturbed episodes only, \\(n=450\\) per cell).Table 18 Adaptation latency L (mean, bootstrap \\(95\\%\\) CI; steps) per agent\u00a0\\(\\times \\)\u00a0perturbation in each grid separately (\\(n=450\\) per cell).Table 19 Per-perturbation noticed-vs-silent Mann\u2013Whitney comparison (\\(n=450\\) per cell). No cell reaches \\(\\alpha = 0.05\\) after Bonferroni correction with \\(m = 9.\\).<\/p>\n","protected":false},"excerpt":{"rendered":"Appendix A metric and reward specifications This appendix records the operational definitions used by metrics\/engine.py and the environment&hellip;\n","protected":false},"author":2,"featured_media":212890,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[98043,179,7493,372,1743,9006,1737,98042,1744,98045,98041,98044,160],"class_list":["post-212889","post","type-post","status-publish","format-standard","has-post-thumbnail","category-agentic-ai","tag-adaptivity","tag-agentic-ai","tag-agentic-artificial-intelligence","tag-engineering","tag-humanities-and-social-sciences","tag-llm-agents","tag-mathematics-and-computing","tag-mid-task-perturbation","tag-multidisciplinary","tag-non-stationary-evaluation","tag-responsiveness","tag-robustness","tag-science"],"_links":{"self":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/212889","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/comments?post=212889"}],"version-history":[{"count":0,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/212889\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media\/212890"}],"wp:attachment":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media?parent=212889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/categories?post=212889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/tags?post=212889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}