Questions tagged [iterative]
Post a PromptMulti-step prompting techniques that refine an output over several turns.
8 prompts
39votes
3answers
4.0kviews
Hypothesis-driven debugging prompt that stops the model guess-fixing
Classic failure mode: I paste a bug and the model immediately rewrites five things, half unrelated, and says "this should fix it." No hypothesis, no evidence, just vibes. When one of those changes acc
16votes
2answers
2.7kviews
Structured root-cause prompt that turns a stack trace into a ranked fix list
When I paste a raw stack trace, models tend to fixate on the deepest frame and suggest a fix right there, even when the real cause is three frames up where a bad value was created. The topmost error i
10votes
2answers
2.2kviews
Prompt that adds characterization tests before it touches legacy code
I inherited a 12-year-old billing module with zero tests and a maze of nested conditionals. Every time I asked Claude to "refactor this to be cleaner" it happily rewrote the control flow and silently
24votes
2answers
2.8kviews
Prompting a multi-step onboarding flow that people actually finish (not a 9-field wall)
Growth eng here. Our old signup was a single screen with nine fields and a 38% completion rate. I wanted AI to help me design a progressive flow, but the naive prompt just gave me the same nine fields
9votes
1answers
1.7kviews
Forcing the model to write the failing test first instead of the impl
I do strict TDD and I wanted the model to do it with me, not for me. Default behavior with GPT is: ask for a feature, get the implementation plus some tests it wrote to match the code it just wrote. T
12votes
0answers
1.3kviews
Measure-before-optimize prompt so the model stops tuning cold code
I asked a local Llama-3 70B to "make this data pipeline faster" and it micro-optimized a list comprehension that runs once at startup while ignoring the O(n^2) join in the hot loop. Textbook: it optim
8votes
1answers
893views
Turning a messy matplotlib notebook into one reproducible plotting script
I had a research notebook with 40 cells of exploratory plots, half of them relying on variables defined three cells up and a global rcParams tweak that only worked if you ran things in order. Sharing
5votes
1answers
964views
Prompt that rewrites a dense technical blog draft to a target reading level without dumbing it down
My drafts read like release notes: correct, unreadable. I wanted them accessible to a junior dev without stripping the actual substance, which most "simplify this" prompts do by deleting the interesti