DynaContext Improves LLM Parameter Extraction with Dynamic Context.

Joe Yu, Shibin Thomas Stanley Paul, Sven Mayer· August 25, 2026 View original

Key takeaways

  • Dynamic prompt contextualization significantly improves LLM accuracy for heterogeneous data extraction.
  • DynaContext combines offline optimization with real-time adaptation and self-improvement.
  • Rigorous validation and human feedback are critical for continuous learning and accuracy.
  • The framework offers substantial performance gains over static prompting methods.

Who benefits

ManufacturingE-commerceFinanceHealthcareLegal

Summary

DynaContext is a new framework that enhances LLM parameter extraction by dynamically adapting prompts with item-specific context and evidence, moving beyond static instructions. It combines an optimized core with inference-time contextualization and validation-gated self-improvement, significantly boosting accuracy and F1 scores on heterogeneous data.

A new framework called DynaContext addresses the limitations of static prompt optimization in large language models (LLMs) when dealing with varied data. Traditional methods use a single instruction, which struggles with heterogeneous information like extracting parameters from diverse electronic component descriptions, where different items require unique fields, constraints, and evidence. DynaContext overcomes this by dynamically generating item-specific prompts. It integrates an offline-optimized extraction core with real-time contextual adaptation and a self-improvement mechanism. Each input is routed through internal, external, or fallback evidence paths, and a tailored prompt is composed using the core, schema, evidence, and validated demonstrations. Outputs are rigorously checked by deterministic validation and an LLM judge, with uncertain cases sent for human review, and only human-verified corrections are added to the demonstration memory. Evaluations show substantial improvements: on a single-category benchmark, accuracy rose from 86.6% to 98.6% with DynaContext. For 850 heterogeneous parameter facts, the framework increased average field-level F1 from 51.8% for an unoptimized control to 71.0% with the full configuration, outperforming existing static-prompting pipelines by 17.3 F1 points.

Why it matters

This innovation significantly improves the accuracy and adaptability of LLMs for complex data extraction tasks, which is crucial for automating processes involving diverse and structured information across various industries.

How to implement this in your domain

  1. 1Evaluate existing data extraction pipelines for opportunities to integrate dynamic prompt contextualization.
  2. 2Pilot DynaContext-like approaches for tasks requiring high-precision extraction from heterogeneous data sources.
  3. 3Design robust validation and human-in-the-loop feedback mechanisms for continuous model improvement.
  4. 4Train LLMs with a focus on schema-aware and evidence-grounded prompt generation for specific use cases.

Original post by Joe Yu, Shibin Thomas Stanley Paul, Sven Mayer

"arXiv:2608.22014v1 Announce Type: new 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, const…"

View on X

Originally posted by Joe Yu, Shibin Thomas Stanley Paul, Sven Mayer on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses