This is some text inside of a div block.

How to debug prompts

Identify conflicting instructions

Many times you'll be prompting and the model is just not giving you what you want. Adding more instructions often doesn't help when there are conflicting directions. For example, you might ask for one thing in the system message and something that subtly conflicts in the user message. The model will follow one instruction or the other.

Live example in a meta description Workflow

In our meta description Workflow, two conflicting instructions are provided:

  • System: “Generate a meta description between 150 and 160 characters.”
  • User: “Create a meta description based on your analysis using at least five sentences.”

When tested, the model follows neither:

  • It returns around 300 characters instead of under 160.
  • It produces four sentences instead of the requested five.

This behavior might be labeled a “hallucination,” but it really stems from conflicting instructions.

Tip #1: Ask the model why it's not following your instructions

Instead of adding more instructions, copy the model's output and ask it directly why it didn’t meet your criteria. For example:

Without apologizing, please explain why the meta description was not 150 to 160 characters. Based on my instructions, I asked for 150 to 160 characters only.

If it still doesn't offer a rationale, reinforce your request:

Don’t apologize. Don’t apologize. Just logically explain based on my instructions.

This forces the model to clarify how it weighed conflicting directives.

Tip #2: Delete parts of the prompt to isolate issues

If asking why still doesn’t resolve the problem, start removing parts of the prompt. Deleting sections shows which phrases control the output faster than adding new ones. By selectively eliminating instructions, you can pinpoint the root cause of the conflict.

Hopefully. These are a couple of tips to help you get started with debugging your prompt again. Instead of adding more and more to your prompt, first ask the model why it's not following your instructions, and then start to delete parts of the prompt in order to debug.

Search

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
No results found