LearnThatStack Ace your next interview
AI in Engineering Teams · question
Question 3 of 49

What is the "prompt-and-pray" anti-pattern, and what does a healthier workflow look like?

beginner
← All AI in Engineering Teams questions
Re-explain

Prompt-and-pray means sending a vague request, accepting a large result, and hoping it works. It skips controlling the scope and gathering evidence.

A healthier workflow looks like this:

  1. Define the goal and the acceptance criteria. Add the relevant context, constraints, and non-goals.
  2. Ask for a plan when the work is nontrivial, then correct faulty assumptions.
  3. Make one small, reviewable batch and inspect its complete diff.
  4. Run focused checks before continuing, and require approval for risky commands.
  5. Refine the specification or context when results are wrong.

The assistant drafts and explains work. The engineer controls direction, permissions, and the evidence required for acceptance.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

The diagram below the answer is the concept . Jump to it ↓

Tailored explanation · switch back to · ·
What should the new diagram focus on?
Guided practice for AI in Engineering Teams One question at a time. Answer out loud, get graded, see what you missed.
How well did you know this?
AI:

Saved in this browser - sign in to keep your review list.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Interview lens How interviewers actually use this question

Likely follow-ups

  • How small should one batch be, and how do you know it's ready to review? Small enough to read the complete diff in one pass, one concern per change, and focused checks passing before the next batch starts.
  • How can writing tests first act as a guardrail when you hand coding to an agent? Tests you write and review before generation become the acceptance criteria. The agent must not edit them just to make them pass.
  • The output is wrong. How do you decide between re-prompting and changing the spec or context? Find the cause first, such as missing context, a vague goal or a wrong assumption. Fix that input instead of re-rolling the same prompt.
  • Which agent actions should need your approval before they run? Anything hard to undo or outward-facing, like deletes, migrations, pushes, deploys and access to secrets. Mention scoped permissions.
  • Is there any setting where a looser, accept-and-go style is fine? Throwaway prototypes and spikes where nothing ships. Say where the line is: once code is kept or shared, the full workflow applies.

What you can say

  1. Prompt-and-pray is sending a vague request, accepting whatever large result comes back, and hoping it works, with no control over scope and no evidence that it's right.
  2. The healthier version starts before the prompt. I write down the goal and the acceptance criteria, then add the relevant context, the constraints, and what's out of scope.
  3. For anything nontrivial I ask for a plan first and correct its wrong assumptions before any code gets written.
  4. Then I work in small batches: one reviewable change, a read of the complete diff, and focused checks before I continue, with approval required for risky commands.
  5. When the result is wrong, I fix the spec or the context instead of re-rolling the same prompt.
  6. The assistant drafts and explains, and I own direction, permissions, and what counts as done. It's slower per step than one big prompt, but I can defend every change I accept.

Weak answers to avoid

  • Stops at 'write a better prompt' Wording is one step. The interviewer wants the loop: acceptance criteria, a plan, small batches, a full diff read, and checks before continuing.
  • Accepts one large diff at the end Nobody can review a huge diff properly. Say you work in small batches, read each complete diff, and run checks before starting the next one.
  • Trusts green checks without reading the diff Checks are one piece of evidence. Read the complete diff too, because passing checks won't flag changes nobody asked for.
  • Lets the agent own direction and permissions That gives control to the tool. The engineer sets direction, grants permissions, approves risky commands, and decides what evidence is enough to accept.
Interview lens

Likely follow-ups, what you can say, and the weak answers to avoid.

Sign in free to open it Free account - the lens opens as soon as you're back.

Want a quick review of the fundamentals? See the AI in Engineering Teams cheatsheet.

← Back to all AI in Engineering Teams questions
Pro · $10/mo

42 of 49 AI in Engineering Teams answers are in Pro.

Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.

  • Full answers + code
  • AI explanations, simpler or deeper
  • 1,000 AI credits / month
  • Cancel anytime