Context Engineering for real-world usecases

Moving towards the end of our blog series on Context Engineering, the last one we are talking about some examples from different domains on how context engineering would look like for software engineering, or be it cooking, or be it medical science.
Context Engineering Crash Course
If you dont know what is Context Engineering, check this video
https://medium.com/media/9e34d3def0f95945cbae2c71f470c6a7/href
1. Software Engineering / Programming
Default Prompt:
“Write a Python function to parse a CSV file.”
Context Engineered Prompt:
“You’re a senior backend engineer working on a Flask-based web app for a fintech dashboard. We receive financial CSV reports with inconsistent delimiters (sometimes semicolon, sometimes comma), and the headers can vary slightly (like ‘amount’ or ‘amt’). Write a robust Python function that can standardize and parse such files, using pandas. Output must return a DataFrame with clean columns: date, amount, description. Ignore GUI or upload logic.”
https://medium.com/media/d70539c8e1d375df292faef764b86842/href
What we did:
- Role (senior backend engineer)
- Project scope (Flask fintech dashboard)
- Real-world quirks (inconsistent delimiters, header variations)
- Libraries to use
- Final output format and expectations
2. Blog Writing
Default Prompt:
“Write a blog about productivity tips.”
Context Engineered Prompt:
“You’re writing a short, slightly sarcastic blog aimed at burned-out startup workers who are allergic to the word ‘hustle’. Tone: dry humor, minimal fluff. It should offer 5 anti-productivity tips — things people should stop doing if they want to be more focused. Think of it as an inverse of the usual self-help stuff. Keep paragraphs punchy. Mention how ‘inbox zero’ is a scam.”
What we did:
- Audience (burned-out startup workers)
- Tone (dry humor, sarcastic)
- Angle (inverse advice)
- Specific ideas to hit (‘inbox zero’)
My new book Model Context Protocol : Advanced AI Agents for Beginners is live
Model Context Protocol: Advanced AI Agents for Beginners (Generative AI books)
3. Image Generation
Default Prompt:
“Generate an image of a sunset over mountains.”
Context Engineered Prompt:
“Create a 16:9 landscape image suitable for a YouTube video thumbnail about solitude. The image should show a hiker standing alone on a ridge during sunset, with warm tones but no harsh reds — more gold-orange. The style should resemble minimalist digital painting, no photorealism. The mood should feel quiet but not sad.”
What we did:
- Use case (YouTube thumbnail)
- Subject and mood (solitude, hiker)
- Style (minimalist, digital painting)
- Color palette and emotion guidance
4. Cooking
Default Prompt:
“Give me a recipe for lasagna.”
Context Engineered Prompt:
“I’m a broke college student in a dorm with only a microwave and a mini-fridge. I want to make something like lasagna but faster, cheaper, and with ingredients from a 7-Eleven. Think lazy, layered food with some Italian vibes. I have access to a microwaveable pasta bowl, string cheese, canned sauce, and white bread. Give me a hacked-together dorm-friendly lasagna recipe. Include cooking time and cleanup tips.”
What we did:
- Real-life constraint (dorm, broke, microwave only)
- Ingredient limitation
- Desired outcome (lasagna vibes, not authentic)
- Additional value (clean-up tips)
5. Legal Documents
Default Prompt:
“Generate a basic NDA agreement.”
Context Engineered Prompt:
“You are a junior legal associate drafting a mutual NDA for a startup founder and a freelance developer discussing a potential AI project. The founder is non-technical, the freelancer is remote and overseas (India). Keep the language plain-English and explain each clause briefly in layman terms after it, like an inline comment. Avoid jurisdictional complexity — assume both parties just want basic protection before talking freely.”
What we did:
- Audience (founder and freelance dev)
- Simplified language needed
- Dual format (legal clause + explanation)
- Scope of document (pre-discussion NDA)
6. Doctor’s Advice
Default Prompt:
“What are the symptoms of diabetes?”
Context Engineered Prompt:
“Act like a family doctor talking to a slightly anxious 45-year-old who Googles too much. Explain the early symptoms of Type 2 diabetes in simple, non-alarming language. Use casual metaphors where needed. Don’t list them like a textbook — make it a story. Also mention which symptoms are not a concern unless persistent. End with: when it’s okay to wait, and when to see a doctor.”
What we did:
- Tone (non-alarming, metaphor-friendly)
- Audience (worried patient who over-Googles)
- Structure (not a list, more narrative)
- Clear CTA (when to worry / not)
So, How Do You Actually Build Context Like This?
- Start with the user — Who is asking this and why now?
- Zoom into constraints — What tools, limitations, or weird edges exist?
- Decide the tone — Clinical? Casual? Jaded? Cheery? That shifts everything.
- Think output-first — Is this going to be copy-pasted, sent to a boss, cooked tonight, or turned into code?
- Visualize the moment — Imagine yourself in the room, in the use case, talking to the person who needs this.
Sometimes, it helps to roleplay: “If I were in this situation, what background would I need to make the AI useful?”
Conclusion
That’s the thing about context — it’s invisible until it isn’t. The shift from generic prompting to context-aware thinking is like moving from “just ask” to “actually understand.” Whether you’re coding, cooking, or drafting legal docs, context isn’t just helpful — it’s decisive. And the better you get at shaping it, the less you’ll rely on luck to get good AI responses.
Context Engineering Examples was originally published in Data Science in Your Pocket on Medium, where people are continuing the conversation by highlighting and responding to this story.