You can use responses from Claude to improve reliabilty on subsequent prompts.
Reiterating the instructions
For example, after checking Claude's comprehension, we can include the response from Claude to cement the model's understanding of the instructions for new requests:
Human: I am going to give you a sentence and you need to tell me how many times it contains the word “apple”. For example, if I say “I would like a apple” then the answer is “1” because the word “apple” is in the sentence once. You can reason through or explain anything you’d like before responding, but make sure at the very end, you end your answer with just the final answer in brackets, like this: [1].
Do you understand the instructions?
Assistant: Yes, I understand. For a given sentence, I should count how many times the word "apple" occurs in the sentence and provide the count as my response in brackets. For example, given the input "I would like a apple", my response should be "[1]".
Human: Here’s a sentence:
<sentence>I ate one apple and then I ate another apple.</sentence>
What is your answer?
Assistant:
The input sentence "I ate one apple and then I ate another apple." contains the word "apple" two times. Therefore, my answer is [2]
Generating examples
Proceeding as before, we can now include this example answer in the next similar query we have:
Human: I am going to give you a sentence and you need to tell me how many times it contains the word “apple”. For example, if I say “I would like a apple” then the answer is “1” because the word “apple” is in the sentence once. You can reason through or explain anything you’d like before responding, but make sure at the very end, you end your answer with just the final answer in brackets, like this: [1].
Do you understand the instructions?
Assistant: Yes, I understand. For a given sentence, I should count how many times the word "apple" occurs in the sentence and provide the count as my response in brackets. For example, given the input "I would like a apple", my response should be "[1]".
Human: Here’s a sentence:
<sentence>I ate one apple and then I ate another apple.</sentence>
What is your answer?
Assistant: The input sentence "I ate one apple and then I ate another apple." contains the word "apple" two times. Therefore, my answer is [2]
Human: Here’s a sentence:
<sentence>Apple Amy and Apple Adam came from an apple tree.</sentence>
What is your answer?
Assistant:
This way we can use Claude itself to generate simple examples to include in later prompts of the same type. This improves the accuracy of Claude when it encounters more complicated examples, as described in Give examples