---
title: "Preventing AI Workflows from Degrading: Understanding Context Engineering"
url: https://adtech.lol/articles/08c5ca45-0dc6-455f-9ae5-d193b7444701
source_url: https://searchengineland.com/context-engineering-prevent-ai-workflows-degrading-494025/
source_site: searchengineland
author: "Tania Brown"
published: 2023-10-24T00:00:00+00:00
tags: ["AI", "Context Engineering", "Large Language Models", "Workflow Optimization"]
publisher: AdTech Radar
---

# Preventing AI Workflows from Degrading: Understanding Context Engineering

> This article delves into the importance of managing context in AI workflows, particularly when using large language models (LLMs). It explains the concept of 'context rot' and offers solutions to maintain effective AI output.

## Introduction

You build a skill that produces page optimization briefs and it works. A couple of months later, however, the output is noticeably worse. Maybe the briefs are more vague, or they mention services you no longer offer.

When this happens, we might blame a model update or try to fix our prompts. But if the prompt has worked consistently across models, we need to turn our attention to the context the LLMs use to generate output.

By addressing context issues and creating a system to identify and cull rot, you can improve your Claude outputs.

## What is context?

Context is everything an LLM reads while it tries to complete a task. While some of the context is provided via the prompt, that’s not the only context Claude and other AI tools rely on.

In addition to any background you shared in your prompt or attached files, context also includes the skills Claude uses, its memory, project knowledge, whatever a tool returns when it runs, what an earlier stage handed forward, and earlier turns of a long thread.

Often, this material loads without anyone asking for it. You didn’t type it into the prompt or point the prompt at it, so there’s no moment in your process where you’d think to review it. Managing that material on purpose is what people mean by context engineering.

Anthropic’s engineering team calls context “the set of strategies for curating and maintaining the optimal set of tokens (information) during LLM inference.” Unfortunately, it’s easy to do the curating once, when you build the skill, and never get back to the maintenance.

## What is context rot?

Context rot is what happens when the material a job reads degrades over time. The workflow stays the same while the work around it changes:

- You add or drop a service, and the skill still describes the old offer
- Your company restructures, or your team changes how it works
- A tool you rely on changes what it returns or how it formats it
- Your style guide gets revised, and the old rules are still in the files the job reads
- New files and skills get added that contradict the ones already there
- You move or rename a file, and the instructions still point to where it used to be

None of these changes reach the workflow on their own. It keeps reading the old material on every run.

## 6 ways context rots

Context rot shows up in six ways:

1. **Volume issues produce vague output that skips instructions.**
   Issues with volume mean there’s too much material in front of the model at once. The output gets vaguer and starts missing instructions you know are in the file.

2. **Competition produces inconsistent output.**
   Competition issues arise when there are too many valid options for the model to choose between. Each one is accurate on its own, but they’ve piled up as you connect more tools and add more templates.

3. **Divergence issues produce inconsistent output.**
   Divergence occurs when material that’s supposed to match drifts apart. You update one file, but copies of it or examples built from it still reflect the old version.

4. **Staleness leads to inaccuracies.**
   Simply put, staleness is material that was accurate when you wrote it and isn’t now. The output stays confident and specific, and that’s what makes it expensive.

5. **Conflict produces confident inaccuracies.**
   Conflict arises when two things in the context disagree, and nothing in the output tells you which one it followed.

6. **Contamination introduces potential inaccuracies.**
   With contamination, a mistake makes it into the context, and every step after that treats it as true.

## How to find and fix context rot

Pick the workflow you run most often, like the brief skill from our example, and run it once. Then check what it read.

In Claude chat and Cowork, each step Claude takes shows up as a collapsed line in the conversation. Click a line to expand it and see what came back.

Next, identify where that context is called upon and check where Claude pulled it from. Set a recurring reminder to review your skills, project knowledge, connected folders, and memory. Make context engineering part of your routine to continue to get the most from your favorite AI tool.

Source: [https://searchengineland.com/context-engineering-prevent-ai-workflows-degrading-494025/](https://searchengineland.com/context-engineering-prevent-ai-workflows-degrading-494025/)
