Skip to content
Review

DynaContext: Self-Improving Dynamic Contextualization of Optimized Prompts for Heterogeneous Parameter Extraction

Aug 2026 · 0 citations · 38 references
Computer Science

TL;DR

DynaContext is introduced, a framework that combines an offline-optimized extraction core, learned with GEPA or SkillOpt, with inference-time contextual adaptation and validation-gated self-improvement, with inference-time contextual adaptation and validation-gated self-improvement.

Abstract

Automated prompt and skill optimization typically produces a single static instruction that is reused across inference instances until the next optimization cycle. However, this approach cannot adapt when the required context, constraints, and evidence vary from one instance to another. For instance, parameter extraction from electronic component descriptions breaks this assumption: resistors, capacitors, transistors, and connectors require different fields, unit constraints, and demonstrations, and each input provides a different evidence state. We introduce DynaContext, a framework that combines an offline-optimized extraction core, learned with GEPA or SkillOpt, with inference-time contextual adaptation and validation-gated self-improvement. DynaContext routes each item through internal, external, or fallback evidence paths and composes an item-specific prompt from the core, schema, evidence, unresolved fields, and validated demonstrations. Deterministic validation and an LLM judge gate every output, uncertain cases go to human review, and only human-verified corrections enter the demonstration memory. On a single-category benchmark, average accuracy increases from 86.6% for the base prompt to 96.9% for standalone SkillOpt and 98.6% for the best DynaContext configuration. Across 850 heterogeneous gold parameter facts, average field-level F1 increases from 51.8% for an unoptimized, demonstration-free control to 59.2% with dynamic demonstrations alone, 66.9% with the optimized core alone, and 71.0% with both. Holding the model fixed, the full configuration outperforms the deployed static-prompting pipeline by 17.3 F1 points on average.

View source

Similar papers

Preprint Aug 2026

MemeMind: Reference-Guided Trace Construction for Offline Context Optimization

This work introduces MemeMind, which uses an offline reference answer to recover missing experience in Anime, Comic, and Game meme interpretation and shows that constructing successful tool use for failed groups provides the largest component gain and produces more effective evidence acquisition at inference time.

Run Yang, Weihang Wang, Boheng Sheng et al. · 1 citation
Conference Jul 2026

TraceStructRepair: Effective Diagnostic Representation for Context-Limited Automated Program Repair

Self-supervised automated program repair (APR) leverages project-specific perturbations to generate training data and uses test execution diagnostics to guide patch generation. In practice, however, diagnostics are heterogeneous (e.g., exception messages, stack traces, assertion diffs, and dynamic execution signals) and must fit within a strict context budget. Naive concatenation either truncates critical evidence or amplifies noisy artifacts, especially for deep bugs where the failure symptom is far from the root cause. We present TraceStructRepair, a diagnostic structuring and budgeting approach for execution-aware self-supervised APR. TraceStructRepair (1) extracts a compact set of execution diagnostics from a single failing test, including exception type and message, stack trace frames, assertion diffs, and optionally dynamically loaded classes; (2) normalizes and ranks diagnostic elements to reduce redundancy and framework noise; and (3) assembles a field-aware representation under a fixed token budget with per-field caps and lexicographic priority rules. We implement TraceStructRepair on top of the SelfAPR pipeline and evaluate it on Defects4J using a project-wise heldout protocol. Beyond end-to-end repair outcomes, we analyze robustness under noisy fault localization and component ablations. We release artifacts to facilitate replication and future work on execution-aware, budget-constrained APR.

Pan Lu, Dongcheng Li, W. E. Wong · 0 citations
#artificial intelligence Preprint Aug 2026

SEPO: Evidence-Grounded Prompt Optimization via Structural Editing

This paper introduces SEPO (Structural, Evidence-grounded Prompt Optimization), a multi-trajectory prompt optimiser centred on edit-effect lineage feedback that makes prompt optimisation addressable, attributable, and actionable.

Xiaoyu Ma, Haoyue Liu, Yiwen Li et al. · 0 citations
Preprint Aug 2026

RLMOpt: Adaptive Prompt Optimization via Recursive Language Models

RLMOpt is introduced, a prompt optimizer that makes the search policy itself language-model-driven through a recursive language model (RLM), which operates over a tool-based environment, inspecting task information, analyzing failures, generating candidates, allocating evaluation budget, and deciding when to stop.

Subhash Bangalore Satheesha, Nirvik Pande, Deepthi Duddempudi et al. · 0 citations
Preprint Jul 2026

IFHierBench: Hierarchical Instruction Following for Large Language Models

IFHierBench is introduced, a hierarchical instruction-following benchmark of 600 prompts stratified across four constraint-tree depths and 35 distinct constraints, each prompt paired with a deterministic checker that verifies satisfaction at every scope.

Yuetian Mao, Chunyang Chen · 0 citations
Jul 2026

JSTestCraft: Addressing Context Deficits in JavaScript Unit Test Generation via Agentic Multi-Level Contextual Analysis

Unit testing is crucial for software reliability in JavaScript, yet constructing comprehensive suites remains costly and error-prone. JavaScript’s dynamic features, flexible typing, asynchronous execution, and reliance on third-party libraries, pose persistent challenges for automated test generation. Although large language models (LLMs) show promise in code reasoning and synthesis, existing methods often miss the multilayer contextual information required for executable, semantically correct tests. This paper introduces JSTestCraft, an agentic, multi-layer framework for adaptive JavaScript unit test generation. JSTestCraft reconstructs missing context via three enrichment agents: library, structural, and semantic. These agents capture inter-function topology, third-party API semantics, and inferred type constraints in a shared contextual memory for reasoning-driven test synthesis. A testing and optimization layer generates, executes, and iteratively refines test cases. Evaluated on 20 real-world Node.js repositories, JSTestCraft outperforms state-of-the-art baselines, improving test pass rate by 60.9%, statement coverage by 14.2%, and branch coverage by 47.3%. Ablation analysis confirms each agent’s contribution to contextual completeness. Beyond metrics, JSTestCraft discovers 13 previously unknown bugs across 5 repositories, 6 of which received substantive acknowledgment from maintainers or community contributors. These results demonstrate that context reconstruction and agentic collaboration enable LLMs to perform more reliable and adaptive testing in dynamic JavaScript environments.

Yiyang Liu, Yanjie Zhao, Haoyu Wang · 0 citations