Skip to content
Manoj Deshmukh
All English essays

The Practical Technologist · 3 Mar 2026 · 3 min read

The Role of Context in Generative AI - Why Prompt Engineering Is Not Enough Anymore

By Manoj Deshmukh
The Role of Context in Generative AI - 
Why Prompt Engineering Is Not Enough Anymore

A few months ago, I was working with my team on an internal AI documentation assistant.

Same model. Same question.

Two completely different answers.

Nothing changed — except the context.

After 26+ years in enterprise technology, one lesson has stayed constant:

Systems don’t fail because of lack of intelligence. They fail because of weak/incorrect architecture.

AI is no different.

In 2023, everyone spoke about prompt engineering.

In 2026, the serious conversation is about context engineering.

And these are not the same thing.


What Most Professionals Still Get Wrong

I still hear this often: “If I just write a better prompt, the AI will give me magic.”

That worked when we were experimenting.

But once you move into:

  • Multi-step workflows

  • Coding assistants

  • Enterprise AI integrations

  • RAG pipelines

  • AI agents

  • Production use cases

Prompt wording becomes the smallest part of the problem. The real question becomes:

What information environment are you designing around the model?

That’s context engineering.


Context Is the Architecture Around the Model

Technically, context includes everything the model sees:

  • System instructions

  • Conversation history

  • Retrieved documents

  • Code files

  • Tool outputs

  • Examples

  • Constraints

But here’s the blunt version:

If the AI doesn’t see it, it doesn’t exist.

  • It doesn’t remember your last session.

  • It doesn’t know your architectural decisions.

  • It doesn’t understand your constraints.

Unless you explicitly provide them.

In enterprise systems, we call this state management. With AI, context is state.


Prompt Engineering vs Context Engineering

Prompt engineering = Asking smarter questions.

Context engineering = Designing the information system around the AI.

One is tactical. The other is architectural.

During legacy modernization programs I worked on earlier in my career, success was never about clever code. It was about designing clean information flow.

AI is no different.

You don’t “ask better.”

You design better.

Four Practical Context Strategies I Use

1️⃣ Write Context

LLMs are stateless.

If something matters — coding conventions, deployment rules, security constraints — write it down.

Context files like:

  • claude.md

  • .cursorrules

  • Project AI onboarding docs

This is not innovation. It’s documentation discipline applied to AI.


2️⃣ Select Context

Don’t dump everything into the model.

In enterprise deployments, I’ve seen cases where the retrieval layer matters more than the model itself.

Relevance > Volume.


3️⃣ Compress Context

Large context windows don’t automatically mean better output.

As sessions grow, signal-to-noise ratio drops.

  • Summarize.

  • Reset.

  • Reload clean.

Architects understand this instinctively.


4️⃣ Isolate Context

Instead of one overloaded AI agent doing everything:

  • Break workflows apart.

  • Focused tasks.

  • Clear responsibility.

This mirrors microservices thinking — one job per component.

We’ve been doing this in software for years. AI should follow the same discipline.


Context Files: The Underrated Multiplier

A strong context file includes:

  • Tech stack

  • Architecture decisions

  • Naming conventions

  • Security rules

  • Deployment patterns

  • Constraints

Load this before every session, and the AI behaves like a developer who has actually read the onboarding manual.

Sloppy teams produce sloppy AI outputs.

It’s that simple.


A Practical Trick: Context Stacking

Instead of saying:

“Act as an expert architect.”

Stack context like this:

  • Objective

  • Deliverable format

  • Constraints

  • Definitions

  • Evaluation criteria

Concrete environments produce concrete outputs.

Vague prompts produce vague results.


The Bigger Shift

The value is shifting from execution to definition.

The strongest AI practitioners I see today are:

  • Strong system thinkers

  • Good architects

  • Disciplined documenters

  • Clear in defining constraints

Classic engineering strengths are winning again.

Ironically, AI is rewarding traditional engineering maturity.


Practical Advice for Teams

  • Create reusable context files.

  • Build structured templates.

  • Design retrieval layers carefully.

  • Reset long sessions intentionally.

  • Treat AI onboarding like employee onboarding.

And most importantly:

Stop blaming the model first.

Check your context.


Final Thought

Prompt engineering was experimentation. Context engineering is maturity.

Models will improve.

Architecture discipline will always differentiate.

AI is not a genie.

It is infrastructure.

And infrastructure demands architecture.


If you’re building AI systems inside your organization, I’d love to hear:

Are you still optimizing prompts — or designing context?

First published on LinkedIn.

Read next