Revisiting LLMs as Context Engineers

Junrui Zhang, Zeyu Xu, Runchuan Zhu, Jie Peng, Long Zhang, Zixin Ding, Jiaxin Lin, Kai Wang, Jianmin Ji, Junyuan Hong

arXiv:2611.30494 · 2026-11-28 공개 · arXiv · PDF

llm-evaluation large-language-models chain-of-thought context-engineering failure-modes llm-context-engineering reasoning-patterns instruction-adherence

Abstract

As large language models (LLMs) are used in more and more new tasks, context engineering becomes a fundamental method to efficiently steer LLMs by constructing instruction prompts or metadata without intensive training. A growing number of LLM context engineering (LCE) approaches automate the task by casting the LLM itself as the engineer that draws generalizable instructions or experiences from offline trials as context. Although these methods resemble how humans learn from experiences, it remains unclear when and how LLMs can engineer effective context from data. To answer the question, we first establish a benchmark composed of datasets with different reasoning patterns. We compared different LCE methods with different LLM families in 8B size, showing that there is no single winner for all tasks, even compared with simple baselines like chain-of-thought. Even when scaling model capabilities via more parameters or generation iterations, LCEs do not consistently boost existing performance. Across all datasets and models, the performance gains of LCEs are negatively correlated (r=-0.5, ple 0.05) with the diversity of the failure modes of reasoning trajectories. Investigating how LCEs work, we find that (1) the improvement in instruction adherence can explain some success of LCEs; (2) one major bottleneck is whether LLMs can extract effective experiences out of natively diverse failures. Through this study, we uncover the limited capabilities of LCEs in abstracting principled contexts from diverse failure modes and understand how LCEs work, providing guidelines for future work.

한국어 요약

한 줄 요약

LLMs가 다양한 실패 패턴에서 효과적인 컨텍스트를 추출하지 못함을 밝혀내며, LCE의 한계를 분석하고 개선 방향을 제시한다.

핵심 기여도

핵심 아이디어

기존 연구는 LLM 자체를 컨텍스트 엔지니어로 활용하여, 오프라인 실험 데이터에서 일반화 가능한 지침이나 경험을 추출하는 LCE 방법을 제안했다. 그러나 이러한 접근이 언제, 어떻게 효과적인지 명확하지 않았다. 본 연구는 다양한 추론 패턴을 가진 데이터셋으로 구성된 벤치마크를 구축하고, LCE 방법의 성능을 체계적으로 평가함으로써 이 문제를 탐구했다. 핵심 통찰은 LCE가 실패 모드의 다양성이 낮을 때 더 효과적이라는 점이며, 실패 모드의 다양성을 줄이는 것이 핵심 과제임을 밝혔다. 또한, 추출된 경험은 반복적으로 유용한 정보를 유지하지 못하고, 이는 LCE의 한계를 드러낸다.

기술적 접근법

주요 결과

의의 및 한계

본 연구는 LCE가 실패 모드의 다양성에 민감하며, 추출된 경험의 질이 성능에 직접적으로 영향을 미친다는 점을 밝혀내어, LCE의 작동 메커니즘에 대한 이해를 깊이 있게 제공한다. 그러나 LCE가 실패 모드에서 원칙적 컨텍스트를 추출하는 능력이 제한적이라는 점은, 향후 연구에서 해결해야 할 주요 과제이다. 또한, LCE는 특정 데이터셋이나 모델에서만 효과적이며, 일반화 능력이 낮다는 한계도 드러낸다.

실용적 활용

본 연구는 LLM을 훈련 없이 컨텍스트 엔지니어링을 통해 조정하려는 연구자들에게 중요한 가이드라인을 제공한다. 특히, 다양한 실패 모드에서 유용한 컨텍스트를 추출할 수 있는 알고리즘 개발이 필요하며, 컨텍스트 길이 조절 및 불필요한 정보 제거 기법도 중요하다. 금융, 에이전트, 멀티홉 추론 등 복잡한 태스크에서 LCE를 활용할 수 있으나, 성능 보장을 위해 데이터셋별 실패 패턴 분석이 필수적이다.