Saltar al contenido
Skillpedia
Agentes48 mil · #4250

context-degradation

Qué hace

Esta herramienta ayuda a entender cómo los modelos de IA pueden tener problemas cuando reciben demasiada información de golpe. Explica los patrones de "degradación del contexto", es decir, las formas en que una IA puede empezar a fallar o a dar respuestas incorrectas cuando el texto que le das es muy largo.

Cuándo usarla

  • ✓Cuando la IA empieza a dar respuestas extrañas en conversaciones largas.
  • ✓Para averiguar por qué la IA comete errores o dice cosas sin sentido.
  • ✓Cuando creas sistemas de IA que tienen que manejar mucho texto de forma fiable.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/context-degradation/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Por qué la IA olvida la información que le di al principio de nuestra conversación?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Una IA funciona como un cerebro con memoria limitada. Cuando el texto se alarga, puede tener problemas para recordarlo todo, sobre todo lo que está en medio. Hay patrones predecibles en estos "olvidos" que podemos estudiar.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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

…

Preguntas frecuentes

¿Qué es el fenómeno de "perdido en medio"?

Es cuando la IA presta más atención a la información del principio y del final del texto que le das, y olvida o ignora lo que está en medio.

¿Qué es el "envenenamiento del contexto"?

Ocurre cuando información incorrecta o inventada entra en el texto de la IA y ella empieza a creérsela, lo que lleva a respuestas cada vez peores.

¿Cómo puedo evitar que la IA se distraiga con información inútil?

Selecciona con cuidado lo que pones en el texto de la IA. Quita la información poco importante antes de dársela, o organiza el texto para que las partes irrelevantes sean fáciles de ignorar.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
48 mil
Posición en el ranking
#4250
Licencia
MIT
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas