Skip to main content

    EXPLAINER / 10 MIN READ

    Context engineering is the job now.

    By Alex Cinovoj, Founder & CTO, TechTide AI · 13 years of mixed IT, last 2 focused on AI implementation.

    The prompt used to be the whole job. Now it's the smallest part. Production agent quality comes from what enters the context window on every single call: which documents got retrieved, in what order, how tool results got shaped, and how much of the token budget is left for the model to actually reason. Teams that treat this as an afterthought get agents that work in the demo and fall apart at turn twelve. This is the discipline we apply on every engagement, and the specific practices that moved our numbers.

    What context engineering actually covers

    Context engineering is the discipline of deciding, for every single model call, exactly what information goes in, where it sits, and how much room it takes. That includes:

    • System instructions. Static rules, persona, and constraints.
    • Retrieved knowledge. Whatever a RAG pipeline or search step pulled in.
    • Tool results. Output from function calls, API responses, database queries.
    • Conversation history. Prior turns, which grow unbounded if you let them.
    • Working memory. Intermediate reasoning or state the agent needs to carry forward between steps.

    Every one of those competes for the same token budget, and every one degrades the model's attention if it's noisy, stale, or out of order. Engineering the prompt wording is maybe 10% of the job now. The other 90% is deciding what belongs in that list above and what gets cut.

    Practice one: retrieval scoped to the task, not the corpus

    The most common mistake we see is retrieval tuned to maximize recall across an entire knowledge base instead of precision for the specific task at hand. A support agent answering a billing question doesn't need the entire product documentation corpus searched, it needs the three most relevant billing articles. Scope the retrieval index, or at minimum the query filters, to the workflow, not the whole company's knowledge.

    This connects directly to the retrieval fundamentals we cover in our explainer on MCP, since a well-scoped MCP tool for search behaves the same way: narrow input, narrow relevant output, not a firehose.

    Practice two: order matters, put the important thing last

    Models weight information near the end of the context more heavily in most current architectures. If your system prompt buries the actual task instruction under three paragraphs of persona description, and then the retrieved documents come after that, the model may lose track of what it's actually supposed to do. Put stable, generic instructions early. Put the specific task and the most decision-relevant fact right before the model's turn.

    Practice three: compact tool results before they enter context

    Raw JSON from a CRM or ERP tool call often carries forty fields when the model needs three. Every extra field is tokens spent and attention diluted. Post-process tool results at the server layer, not in the prompt, so the model only ever sees the shape it needs.

    Here is the compaction checklist we run on every tool integration:

    1. List the fields the model actually references in its next decision.
    2. Strip everything else at the tool-server boundary, before it reaches the model.
    3. Flatten nested structures the model doesn't need to navigate.
    4. Replace verbose enums or IDs with human-readable labels the model can reason about directly.
    5. Cap array results (e.g. "top 5 matching records") instead of returning unbounded lists.

    Practice four: manage conversation history with summarization, not truncation

    The naive fix for a growing conversation is to just drop the oldest turns once you hit a token limit. That works until the dropped turn contained a constraint the user set five messages ago, and the agent silently violates it. Better: summarize older turns into a compact state object, preserve explicit constraints and decisions verbatim, and only truncate the parts that were genuinely transient chit-chat.

    Practice five: set a hard token budget per call and monitor it like a cost line

    Treat the context budget the same way you'd treat a cloud spend ceiling. Set a maximum token count per call, alert when a workflow trends toward it, and force a design conversation before you just raise the ceiling. Left unmanaged, context bloat is one of the fastest ways an agent workflow becomes unprofitable. We go deeper on the cost side of this in our orchestration guide.

    Where this shows up in production numbers

    On engagements where we've rebuilt context assembly rather than swapping models, we've seen eval pass rates move more than any single model upgrade did in the same period. That's the pattern worth internalizing: the model is rarely the bottleneck anymore. The bottleneck is whether your system hands the model a clean, scoped, well-ordered picture of the world on every single call. If your agent's accuracy is inconsistent and you've already tried three different models, the context assembly is almost always where we start when we run a technical audit.

    Frequently asked

    • No. Prompt engineering is about wording a single instruction well. Context engineering is about deciding the entire set of information the model sees on a given call: retrieved documents, tool results, conversation history, and system instructions, plus the order and budget for each. Wording still matters, but it's a small slice of the job now.

    About the author

    Alex Cinovoj, Founder and CTO, TechTide AI

    13 years of mixed IT, the last 2 focused entirely on AI implementation. Alex runs TechTide AI, an implementation studio that takes stalled AI pilots into production. He writes about the work in progress at alexcinovoj.com.

    Related field notes

    • SECURITY · 9 min · Agents

      Prompt injection is an access-control problem.

      You cannot prompt your way out of prompt injection. Defend it like access control: scoped credentials, typed tools, allowlists, and a human gate on writes.

    • ANALYSIS · 10 min · Agents

      The harness matters more than the model now.

      Frontier models converged. What separates working agents in 2026 is the harness: state, retries, checkpoints, budgets, and recovery. What to build first.

    All field notes →

    Get an outside read on your context pipeline.