I was sitting on my 16-hour 17-minute flight from Dubai back to the US, doing some research on my YouTube videos I had downloaded for the trip. And I discovered something.
Prompts are not nearly as effective as they used to be.
Then I stumbled across data that broke my brain.
An older, weaker AI model (GPT-3.5) was crushing the performance of a newer, more powerful model (GPT-4). Not by a little. By a lot.
48% vs 95%.
Same task. Same benchmark.
The only difference?
One used a prompt.
The other used a flow.
Flow Engineering.
That moment changed everything I thought I knew about working with AI. And if you’re still obsessing over the perfect prompt, you’re already behind.
Let me show you what’s actually moving the needle in 2025... and why mastering this skill will separate the winners from everyone else in 2026.
Andrew Ng took the stage at Sequoia Capital’s AI Ascent conference with a chart that stunned the audience.
His team had run experiments on the HumanEval coding benchmark, a standard test for measuring how well AI can write code. The task was simple: given a problem description, write correct Python code.
Here’s what they found:
GPT-3.5 with a single prompt? 48.1% accuracy.
GPT-4 with a single prompt? 67% accuracy.
But here’s where it gets interesting.
GPT-3.5 wrapped in an “agentic workflow”? 95.1% accuracy.
Read that again. A weaker, cheaper model nearly doubled the performance of the more advanced model. All by changing how the AI worked, not which AI was used.
As Ng put it: “The improvement from GPT-3.5 to GPT-4 is dwarfed by incorporating an iterative agent workflow.”
This wasn’t a fluke. This was a paradigm shift.
The researchers at CodiumAI coined the term “flow engineering” in their groundbreaking paper on AlphaCodium. Their subtitle said it all: “From Prompt Engineering to Flow Engineering.”
So what exactly is it?
Flow engineering is the practice of designing multi-step, iterative workflows for AI systems instead of relying on single-shot prompts.
Think about how you actually write an essay. You don’t type from start to finish without ever hitting the backspace key. You plan. You draft. You revise. You get feedback. You edit again.
That’s exactly what flow engineering does for AI.
Instead of asking an LLM to solve a problem in one shot, you design a series of steps where the AI can:
Break down complex problems into smaller pieces
Generate initial attempts
Critique its own work
Run tests and check for errors
Revise and improve based on feedback
Iterate until the quality meets a threshold
Andrew Ng compares traditional prompting to asking someone to “write an essay without ever using the backspace key.” It works... but not nearly as well as it could.
At Sequoia’s AI Ascent 2024, Ng outlined four core design patterns that define how modern agentic workflows operate. Master these, and you’ll understand the architecture behind every successful AI application shipping today.
The AI critiques its own output and iterates to improve.
Imagine an AI writes code. Then a second prompt asks: “Review this code. What bugs do you see? What could be improved?” The AI finds issues. Then it fixes them. Then it reviews again.
This simple loop can dramatically improve results. Ng shared that he was “delighted by how much reflection improved my applications’ results.”
Key insight: You can implement reflection with just two agents. One generates. One critiques. The debate between them leads to better outcomes.
The AI can call external tools: web search, code execution, APIs, databases.
This is huge. Instead of relying purely on what the model “knows,” you give it the ability to retrieve information, run calculations, and take actions in the real world.
When an LLM can execute the code it writes and see the actual error messages, it can fix problems that pure generation never could.
The AI breaks complex tasks into a sequence of smaller steps, then executes them one by one.
Instead of asking “build me a complete application,” you prompt the AI to first create a plan: “What are the steps needed? What tools will you use? What order makes sense?”
Then the AI works through its own plan systematically. If step 3 fails, it can adjust and try a different approach.
Multiple specialized AI agents work together, each handling different parts of a complex task.
Picture a coding team: one agent writes code, another agent reviews it, a third agent runs tests, and a fourth agent handles deployment. They communicate, debate, and iterate together.
Ng describes this as similar to “multi-threading on a CPU.” You’re still using one processor, but abstracting tasks into different roles helps break down complexity.
The AlphaCodium paper from CodiumAI demonstrated just how powerful flow engineering could be in practice.
They tested their approach on CodeContests, a dataset of competitive programming problems from platforms like Codeforces. These aren’t simple coding exercises. They’re the kind of problems that stump many professional developers.
With a single well-designed prompt, GPT-4 achieved 19% accuracy (pass@5).
With the AlphaCodium flow, GPT-4 achieved 44% accuracy.
That’s more than double the performance, using the same underlying model.
Here’s what their flow looks like:
Pre-Processing Phase:
Analyze the problem and extract goals, inputs, outputs, rules, and constraints
Reason about the public test cases to understand the expected behavior
Generate multiple possible solutions
Rank solutions by simplicity and robustness
Generate additional AI test cases to catch edge cases
Iteration Phase: 6. Generate initial code 7. Run code against public tests 8. If tests fail, analyze errors and fix the code 9. Run code against AI-generated tests 10. Iterate until all tests pass
The key insight? “Generating additional useful tests is easier than generating correct code.” By creating extra test cases, the AI can catch and fix problems it would have otherwise missed.
Just when developers started getting comfortable with flow engineering, another shift happened.
In mid-2025, Andrej Karpathy (former Tesla AI director, OpenAI co-founder) weighed in with a new term: context engineering.
His take? “I really like the term ‘context engineering’ over ‘prompt engineering.’ People associate prompts with short task descriptions you’d give an LLM in your day-to-day use. When in every industrial-strength LLM app, context engineering is the delicate art and science of filling the context window with just the right information for the next step.”
Shopify CEO Tobi Lütke backed this view: “It describes the core skill better: the art of providing all the context for the task to be plausibly solvable by the LLM.”
So what’s the difference?
Prompt engineering = crafting the perfect instruction (the single message you send)
Context engineering = designing everything the model sees (system instructions, retrieved documents, conversation history, tool outputs, user metadata, role definitions, and more)
Flow engineering = orchestrating multi-step processes where context is dynamically assembled at each stage
These concepts layer on top of each other. Flow engineering defines the structure of how an AI system works. Context engineering defines what information fills each step.
Here’s the uncomfortable truth: the skills that made someone valuable in 2023 are becoming table stakes. Or worse, obsolete.
Gartner has identified context engineering as a critical skill for successful AI-enabled processes. Companies are already hiring “context designers” alongside ML engineers.
The shift is happening across every major tech company:
OpenAI’s Assistants API is built around agentic workflows
Anthropic’s Claude can now call tools, maintain memory, and execute multi-step processes
Google’s Gemini emphasizes tool use and planning capabilities
Microsoft’s Copilot is evolving from single-prompt assistance to workflow automation
The winners in 2026 won’t be the people who write the cleverest prompts. They’ll be the ones who design the smartest systems.
Here’s a practical framework to shift your approach:
If you’re spending hours tweaking a single prompt, you’re optimizing the wrong thing. Instead, ask: “How can I break this into multiple steps?”
After any AI generates output, add a second step where the AI reviews and critiques its own work. This alone can dramatically improve results.
Try this simple pattern:
Generate → “Create a solution for X”
Reflect → “Review this solution. What are the weaknesses? What could be improved?”
Revise → “Now create an improved version addressing those issues”
Don’t make the AI guess. Give it the ability to:
Search for real information
Execute code and see actual results
Access relevant databases and documents
Verify its outputs against external sources
Build in loops. Let the AI try, fail, learn, and try again. The power isn’t in the first attempt. It’s in the refinement cycle.
Ask yourself: “If I had a team of specialists working on this, how would they divide the work? How would they communicate?”
Then design your AI system the same way.
You are operating as a multi-step research and analysis agent. Do NOT produce a final output immediately. Instead, follow this exact workflow, completing each phase before moving to the next.
=== PHASE 1: PROBLEM DECOMPOSITION ===
First, break down my request into:
- Core question to answer
- 3-5 sub-questions that must be addressed
- Key terms that need definition
- Potential blind spots or biases to watch for
Output your decomposition, then say "PHASE 1 COMPLETE" and proceed.
=== PHASE 2: INITIAL RESEARCH & DRAFTING ===
For each sub-question identified:
- Provide your best current understanding
- Note confidence level (high/medium/low)
- Flag areas where you're uncertain or information may be outdated
Create a rough first draft addressing the core question.
Output your draft, then say "PHASE 2 COMPLETE" and proceed.
=== PHASE 3: SELF-CRITIQUE (REFLECTION) ===
Now switch roles. You are a skeptical editor reviewing the draft above. Identify:
- 3 weaknesses or gaps in the argument
- 2 claims that need stronger evidence
- 1 alternative perspective that wasn't considered
- Any logical fallacies or unsupported leaps
Be harsh. Output your critique, then say "PHASE 3 COMPLETE" and proceed.
=== PHASE 4: REVISION ===
Now return to your original role. Using the critique above:
- Address each weakness identified
- Strengthen the evidence for flagged claims
- Incorporate the alternative perspective
- Fix any logical issues
Produce a revised, improved version.
Output your revision, then say "PHASE 4 COMPLETE" and proceed.
=== PHASE 5: FINAL POLISH ===
Review your revised draft for:
- Clarity (can a smart 15-year-old understand this?)
- Flow (does each section connect logically?)
- Actionability (what should the reader DO with this information?)
Make final adjustments and output your completed analysis.
End with "WORKFLOW COMPLETE" and a 2-sentence summary of your key finding.
---
MY REQUEST: [INSERT YOUR ACTUAL QUESTION/TASK HERE]Here’s what most people miss: flow engineering isn’t just about better outputs. It’s about building systems that can be tested, monitored, and improved.
When you design a multi-step workflow:
You can see where things break
You can measure performance at each stage
You can iterate and optimize specific steps
You create audit trails for compliance
You build institutional knowledge about what works
A single prompt is a black box. A well-designed flow is an observable system.
This is why Ng believes agentic workflows will drive more progress than the next generation of foundation models. The leverage isn’t just in having a smarter model. It’s in how you use it.
There’s one thing Ng is honest about: patience.
Agentic workflows take time. Unlike traditional search that returns results in milliseconds, an agent working through a complex task might take minutes or even hours.
“Learning to delegate tasks to AI and waiting for thoughtful results is a shift we’ll need to embrace,” Ng acknowledged.
This is a cultural change as much as a technical one. We’re used to instant responses. Building with agents means accepting a different rhythm.
But the tradeoff is worth it. Faster token generation is making agents more practical every month. And the quality gains are too significant to ignore.
The landscape has shifted. Prompt engineering isn’t dead in the sense that prompts don’t matter. They absolutely do. But treating prompts as the entire skill is like thinking typing speed is the key to good writing.
The new skill set is architectural:
How do you break tasks into steps?
How do you orchestrate multiple agents?
What context does each step need?
How do you evaluate and improve the system?
Andrew Ng put it simply: “The hardest thing is just building something that works.”
Start small. Pick one task you currently handle with a single prompt. Break it into three steps. Add reflection. See what happens.
The people who master flow engineering in 2025 will own the AI advantage in 2026.
Don’t get left behind.
What workflow will you build first? Reply and let me know. I read every response.
Happy HolidAI and Happy New YeAIr.
Andrew Ng’s Agentic AI Course - The definitive resource for learning to build agentic systems from the ground up
AlphaCodium Paper - The original research on flow engineering for code generation
Andrej Karpathy on Context Engineering - The X thread that defined the next evolution
Context Engineering GitHub Repository - A first-principles handbook for the new discipline
Sequoia AI Ascent 2024 - Where the leading minds in AI mapped out where we’re headed
No posts

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.