본문으로 건너뛰기
Skillpedia
에이전트48k · #4250

context-degradation

하는 일

이 도구는 AI 모델이 한 번에 너무 많은 정보를 받을 때 어떻게 어려움을 겪는지 이해하도록 돕습니다. 입력한 텍스트가 매우 길어질 때 AI가 실패하거나 잘못된 답을 하기 시작하는 방식인 ‘맥락 저하’ 패턴을 설명합니다.

사용하는 경우

  • ✓긴 대화에서 AI가 이상한 답을 할 때.
  • ✓AI가 실수하거나 말이 안 되는 말을 하는 이유를 알고 싶을 때.
  • ✓많은 양의 텍스트를 안정적으로 처리해야 하는 AI 시스템을 만드는 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/context-degradation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/context-degradation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“대화 초반에 제가 준 정보를 AI가 잊어버리는 이유는 무엇인가요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 제한된 기억을 가진 뇌처럼 작동합니다. 텍스트가 너무 길어지면 모든 것을 기억하기 어려워지며, 특히 가운데 있는 내용을 잘 기억하지 못합니다. 이런 ‘잊어버림’ 문제에는 예측 가능한 패턴이 있어 연구할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Context Degradation Patterns

Language models exhibit predictable degradation patterns as context length increases. Understanding these patterns is essential for diagnosing failures and designing resilient systems. Context degradation is not a binary state but a continuum of performance degradation that manifests in several distinct ways.

When to Use

Activate this skill when:

  • Agent performance degrades unexpectedly during long conversations
  • Debugging cases where agents produce incorrect or irrelevant outputs
  • Designing systems that must handle large contexts reliably
  • Evaluating context engineering choices for production systems
  • Investigating "lost in middle" phenomena in agent outputs
  • Analyzing context-related failures in agent behavior

Core Concepts

Context degradation manifests through several distinct patterns. The lost-in-middle phenomenon causes information in the center of context to receive less attention. Context poisoning occurs when errors compound through repeated reference. Context distraction happens when irrelevant information overwhelms relevant content. Context confusion arises when the model cannot determine which context applies. Context clash develops when accumulated information directly conflicts.

These patterns are predictable and can be mitigated through architectural patterns like compaction, masking, partitioning, and isolation.

Detailed Topics

The Lost-in-Middle Phenomenon

The most well-documented degradation pattern is the "lost-in-middle" effect, where models demonstrate U-shaped attention curves. Information at the beginning and end of context receives reliable attention, while information buried in the middle suffers from dramatically reduced recall accuracy.

Empirical Evidence Research demonstrates that relevant information placed in the middle of context experiences 10-40% lower recall accuracy compared to the same information at the beginning or end. This is not a failure of the model but a consequence of attention mechanics and training data distributions.

Models allocate massive attention to the first token (often the BOS token) to stabilize internal states. This creates an "attention sink" that soaks up attention budget. As context grows, the limited budget is stretched thinner, and middle tokens fail to garner sufficient attention weight for reliable retrieval.

Practical Implications Design context placement with attention patterns in mind. Place critical information at the beginning or end of context. Consider whether information will be queried directly or needs to support reasoning—if the latter, placement matters less but overall signal quality matters more.

For long documents or conversations, use summary structures that surface key information at attention-favored positions. Use explicit section headers and transitions to help models navigate structure.

Context Poisoning

Context poisoning occurs when hallucinations, errors, or incorrect information enters context and compounds through repeated reference. Once poisoned, context creates feedback loops that reinforce incorrect beliefs.

How Poisoning Occurs Poisoning typically enters through three pathways. First, tool outputs may contain errors or unexpected formats that models accept as ground truth. Second, retrieved documents may contain incorrect or outdated information that models incorporate into reasoning. Third, model-generated summaries or intermediate outputs may introduce hallucinations that persist in context.

The compounding effect is severe. If an agent's goals section becomes poisoned, it develops strategies that take substantial effort to undo. Each subsequent decision references the poisoned content, reinforcing incorrect assumptions.

Detection and Recovery Watch for symptoms including degraded output quality on tasks that previously succeeded, tool misalignment where agents call wrong tools or parameters, and hallucinations that persist despite correction attempts. When these symptoms appear, consider context poisoning.

Recovery requires removing or replacing poisoned content. This may involve truncating context to before the poisoning point, explicitly noting the poisoning in context and asking for re-evaluation, or restarting with clean context and preserving only verified information.

Context Distraction

…

자주 묻는 질문

‘중간에서 잃어버리는 현상(lost-in-middle)’이란 무엇인가요?

AI가 입력된 텍스트의 처음과 끝에 있는 정보에 더 주의를 기울이고, 중간에 있는 내용은 잊거나 무시하는 현상입니다.

‘맥락 오염(context poisoning)’이란 무엇인가요?

잘못되었거나 지어낸 정보가 AI의 텍스트에 들어가고, AI가 이를 믿기 시작하면서 시간이 지날수록 답변이 나빠지는 현상입니다.

AI가 쓸모없는 정보에 산만해지지 않게 하려면 어떻게 하나요?

AI에 넣을 정보를 신중하게 선택해 주세요. 중요하지 않은 정보는 AI에 주기 전에 제거하거나, 무시하기 쉽게 텍스트를 정리해 주세요.

상세 정보

작성자의 원본 설명

Language models exhibit predictable degradation patterns as context length increases. Understanding these patterns is essential for diagnosing failures and designing resilient systems.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4250
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬