Jeffrey Williams · Originally published on LinkedIn
The Princess Prompt: Zero-Shot, One-Shot, Few-Shot… As You Wish, Bob!
Hello. My Name Is Inigo Montoya. You Killed My Prompt. Prepare to Iterate.
I have a confession.
Last week, someone put thoughts of the The Princess Bride into my head again.
Now, anyone who knows me knows that my brain has a peculiar habit of connecting perfectly reasonable engineering concepts to completely ridiculous movies.
Which brings me to a recent tragedy of almost unimaginable proportions. One that shook the very foundations of our household.
My copy of The Princess Bride had mysteriously vanished from my movie collection!
INCONCEIVABLE!
Naturally, I declared a full-scale household emergency.
Thankfully, Amazon came to the rescue and helped avert what could only be described as a cinematic catastrophe of epic proportions.
My wife, of course, remained completely unimpressed.
Apparently, she doesn't consider a missing copy of The Princess Bride a legitimate family emergency.
Marriage is full of challenges.
Now that we've averted that particular catastrophe, let's get back to our adventure!
I've been spending a considerable amount of time working with IBM Bob, exploring how AI can help us understand, document, refactor, test, and ultimately futurize IBM i applications.
And something occurred to me.
Prompting an AI agent is remarkably similar to the adventures of Westley, Inigo Montoya, Fezzik, and that insufferably confident little genius, Vizzini.
Some people approach AI with absolute confidence and almost no preparation.
Others provide an example.
And the really clever ones understand that a few carefully selected examples can accomplish more than a thousand words of vague instructions.
Which brings us to three fundamental prompting techniques:
• Zero-shot prompting
• One-shot prompting
• Few-shot prompting
And we're going to learn them through glass darkly of The Princess Bride.
Naturally.
INCONCEIVABLE!
Act I: Vizzini Discovers Zero-Shot Prompting
Picture Vizzini sitting at his workstation.
He's just installed IBM Bob.
He's heard wonderful things about AI. Apparently, Bob can understand RPG and COBOL, generate code, create service programs, write automated tests, automate Requirements Traceability Matrices (RTMs), and even help build the tools, extensions, and workflows needed to more effectively adopt and integrate AI to completely transform the entire engineering lifecycle.
He rubs his hands together.
"This should be easy. After all, I possess a dizzying intellect!"
He opens Bob and types:
"Modernize my RPG application."
That's it.
No examples.
No architectural guidance.
No indication of what modernization means.
No explanation of the business rules.
Just one glorious command.
Bob looks at the application.
Yes, the ENTIRE application! The unfortunate consequence of a spectacularly vague, poorly constructed prompt that gave Bob absolutely no idea where to begin—or, more importantly, where to stop.
Thousands of lines of fixed-format RPG.
A database design that predates the invention of the personal computer.
And enough undocumented business rules to keep an archaeologist employed for the next decade.
Somewhere, Bob's coin counter begins spinning like Count Rugen's Machine in the Pit of Despair.
Woe unto the Bob coin usage!
And here's the real problem.
Bob has absolutely no indication of what Vizzini actually wants.
Does he want free-format RPGLE?
Service programs?
Embedded SQL?
A new user interface?
Automated unit tests?
All of the above?
Bob has been asked to modernize an entire application without being told what modernization actually means!
No defined scope. No clear objective. No acceptance criteria.
Just an enormous application, an ambiguous prompt, and a rapidly diminishing supply of Bob coins.
And Vizzini?
He expects perfection.
After all, he possesses a dizzying intellect!
INCONCEIVABLE!
Bob might make some reasonable assumptions and produce useful suggestions. But without sufficient direction, there's a very real possibility that the results won't match Vizzini's expectations.
Vizzini throws his hands into the air.
"This AI is completely incompetent!"
Inigo Montoya looks over his shoulder.
"You keep using that prompt. I do not think it means what you think it means."
What Just Happened?
Vizzini used zero-shot prompting.
Well, technically.
He also demonstrated how to do it spectacularly badly!
You see, zero-shot prompting doesn't mean zero thought, zero requirements, or zero context.
It simply means asking AI to perform a task without providing examples of the desired output.
That's it!
And here's where Vizzini went spectacularly wrong.
He confused not providing examples with not providing any useful instructions whatsoever.
Those are two VERY different things!
A well-constructed zero-shot prompt can still include detailed requirements, architectural constraints, relevant source code, coding standards, business rules, and acceptance criteria.
In fact, it absolutely should include whatever context is necessary to accomplish the task effectively.
Zero-shot describes HOW we guide the AI—not how much thought we put into the request.
Vizzini, naturally, sees things differently.
"Requirements? Specifications? Context? Nonsense! I have a dizzying intellect!"
Inigo Montoya sighs.
"Yes. But apparently, you have a zero-shot prompt with zero useful instructions."
INCONCEIVABLE!
But here's where we need to make an important distinction.
Zero-shot prompting is NOT the same thing as giving Bob a vague, poorly defined request.
Zero-shot simply means asking AI to perform a task without providing examples of the desired output.
That's all.
You can still provide detailed requirements, architectural constraints, relevant source code, coding standards, and acceptance criteria.
In fact, you probably should!
Let's try Vizzini's request again.
This time, with a little less dizzying intellect and a little more engineering discipline.
"Analyze the existing fixed-format RPG program CUSTMNT. Identify its business rules, dependencies, database interactions, and opportunities for modernization. Recommend a refactoring approach using free-format RPGLE and reusable ILE service programs. Preserve existing business behavior and follow the project's coding standards. Create a technical specification describing the proposed changes, risks, and acceptance criteria. Do not modify any source code yet."
Now THAT is a useful zero-shot prompt!
Notice something?
We've told Bob WHAT we want accomplished, WHICH application to analyze, HOW to approach the work, and WHAT the expected deliverable should contain.
We've even directed Bob to the existing RPG program and our project's coding standards.
But here's the important distinction:
We haven't provided Bob with an example of a completed technical specification or a sample refactoring that demonstrates the output we're expecting.
Not one!
The existing RPG program is the subject of the task, not an example of the desired result.
And that's precisely what makes this zero-shot prompting.
We've provided Bob with:
• A clear objective — Analyze the application and recommend modernization opportunities.
• Relevant application context — The existing CUSTMNT program and project coding standards.
• Architectural expectations — Free-format RPGLE and reusable ILE service programs.
• Business constraints — Preserve existing functionality and business behavior.
• A specific deliverable — A technical specification documenting the proposed changes, risks, and acceptance criteria.
• Explicit boundaries — Analyze and document first. Do NOT modify the source code.
Zero examples. Clear requirements. Relevant context. A defined outcome.
We're relying on Bob's existing knowledge and capabilities to perform the analysis and produce the specification, rather than showing it an example to imitate.
And we've started with something I believe should be fundamental to AI-assisted engineering:
A technical specification BEFORE generating code!
Of course, that specification still needs to be reviewed and validated against the actual application and business requirements.
Even Vizzini might appreciate the distinction.
Although he'd probably insist he invented zero-shot prompting.
The Lesson from Vizzini
Zero-shot prompting can be incredibly effective when the task is clearly defined and Bob has sufficient context.
But a vague prompt with no meaningful requirements?
That's not clever prompt engineering.
That's gambling with your business logic—and wasting precious Bob coins in the process!
And anyone who's maintained an IBM i application for forty years knows that gambling with undocumented business rules is a particularly dangerous hobby.
Vizzini, naturally, disagrees.
"I have a dizzying intellect!"
Inigo sighs.
"Yes. But apparently, no technical specification."
INCONCEIVABLE!
Act II: Inigo Montoya and the One-Shot MVP
Enter Inigo Montoya.
Unlike Vizzini, Inigo understands something important about craftsmanship.
You don't become a master swordsman simply by swinging a sword wildly and hoping for the best.
You study technique.
You observe examples.
You practice.
And occasionally, you discover that one really good demonstration is worth a thousand explanations.
Inigo approaches Bob with a different idea.
"Bob, I want to build a new Customer Maintenance application for IBM i."
But instead of stopping there, he provides an example.
He shows Bob an existing Vendor Maintenance program containing:
• A free-format RPGLE implementation.
• A service program handling customer business logic.
• A display file defining the user interface.
• A consistent naming convention.
• A simple validation procedure.
Then he says:
"Use this application as the reference architecture. Build a similar application for maintaining product categories, including add, change, delete, inquiry, and validation functionality. Follow the same architectural patterns."
Bob gets to work.
And suddenly…
We have an MVP!
Not a collection of disconnected code snippets.
Not a theoretical architecture diagram that requires another six meetings to discuss.
An actual, working Minimum Viable Product.
Something we can compile, run, demonstrate, and validate with the business.
Inigo stares at the screen.
"Hello. My name is Inigo Montoya. You built my MVP. Prepare to demo."
The magic of one-shot prompting
One-shot prompting provides one representative example that demonstrates the pattern or output you want AI to follow.
For IBM i engineers, this is incredibly powerful.
Think about how many times we've built applications that follow established patterns.
Customer Maintenance.
Vendor Maintenance.
Product Maintenance.
Order Inquiry.
Inventory Adjustments.
Different business requirements, certainly.
But often very similar engineering structures.
What if we could show Bob one well-designed application and ask it to create another using the same approach?
Well, we can.
And that's where I believe one-shot prompting can become particularly valuable for rapid MVP development.
One good example can communicate architecture, conventions, structure, and expectations far more efficiently than a long, ambiguous description.
Of course, a great MVP still needs appropriate validation. One-shot prompting doesn't magically guarantee working software.
But when Bob has access to the right environment and a representative example, we can move from an idea to something demonstrable remarkably quickly.
And that changes the conversation with the business.
Instead of spending weeks debating what an application might look like, we can take a simple "Wouldn't it be nice if we could…" conversation with our subject matter experts (SMEs) or business owners and quickly turn that idea into a working MVP they can actually see, touch, and evaluate.
"Is this what you meant?"
"No, actually, we need another field here."
"Excellent. Bob, add that field and update the validation."
And just like that, we're iterating.
Inigo Montoya stares at the working MVP, then slowly turns to Bob.
"Hello. My name is Inigo Montoya. For twenty years, legacy development processes killed my productivity. Prepare to…"
Exactly, Inigo! We've spent decades fighting our way through the Fire Swamp of legacy development processes. Turns out, all we needed was IBM Bob and a better prompt!
Act III: Fezzik, Few-Shot Prompting, and the Brute Squad
Now let's talk about Fezzik.
Fezzik is enormous.
Powerful.
Capable of accomplishing things that would require an entire team of ordinary people.
Sound familiar?
But there's something I particularly love about Fezzik.
He's not just muscle. He's surprisingly thoughtful, loyal, and capable of solving problems in ways that nobody expects.
Which makes him a rather interesting candidate for our next prompting exercise.
Enter Few-Shot Prompting
Fezzik has a brilliant idea.
"What if we created a VS Code extension for Bob that makes automated unit testing easier for IBM i developers?"
But there's a problem.
Fezzik has never built a VS Code extension.
And simply asking Bob to "build me a unit testing extension" leaves an awful lot to interpretation.
What should the interface look like?
How should it interact with IBM i?
How should it discover testable RPGLE and COBOL procedures?
How should it generate test cases, execute tests, and report results?
And, perhaps most importantly, how do we make it fit naturally into the development environment IBM i engineers already use?
Fezzik scratches his head.
"Perhaps we should show Bob some examples."
INCONCEIVABLE!
Wait. No. That's actually exactly what we should do.
Instead of asking Bob to invent everything from scratch, we're going to provide several relevant examples demonstrating how successful VS Code extensions are designed and implemented.
And one of those examples comes from a particularly valuable resource in the IBM i development community.
Example 1: Code for IBM i — The Foundation
Our first example is the excellent open-source Code for IBM i extension.
It already provides IBM i connectivity, source management, compilation, and integration with VS Code.
Better yet, its developers provide an API that other extensions can use.
Why reinvent IBM i connectivity when some very talented people have already done the hard work?
We give Bob the project's GitHub repository and API documentation as examples of how to integrate our extension with the IBM i development environment.
And a shout-out to the Code for IBM i contributors. This is exactly the kind of community engineering that makes new ideas possible!
Example 2: Microsoft's VS Code Test Provider Sample — The User Experience
Next, we turn to Microsoft.
And wouldn't you know it? They've already provided an excellent open-source example!
Microsoft's VS Code Test Provider Sample demonstrates how to integrate automated testing into VS Code using its built-in Testing API.
It shows us how to discover tests, organize them in the Test Explorer, execute them individually or in groups, and display the results.
Exactly the kind of user experience we want for our RPGLE and COBOL unit testing extension!
We give Bob the sample's source code and ask it to follow the same integration patterns.
We're not asking Bob to reinvent the Test Explorer. Microsoft already built one!
We're showing Bob how to make our IBM i unit tests work within that familiar VS Code experience.
And a shout-out to Microsoft for making these examples available to the developer community.
"Fezzik, my friend, that's what we call engineering—not carrying the entire castle up the Cliffs of Insanity!"
Example 3: Existing RPGLE and COBOL Unit Tests — The Engineering Patterns
Finally, we provide examples of validated RPGLE and COBOL unit tests from our development environment.
These demonstrate how test cases are structured, how assertions work, and how normal conditions, boundary conditions, and expected failures are validated.
Of course, RPGLE and COBOL aren't identical. Bob will need to account for their differences rather than assuming one testing approach fits both languages.
Now Fezzik is ready.
He cracks his enormous knuckles, opens IBM Bob, and types:
Fezzik's Few-Shot Prompt
"Bob, create a technical specification for a VS Code extension that supports automated unit testing for IBM i RPGLE and COBOL applications.
Use these three examples as references:
• Code for IBM i: https://marketplace.visualstudio.com/items?itemName=HalcyonTechLtd.code-for-ibmi — Demonstrates IBM i connectivity, source management, and integration through its extension API.
• Microsoft's VS Code Test Provider Sample: https://github.com/microsoft/vscode-extension-samples/tree/main/test-provider-sample — Demonstrates the VS Code Testing API, Test Explorer integration, test discovery, execution, and results reporting.
• Our existing RPGLE and COBOL unit tests: Use the validated unit testing examples in our project to establish testing conventions, assertions, error handling, and expected results.
The extension should help developers discover, generate, execute, and review RPGLE and COBOL unit tests directly within VS Code. Reuse existing APIs and testing frameworks wherever practical.
Document the proposed architecture, dependencies, testing approach, and MVP functionality. Follow our established engineering standards.
Do not generate source code yet."
Fezzik leans back.
"Was that good?"
"Fezzik, you magnificent giant. That was actually pretty darn good!"
Why Few-Shot Prompting Works Here
Notice what Fezzik just accomplished.
He didn't ask Bob to invent an entire engineering platform without guidance.
He provided three relevant examples, each demonstrating an important aspect of the solution.
Three examples. Three proven patterns. One clear engineering objective.
And instead of reinventing everything from scratch, Bob can build on the knowledge, tools, and engineering practices that already exist.
That's few-shot prompting.
And because we're asking Bob to create a technical specification first, we can review the proposed architecture, identify missing requirements, and validate the approach before spending Bob coins generating an entire extension.
Now, strictly speaking, these examples demonstrate different parts of the solution rather than three demonstrations of the same task. That's useful reference-driven prompting; for a particularly strong few-shot demonstration, we could also supply multiple examples of the same extension feature or test-generation pattern.
We're not just telling Bob what we want. We're showing it what successful implementations look like.
And here's where things get really interesting.
Once we've reviewed and approved the technical specification, we can start a NEW TASK to implement the MVP.
Then another to test it.
Then another to incorporate feedback from our IBM i developers.
And perhaps another to create an IBM Bob skill that teaches Bob how to use our shiny new extension!
The output of one task becomes valuable context for the next.
We're not reinventing the wheel every time we start a conversation.
We're building reusable engineering knowledge—and potentially the very tools that will accelerate IBM Bob adoption.
Wait a Minute… Is Bob the Brute Squad?
"So, let me get this straight. We can use Bob to help us create the tools that make Bob even more useful?"
Fezzik nods.
"That is the idea."
"And those tools can help developers automate unit testing for applications that have been running for decades?"
"Yes."
"And we can build them using the engineering knowledge and open-source tools we already have?"
Fezzik smiles.
"Apparently."
"Good grief! Bob isn't just ON the engineering team. Bob IS the Brute Squad!"
But let's be careful here.
AI isn't replacing the engineering judgment required to build reliable tools and business applications. It's giving experienced engineers extraordinary leverage.
Someone still needs to understand RPGLE and COBOL.
Someone still needs to validate the test cases and expected results.
Someone still needs to understand the existing business rules.
And someone still needs to recognize when Bob has done something completely ridiculous.
Fezzik looks puzzled.
"But if Bob can help build the tools, and the tools can help Bob, what do the engineers do?"
"Fezzik, my friend, we finally get to spend more time engineering instead of being the human middleware!"
Which brings us to…
Miracle Max and the Mostly Dead RPG Application
Ah, Miracle Max.
Possibly my favorite character. And I can certainly relate to his interactions with his wife! 😂
A somewhat unconventional miracle worker who specializes in bringing people back from the brink.
I have maintained more than a few RPG applications that could have used his services.
You know the ones.
Thirty or forty years old.
Thousands of lines of fixed-format RPG.
Business rules scattered throughout the program.
A collection of indicators that looks like someone dropped a box of Christmas lights down the stairs.
And documentation?
Well…
Let's just say the original developer retired during the Reagan administration.
Miracle Max examines the application.
"There's a big difference between mostly dead and all dead."
Max, I've been saying that about RPG applications for years.
But here's where things get interesting.
With IBM Bob, we can ask AI to analyze existing logic, document its behavior, identify opportunities for refactoring, and help create automated tests.
We can provide examples of how we want those tests structured.
We can show Bob how our service programs are organized.
We can establish repeatable engineering patterns.
And suddenly, applications that seemed almost impossible to modernize become much more approachable.
Not because Bob magically understands every undocumented business rule.
But because we're combining decades of human expertise with AI-assisted engineering capabilities.
That's an entirely different proposition.
And frankly, I'd rather preserve forty years of valuable business logic than throw it into the Pit of Despair.
Count Rugen and the Fifty Levels of Prompting Pain
Speaking of the Pit of Despair…
We simply cannot discuss The Princess Bride without Count Rugen.
The man has a machine capable of inflicting fifty levels of pain.
Fifty!
Though I've worked on a few projects where the project management approach somehow managed to exceed all fifty levels—without even needing the machine! 😂
Anyone who has worked in enterprise IT knows exactly where I'm going with this.
Count Rugen smiles.
"Shall we turn it up another notch?"
Now, don't misunderstand me.
Project management is extremely important. After all, somebody has to coordinate the storming of the castle—even if Prince Humperdinck keeps changing which castle we're supposed to storm!
But the interface between business requirements and engineers (formerly known as developers!) has always been fraught with challenges that, despite decades of methodologies, processes, and best practices, we never seem to completely overcome.
But I keep coming back to a question:
How much of the repetitive project management and engineering work surrounding those processes could we automate with AI?
Why not use Bob to help build VS Code extensions?
Why not use Bob skills to establish repeatable workflows?
Why not use AI to automate the Requirements Traceability Matrix (RTM)—connecting requirements to technical or product specifications, source code changes, test cases, QA test scripts and validation results?
Why not use AI to automate project reporting—generating status reports, tracking milestones, identifying risks, and keeping stakeholders informed without engineers and project managers spending half their lives updating spreadsheets and PowerPoint presentations?
Why not use AI to automate unit and QA testing—generating test cases from requirements, executing automated regression tests (including headless testing of our beloved 5250 applications), capturing results, and identifying defects before they reach production?
Why not let AI assist with documentation, impact analysis, test execution, and the preparation of deployment artifacts?
We're not talking about abandoning enterprise discipline.
We're talking about reducing unnecessary manual effort while preserving the controls that matter.
Because if your project managers, engineers, and QA team are spending most of their time operating the Machine in the Pit of Despair…
Perhaps it's time to reconsider the machine.
Prince Humperdinck and the Perfect Requirements Document
And then there's Prince Humperdinck.
The man has a plan for everything.
Unfortunately, that plan doesn't always align with what everyone else actually needs.
Remind you of any project you've worked on?
Humperdinck announces:
"I require a complete modernization of our order management system!"
Bob asks:
"What business capabilities must the modernized system preserve?"
Humperdinck replies:
"All of them!"
"Which architectural standards should I follow?"
"The best ones!"
"What are the acceptance criteria?"
"Success!"
Somewhere in the background, Vizzini shouts:
"INCONCEIVABLE!"
And this brings us to perhaps the most important lesson in prompting.
AI cannot reliably satisfy requirements that exist only inside someone's head.
We still need to communicate intent.
We still need to establish constraints.
We still need to validate the output.
The difference is that AI gives us an extraordinary opportunity to shorten the distance between an idea and a working implementation.
But only if we learn to communicate effectively.
The Secret Ingredient: Context, Context, Context!
Here's where I want to depart from the fairy tale for a moment.
We've talked about zero-shot, one-shot, and few-shot prompting.
But there's something more important than choosing among those techniques.
Context.
And I cannot emphasize that enough.
Context.
Context.
Context.
Imagine asking Bob to modernize an RPG application without knowing anything about the organization's environment.
No coding standards.
No library list.
No service program conventions.
No understanding of the database.
No documentation of the business processes.
No testing requirements.
Bob might still produce useful results.
But now imagine giving Bob access to relevant, trustworthy context:
• Your organization's RPGLE and SQL coding standards.
• Established service program architectures.
• Reusable IBM Bob skills and project instructions.
• Application documentation and business rules.
• Database definitions and relationships.
• Existing examples of successful implementations.
• Testing and deployment conventions.
Now we're talking about something considerably more powerful.
And here's where Bob's .bob folder comes into play.
Think of it as Bob's very own book of spells—a place to organize reusable instructions, coding standards, skills, and engineering knowledge that help Bob understand how YOUR organization builds enterprise level software.
Because even Westley needed a little preparation before storming the castle. And Bob? Well, Bob needs context!
Just remember: having a .bob folder full of knowledge doesn't mean Bob should read the entire kingdom's history every time you ask it to change one RPG procedure.
Relevant context, my friends. Not the entire royal library!
And this is where prompt engineering starts becoming context engineering.
A well-written prompt matters.
But providing the right information, tools, examples, skills, and constraints can matter even more.
As I've said before:
AI is the accelerator—not the engine.
The engine is our engineering knowledge, architecture, business understanding, and ability to validate what we're building.
Bob helps us put all of that to work much faster.
The Most Important Prompting Technique Isn't a Shot at All
There's one more technique I want to mention.
And I suspect it's the one many engineers will use most frequently.
Iterative prompting.
Or, as I prefer to think of it:
Having an actual conversation with Bob.
We start with an objective.
Bob produces an initial result.
We review it.
We clarify something.
Bob improves the result.
We test it.
We discover something else.
Bob makes another adjustment.
And the process continues.
This is how we progressively refine both our understanding of the problem and the solution itself.
It's also why I believe AI-assisted development can fundamentally change the traditional engineering cadence.
Instead of treating requirements, design, coding, and testing as completely disconnected activities, we can create a much tighter feedback loop.
And that, my friends, is where things get exciting.
Vizzini, the Context Window, and the Battle of Wits
Remember the Battle of Wits?
Vizzini spends an extraordinary amount of time reasoning himself into circles, convinced that every thought he's ever had is absolutely essential to making his next decision.
Sound familiar?
That's pretty much what happens when we keep piling information into Bob's context window without occasionally cleaning house.
After twenty iterations, Bob may be carrying around old requirements, abandoned approaches, debugging conversations, superseded code, and three architectural decisions we've already changed our minds about.
INCONCEIVABLE!
And we're paying for all that noise in Bob coins!
Here's something I've learned about iterative conversations with Bob:
And unlike Vizzini, who managed to turn a simple choice between two goblets into an intellectual crisis of epic proportions,
I've discovered that the secret isn't to keep talking until everyone is thoroughly confused—including Bob!
The output of one prompt should become part of the relevant context for the next prompt—not necessarily the entire conversation that produced it. AND, more often than not, that next prompt should be a NEW TASK in IBM Bob!
Carry forward the important results, decisions, and validated requirements—not the entire history of how you got there.
New task. Clean context. Less noise. Fewer wasted Bob coins. Better results.
Sometimes the smartest thing you can do is stop, capture what you've learned, and start a NEW TASK.
As Inigo Montoya would say:
"No, there is too much. Let me sum up."
Exactly, Inigo! That's context engineering!
Capture the important results: the validated requirements, architectural decisions, working code, lessons learned, and what needs to happen next.
Then, when appropriate, start a fresh conversation or compact the context, carrying forward that concise summary and the relevant project artifacts.
That helps remove obsolete information, reduces unnecessary token consumption (and potentially Bob coin usage), and gives Bob a cleaner, more focused context for its next task.
It can also improve accuracy by reducing the chance that Bob follows outdated instructions or gets distracted by irrelevant information.
Of course, don't throw away important business rules, constraints, or unresolved issues in the process.
The trick is preserving the knowledge while discarding the noise.
Because, as Miracle Max might observe:
"Your context window isn't all dead. It's just mostly full!"
And nobody wants to spend their precious Bob coins making an AI re-read Vizzini's entire monologue every time they need to change one RPG procedure.
Context engineering, my friends. It's not just about what you give Bob. It's also about knowing what to leave behind.
A Practical Example: Four Prompts, One Growing Application
Let's put everything we've learned together.
First prompt — Zero-shot
"Create a Customer Maintenance application using free-format RPGLE, ILE service programs, and a DDS display file. Use the existing CUSTMAST physical file and support add, change, delete, and inquiry functions."
Zero-shot: Clear instructions and context, but no example provided for Bob to follow.
Second prompt — One-shot
"Examine the existing Vendor Maintenance application (VENDMNTR.RPGLE, VENDMNTD.DSPF, and VENDSRV.RPGLE), which demonstrates our preferred RPGLE coding standards, ILE service program architecture, and DDS display design. Use this application as a pattern for building the Customer Maintenance application using the existing CUSTMAST file."
One-shot: Bob receives one working example to follow when building the new application.
Third Prompt — Few-Shot
"Create a technical specification for an RPGLE/COBOL unit testing VS Code extension. Use Code for IBM i as an example of IBM i integration, Microsoft's VS Code Test Provider Sample as an example of Test Explorer functionality, and our existing RPGLE/COBOL unit tests as examples of testing conventions. Do not generate code yet."
Few-shot: Bob receives three relevant examples demonstrating the integration, user interface, and testing patterns needed to design the extension.
Fourth Prompt — Iteration
"Create a technical specification for updating the Customer Maintenance MVP (CUSTMNTR.RPGLE) to use the existing getCustomerCreditStatus() procedure in the CUSTSRV service program. Allow customer updates only when the credit status is ACTIVE or APPROVED. Block updates for HOLD, SUSPENDED, or CLOSED. Include required changes to automated unit tests and preserve our existing architecture and business rules. Do not modify any source code yet."
Notice what's happening?
We're not starting over.
We're building on previous work.
We're taking feedback from the business, refining our MVP, and using the results of earlier tasks as context for the next.
That's iterative prompting.
But here's the part I really want to emphasize.
Technical specifications and iterative prompting go hand in hand. By documenting and validating each change before implementation, we reduce ambiguity, improve accuracy, and potentially save a few precious Bob coins along the way!
And we don't need to carry every word of every previous conversation forward.
We need to preserve the important results.
The approved technical specifications.
The established architecture.
The validated business requirements.
The working source code.
The test results.
The outstanding tasks.
That's the context Bob needs to continue effectively.
Not the seventeen conversations we had trying to figure out why someone named an indicator *IN73 back in 1994.
And certainly not Vizzini's entire theory about which goblet contains the poison.
Less noise. Better context. Fewer wasted Bob coins. And more accurate results.
As long as we're careful to preserve the information that actually matters.
As You Wish: The Quest for the Perfect MVP
So what have we learned from our adventures through Florin?
Zero-shot prompting is often an excellent way to begin, especially when Bob already has sufficient context.
One-shot prompting can be remarkably effective for creating a great MVP when we have a representative example of what we want.
Few-shot prompting helps establish consistent patterns and clarify expectations across more complex tasks.
And iterative prompting allows us to refine the result through a continuous conversation.
But there's another lesson here.
Effective iterative prompting requires effective context management.
It's not enough to keep asking Bob questions.
We need to capture the useful output of each iteration, preserve the decisions we've made, and avoid filling the context window with obsolete information.
That can reduce unnecessary token usage, conserve Bob coins, and improve the quality of subsequent responses.
And none of these techniques guarantees perfection.
We still need to understand the business.
We still need to validate the code.
We still need to test the application.
And we still need to apply sound engineering judgment.
The real opportunity isn't simply getting AI to write code. It's learning how to use AI to accelerate the entire engineering process.
From understanding requirements to building an MVP.
From documenting business logic to creating automated tests.
From refactoring legacy applications to establishing modern architectural patterns.
And ultimately, from preserving what we've spent decades building to creating something even better.
Without throwing the proverbial baby out with the bathwater.
Or, in this case, throwing Fezzik off the Cliffs of Insanity—and taking the entire team of heroes down with him!
Before Storming the Castle, Have Bob Draw the Map!
Remember when Inigo Montoya, Fezzik, and Westley had to figure out how to storm Prince Humperdinck's castle?
They didn't simply charge through the front gate swinging swords and shouting:
"INCONCEIVABLE!"
Well, perhaps Fezzik considered it.
But even our heroes understood that a little planning could go a long way.
Which brings me to one of my most important rules when working with IBM Bob.
ALWAYS begin by having Bob create a technical specification!
Not code.
Not a service program.
Not seventeen RPGLE procedures and a shiny new display file.
A technical specification.
I know, I know.
Somewhere, a developer is rolling their eyes.
"Documentation? Really? I thought AI was supposed to eliminate all that!"
Well, here's the thing.
We're not talking about spending three weeks writing a 200-page document that nobody will read.
We're talking about asking Bob to analyze the requirements, examine the existing application, identify dependencies, and create a concise, structured technical specification describing exactly what we're trying to accomplish.
For example:
"Bob, analyze this Customer Maintenance application and create a technical specification for adding customer credit-status validation. Document the existing architecture, relevant business rules, affected programs, proposed changes, dependencies, and acceptance criteria. Do not modify any source code yet."
Now we have something incredibly valuable.
A blueprint!
Something we can review, correct, and validate before Bob starts changing things.
And if Bob misunderstands a requirement?
Wonderful!
We catch it in the specification instead of discovering it after we've generated 2,000 lines of code.
Even Miracle Max would appreciate that.
The Technical Specification Becomes the Next Task's Context
Now remember our golden rule:
The output of one prompt or task should ALWAYS become part of the relevant input or context for the next prompt or task.
And more often than not, that next prompt should be a NEW TASK in IBM Bob!
Here's how I approach it.
Task 1 — Create the technical specification.
Have Bob analyze the requirements and existing application, identify the relevant business rules and dependencies, and produce a structured technical specification.
Review it. Correct it. Approve it.
(And THIS is where the iterative conversation with Bob comes in! Keep refining the specification until Bob understands exactly which castle we're storming—and why!)
Task 2 — Implement the approved specification.
Start a NEW TASK.
Provide Bob with the approved technical specification and the relevant source code, coding standards, and architectural context.
Ask Bob to implement the approved technical specification—or, for larger projects, break the implementation into smaller, logically defined tasks, each with a clear objective, manageable scope, and measurable outcome.
Task 3 — Validate the implementation.
Start another NEW TASK.
Provide the specification, implementation results, and acceptance criteria.
Have Bob generate or execute appropriate unit tests, automate tests, QA testing scripts, identify discrepancies, and document the results.
Task 4 — Continue the quest.
Carry forward the approved specification, validated results, outstanding issues, and relevant artifacts into the next NEW TASK.
Notice what we're doing?
We're creating continuity without dragging the entire conversation history along for the ride.
Each task has a clear objective.
Each produces a meaningful deliverable.
And each deliverable helps establish the context for the next task.
The specification becomes our source of truth for the intended change, while the existing application remains the source of truth for its current behavior.
And because we're preserving those artifacts outside the conversation, Bob doesn't need to reconstruct our intentions from forty-seven previous prompts.
Less noise.
Better continuity.
Potentially fewer Bob coins.
And, most importantly, a better opportunity to produce accurate, testable results.
The Dread Pirate Roberts Would Approve
Imagine Westley preparing to storm the castle.
Vizzini, naturally, would have approached the problem differently.
"Just storm the castle! I have a dizzying intellect!"
Westley, on the other hand, might ask:
"What's the objective? What resources do we have? What obstacles are we facing? And what constitutes success?"
That's a technical specification, my friends!
And it's the difference between hoping Bob understands what we want and giving Bob a clear, validated engineering objective.
One final thought.
A technical specification doesn't have to be enormous.
For a small change, it might be a single Markdown file.
For a complex modernization effort, it might contain several sections, diagrams, wireframes, dependencies, and acceptance criteria.
The goal isn't to create more documentation.
The goal is to eliminate ambiguity before it becomes code—and prevent that ambiguity from propagating through every subsequent task.
Because when you're storming the castle, the last thing you want to discover is that everyone had a different idea of which castle you were supposed to storm.
INCONCEIVABLE!
And somewhere in the background, Inigo Montoya quietly observes:
"No, there is too much. Let me sum up."
Exactly, Inigo. Put it in the technical specification, and let's start a NEW TASK!
Fezzik, the Elephant, and the Cliffs of Insanity
Remember Fezzik?
A giant of a man. Strong enough to carry three people up the Cliffs of Insanity.
But even Fezzik has his limits.
Now imagine Vizzini standing at the bottom of those cliffs, shouting:
"Fezzik! Carry the princess, the swordsman, the entire castle, the royal treasury, seventeen horses, and while you're at it, modernize our entire IBM i application portfolio!"
Fezzik scratches his head.
"All at once?"
"OF COURSE! I HAVE A DIZZYING INTELLECT!"
And that's exactly what we sometimes do to IBM Bob.
INCONCEIVABLE!
We give it an enormous prompt containing everything we can possibly think of.
"Bob, analyze this 30-year-old RPG application, document all the business rules, convert everything to free-format RPGLE, extract the business logic into service programs, modernize the database access, build a web interface, generate automated unit tests, integrate with Git, and prepare everything for deployment."
Oh, and Bob?
Make sure nothing breaks.
What could possibly go wrong?
How Do You Eat an Elephant?
One bite at a time.
And how do you futurize a massive IBM i application?
One well-defined, logical task at a time.
Instead of asking Bob to swallow the entire elephant, break the work into manageable engineering tasks.
Task 1 — Understand the application. Analyze the existing RPG, CL, DDS, and database objects. Document the architecture, dependencies, and business rules.
Task 2 — Establish the architecture. Identify reusable procedures, service program boundaries, and modernization opportunities.
Task 3 — Refactor a component. Select one logical business function, preserve its behavior, and refactor it using the agreed architecture.
Task 4 — Generate and execute tests. Validate the refactored logic against the original business requirements.
Task 5 — Continue iteratively. Carry the validated results into a NEW TASK and tackle the next logical component.
Notice something?
Each task has a clear objective.
Each produces something useful.
And each creates relevant context for the next task.
We're not asking Bob to simultaneously understand, redesign, implement, test, and deploy an entire enterprise application in one heroic leap.
We're engineering a sequence of manageable steps.
Even Fezzik Knows Better
Here's the important part.
More information doesn't automatically produce better AI results. More RELEVANT information does.
An enormous prompt filled with unrelated requirements, conflicting instructions, and unnecessary history can overwhelm the useful context, increase token consumption, and produce confused or inaccurate results.
And the solution isn't necessarily a bigger context window.
It's better task decomposition.
Give Bob a clear objective, the relevant context, the appropriate constraints, and a defined expected outcome.
Let it complete the task.
Review and validate the result.
Preserve what matters.
Then move on to the next NEW TASK.
One bite. One task. One validated result at a time.
Because even Fezzik wouldn't attempt to carry the entire kingdom up the Cliffs of Insanity in one trip.
And if Vizzini insists otherwise?
Well…
"INCONCEIVABLE!"
The Accidental Futurist's rule of thumb: If your prompt reads like a complete five-year IT modernization strategy, perhaps it's time to break it into a few smaller tasks.
Remember: Bob is an extraordinarily capable engineering assistant. He's not a python trying to swallow an elephant.
One Final Thought from The Accidental Futurist
I spent decades writing RPG, CL, DDS, and SQL.
And I still love engineering.
But these days, I'm discovering that I can spend considerably more time thinking about what needs to be built, how it should work, and whether we've implemented it correctly.
IBM Bob can help with much of the repetitive work in between.
And the better I become at providing objectives, context, examples, and feedback, the more useful Bob becomes.
That's a pretty extraordinary development for someone who started his career staring at green screens.
Of course, my wife still thinks I'm ridiculous.
She's probably right.
But if I can turn one good example into a working MVP, establish repeatable engineering patterns, automate some of the testing that used to consume my afternoons, and avoid wasting Bob coins dragging unnecessary context from one conversation to the next…
Well…
As you wish, Bob.
And somewhere in the distance, Vizzini is still screaming:
"INCONCEIVABLE!"
Cheers, and thanks for reading.
— The Accidental Futurist
From Green Screens to AI Agents
P.S. I haven't forgotten the Rodents of Unusual Size.
In enterprise IT, we call those undocumented dependencies.
And yes, Bob can help us find those too.
P.P.S. Next time, perhaps we'll explore how IBM Bob skills, VS Code extensions, and context engineering can turn our prompting adventures into repeatable, automated engineering workflows.
After all, building one great MVP is exciting.
Building the capability to create great MVPs repeatedly, with less noise, better context, and fewer wasted Bob coins? Now that's a different kind of magic.