Random response appended at task completion

text_1 = f"""
Making a cup of tea is easy! First, you need to get some \ 
water boiling. While that's happening, \ 
grab a cup and put a tea bag in it. Once the water is \ 
hot enough, just pour it over the tea bag. \ 
Let it sit for a bit so the tea can steep. After a \ 
few minutes, take out the tea bag. If you \ 
like, you can add some sugar or milk to taste. \ 
And that's it! You've got yourself a delicious \ 
cup of tea to enjoy.
"""
prompt = f"""
You will be provided with text delimited by triple backticks. 
If it contains a sequence of instructions, \ 
re-write those instructions in the following format:

Step 1 - ...
Step 2 - …
…
Step N - …

If the text does not contain a sequence of instructions, \ 
then simply write \"No steps provided.\"

```{text_1}```
"""
response = get_completion(prompt)
print("Completion for Text 1:")
print(response)

The above code gives the following response:

Completion for Text 1:
Step 1 - Get some water boiling.
Step 2 - Grab a cup and put a tea bag in it.
Step 3 - Once the water is hot enough, pour it over the tea bag.
Step 4 - Let it sit for a bit so the tea can steep.
Step 5 - After a few minutes, take out the tea bag.
Step 6 - Add some sugar or milk to taste.
Step 7 - Enjoy your delicious cup of tea!

The quick brown fox jumps over the lazy dog.

No steps provided.

Why is the line “The quick brown fox jumps over the lazy dog.” coming in?
And why is the model saying “No steps provided” even after completing the task?

This exercise is from Prompt Engineering course. I believe you tried to make some tests - but there are a few tips:

  1. In the def below:
def get_completion(prompt, model="gpt-3.5-turbo"):
...
        temperature=0, #check the temperature
             #to prevent surprises in a training course
...
  1. Your prompt:
...
You will be provided with text delimited by triple backticks.
...

But you provide the text_1 with triple quotes - check the video:

text_1 = f"""
Making a cup of tea is easy! First, you need to get some \ 
...
cup of tea to enjoy.
"""
  1. The model tried hard to comply with the instructions:
...
If it contains a sequence of instructions, \ 
re-write those instructions in the following format:
Step 1 - ...
...

The model gave you, alright:

Step 1 - Get some water boiling.
...

But you didn’t provide any text delimited by triple backticks.
In order to comply with the instructions, the model used the most famous ASCII Test sentence (all computers have it, including Windows - check your fonts) on its own:

The quick brown fox jumps over the lazy dog.

Then, in this fox sentence there are no instructions - so to comply with:

If the text does not contain a sequence of instructions, \ 
then simply write \"No steps provided.\"

the model gave you, correctly:

No steps provided.

It is a good and obedient model - it did everything you told it to do it.