Agentic Context Learning Improves LLM Task Success

Jike Zhong, Ming Li, Yuxiang Lai, Ziyan Yang, Jingyu Xie, Jihyung Kil, Zheda Mai, Shao-Yuan Lo, Ren Xiang, Konstantinos Psounis, Yuanyuan Lei· July 14, 2026 View original

▶ The 2-minute explainer

Summary

This work investigates why LLMs struggle with context learning, finding that failures stem from difficulty acquiring local specifications, not just content. It introduces PSCI (private specification-contract induction), an intervention that extracts and enforces these specifications, achieving state-of-the-art performance on context learning benchmarks.

Large Language Models (LLMs) often struggle with "context learning," a task where they must learn and apply new, task-specific knowledge from complex contexts not present in their pre-training. Despite extensive research, even frontier models achieve low success rates. This study empirically investigates the root causes of these failures. Contrary to the common hypothesis that failures are due to content access issues, the research found that the primary challenge lies in acquiring local specifications. These specifications include domain-specific formats, local rules, and completeness conditions, which are often implicitly distributed throughout the context rather than explicitly stated in the query. Analysis of a large benchmark, CL-Bench, revealed that over half of evaluation criteria relate to specification acquisition, while only a quarter relate to content acquisition. To address this, the researchers developed a simple intervention called Private Specification-Contract Induction (PSCI). PSCI works by extracting these local specifications and then enforcing them through adversarial checking and repair mechanisms. This method significantly improved performance, achieving state-of-the-art results on CL-Bench with various LLMs, demonstrating that context learning heavily relies on the ability to not only retrieve information but also to infer and apply the underlying rules and requirements.

Why it matters

For professionals building or deploying LLMs, improving context learning means models can better adapt to new tasks and domains with minimal fine-tuning, leading to more versatile and effective AI applications.

How to implement this in your domain

  1. 1Design prompts that encourage LLMs to explicitly identify and extract task-specific specifications from context.
  2. 2Implement adversarial checking mechanisms to validate LLM outputs against inferred specifications.
  3. 3Develop repair loops that guide LLMs to correct outputs based on specification violations.
  4. 4Focus on curating diverse contexts that implicitly contain critical specifications for training.
  5. 5Evaluate LLM performance not just on content recall but also on adherence to contextual rules and formats.

Who benefits

Software DevelopmentLegalHealthcareCustomer ServiceData Science

Key takeaways

  • LLMs struggle with context learning primarily due to difficulty acquiring local specifications.
  • Specifications include domain rules, formats, and completeness conditions often implicit in context.
  • PSCI (Private Specification-Contract Induction) significantly improves context learning by enforcing these specifications.
  • Effective context learning requires both content and specification acquisition.

Original post by Jike Zhong, Ming Li, Yuxiang Lai, Ziyan Yang, Jingyu Xie, Jihyung Kil, Zheda Mai, Shao-Yuan Lo, Ren Xiang, Konstantinos Psounis, Yuanyuan Lei

"arXiv:2607.09794v1 Announce Type: new Abstract: Context learning is an emerging inference-time task where LLMs must learn and apply novel, task-specific knowledge from intricate contexts absent from pre-training; even frontier models score under 24% task success. In this work, we…"

View on X

Originally posted by Jike Zhong, Ming Li, Yuxiang Lai, Ziyan Yang, Jingyu Xie, Jihyung Kil, Zheda Mai, Shao-Yuan Lo, Ren Xiang, Konstantinos Psounis, Yuanyuan Lei on X · view source

Want to go deeper?

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

Explore courses