Library › AI Evals › Software developers

Write a prompt patch for null answers and predict the result

  • For Software developers
  • You practice Setting limits and rules
  • Time about 5 minutes
  • Level Intermediate

About this exercise

Pedalbot also reads Spokewise rental agreements and fills a deposit field. It invents amounts when the agreement states none. Write a prompt patch of at most 2 lines in exactly 1 code block, with the first line starting "Deposit rule:", that states exactly when deposit must be null, what to output, and the only case where 0 is allowed. Then add one line starting "Prediction:" naming the one results column the patch should move and the columns that should stay flat. Keep text outside the code block under 35 words.

Common mistakes when you ask AI for this

  • A vague rule. The AI writes 'if unsure, use null', which leaves the model guessing when it feels sure. Try: Say: "Deposit is null exactly when the agreement states no deposit amount."
  • Forgetting the output form. The AI doesn't say what null looks like, so the bot keeps sending 0 or N/A. Try: Add: "Output the JSON value null, not 0 or N/A."
  • Predicting everything improves. The AI says every column will go up. Try: Say: "Name the one column that should move and the ones that stay flat."
  • A long essay. The AI rewrites the whole prompt in many code blocks. Try: Say: "Exactly 1 code block of at most 2 lines, first line starting Deposit rule:."

What a strong prompt includes

  • Says when to use null
  • Says what to output
  • Asks for a prediction
  • Names what stays flat
  • Limits the size

Practice this now ↑

Related exercises