Reasoning Shift: Context가 LLM의 추론을 조용히 짧게 만드는 방법
Reasoning Shift: How Context Silently Shortens LLM Reasoning
TL;DR Highlight
무관한 컨텍스트가 있으면 추론 모델이 자기검증을 생략하고 추론 토큰을 최대 50%나 줄여버린다.
Who Should Read
LLM 에이전트나 멀티턴 챗봇을 만들면서 복잡한 추론 태스크의 정확도가 왜 떨어지는지 고민하는 개발자. 긴 컨텍스트 환경에서 reasoning 모델을 사용하는 시스템을 설계하는 ML 엔지니어.
Core Mechanics
- 무관한 컨텍스트(예: 긴 문서, 이전 대화 기록)가 있으면 reasoning 모델이 같은 문제에 대해 추론 토큰을 최대 50% 덜 생성함. Qwen3.5-27B, GPT-OSS-120B, Gemini 3 Flash Preview, Kimi K2 Thinking 4개 모델 모두에서 확인됨.
- 추론이 짧아지는 이유는 모델이 문제를 잘못 이해해서가 아님. 실제로 모델은 무관한 컨텍스트를 '관련 없음'으로 즉시 인식하고 넘어가는데도 추론이 짧아짐.
- 핵심 차이는 '첫 번째 답 후보를 찾는 시점'이 아니라 '그 이후의 자기검증 행동'임. Baseline은 답을 찾은 후에도 double-check를 계속하지만, Long input 조건에서는 답을 내자마자 추론을 종료하는 경우가 훨씬 많음 (57% vs 68% 즉시 종료).
- 단 수백 토큰의 무관한 prefix만 삽입해도 평균 추론 길이가 18% 줄고, 64k 토큰을 삽입하면 53%까지 줄어듦.
- 쉬운 문제에서는 이 현상이 '오버싱킹 감소'로 작용해 정확도에 영향이 없지만, 어려운 수학 문제(IMOAnswerBench 기준)에서는 9~15% 정확도 하락이 발생함.
- 이 현상은 thinking 모드에서 훨씬 두드러짐. Non-thinking 모드는 응답 길이가 19% 줄지만, thinking 모드에서는 53%나 줄어듦.
Evidence
- IMOAnswerBench에서 Subtask/Long input 시나리오의 정확도 하락: Qwen-3.5-27B 12%, GPT-OSS-120B 9%, Gemini 3 Flash Preview 15%, Kimi K2 Thinking 9%.
- Qwen3.5-27B의 MATH500 기준 평균 추론 길이: Baseline 8,003 토큰 → Long input(64k prefix) 3,762 토큰으로 53% 감소.
- 리샘플링 실험에서 동일한 추론 prefix에서 Long input 조건은 46%가 즉시 추론 종료, Baseline 조건은 21%만 즉시 종료. 'Wait', 'Alternatively', 'But' 같은 자기검증 키워드 빈도도 함께 감소.
- 128 토큰만 삽입해도 Qwen3.5-27B의 평균 추론 길이가 약 18% 감소하며, 삽입 토큰이 늘수록 감소폭이 단조 증가함.
How to Apply
- 멀티턴 에이전트를 만들 때, 이전 대화 기록이 길어질수록 현재 서브태스크의 추론 품질이 저하될 수 있음. 서브태스크를 격리된 새 컨텍스트(별도 API 호출)로 처리하거나, 컨텍스트 압축(context compaction)을 적용하는 아키텍처를 검토하라.
- 어려운 추론 태스크에 reasoning 모델을 쓸 때, 프롬프트 앞에 불필요한 배경 정보나 이전 결과물을 무작정 붙이지 말 것. 필요한 정보만 추출해서 최소한의 컨텍스트로 구성하면 추론 품질을 유지할 수 있음.
- RAG 파이프라인에서 reasoning 모델을 사용하는 경우, 검색된 문서를 그대로 통째로 넣으면 추론이 짧아질 수 있음. 관련 청크만 정밀하게 추출해서 넣거나, 문제를 독립적인 서브태스크로 분리해 각각 짧은 컨텍스트로 호출하는 방식을 고려하라.
Code Example
# 긴 컨텍스트 환경에서 reasoning 품질을 유지하는 패턴 예시
# 나쁜 예: 무관한 컨텍스트와 문제를 함께 넣기
bad_prompt = """
[이전 대화 기록 또는 긴 문서 수천 토큰...]
위 내용을 바탕으로 다음 수학 문제를 풀어주세요:
{problem}
"""
# 좋은 예 1: 서브태스크를 격리된 새 컨텍스트로 호출
def solve_subtask_isolated(problem: str, client) -> str:
"""복잡한 에이전트 워크플로우에서 서브태스크를 격리해서 reasoning 품질 유지"""
response = client.chat.completions.create(
model="qwen/qwen3.5-27b", # 또는 다른 reasoning 모델
messages=[
{
"role": "user",
"content": f"Please reason step-by-step and put the final answer within \\boxed{{}}\n\n{problem}"
}
],
# 긴 에이전트 컨텍스트를 넘기지 말고 문제만 전달
)
return response.choices[0].message.content
# 좋은 예 2: 컨텍스트가 불가피하게 길다면 명시적으로 무시하도록 지시
def solve_with_context_hint(problem: str, context: str, client) -> str:
response = client.chat.completions.create(
model="qwen/qwen3.5-27b",
messages=[
{
"role": "user",
"content": f"[Background context - you may ignore this]:\n{context}\n\n[Task - focus entirely on this]:\nPlease reason step-by-step carefully, verify your answer, and put the final answer within \\boxed{{}}\n\n{problem}"
}
]
)
return response.choices[0].message.contentTerminology
Related Resources
Original Abstract (Expand)
Large language models (LLMs) exhibiting test-time scaling behavior, such as extended reasoning traces and self-verification, have demonstrated remarkable performance on complex, long-term reasoning tasks. However, the robustness of these reasoning behaviors remains underexplored. To investigate this, we conduct a systematic evaluation of multiple reasoning models across three scenarios: (1) problems augmented with lengthy, irrelevant context; (2) multi-turn conversational settings with independent tasks; and (3) problems presented as a subtask within a complex task. We observe an interesting phenomenon: reasoning models tend to produce much shorter reasoning traces (up to 50%) for the same problem under different context conditions compared to the traces produced when the problem is presented in isolation. A finer-grained analysis reveals that this compression is associated with a decrease in self-verification and uncertainty management behaviors, such as double-checking. While this behavioral shift does not compromise performance on straightforward problems, it might affect performance on more challenging tasks. We hope our findings draw additional attention to both the robustness of reasoning models and the problem of context management for LLMs and LLM-based agents.