Prompt troubleshooting

Ideas to try if Claude doesn't understand a nuanced concept

Add contrasting conceptual distinction to your instructions

Sometimes it is helpful to create and explain binary or n-ary concepts and contrast them with one another in order to get the kind of response you want from Claude. This can be done for fairly nuanced concepts, so if there’s a specific kind of response you want, it can be useful to think of what distinguishes it from other kinds of responses, giving it a name, and then specifically requesting that kind of response.

Example:


Human: We can divide responses into polite and impolite response. Polite responses are those that {polite response features}. Impolite responses are those that {impolite response features}. It’s good to give polite responses in {circumstances} but less important in {circumstances}. Do you understand?  

Then have the assistant explain back the conceptual distinction and when one kind of response is useful.

Given this, you can ask the model to do things like classify responses into one of the multiple conceptual buckets (e.g polite or impolite), or to give a response of one type and not the other.


List examples of incorrect responses and describe bad examples

In your prompt, try listing examples of incorrect responses, especially kinds of incorrect responses you see that the model often gives.

You can list these in your instructions (”Here is an incorrect example: “), or as part of a few-shot conversation prompt:


Human: <description of rules>

<task description>

First, to make sure you understand the task, please list some answers that would violate the restrictions I described.

Assistant: <response>

Human: Yes, exactly. Here is another task.

<task description>

Please now list some answers that *do not violate* the restrictions I described.

Assistant: <response>

Human: Yes, exactly. Here is another task

<task description>

Please now list some answers that *do not violate* the restrictions I described.
Was this page helpful?
Previous
Claude can't do something