PromptPreview
Chapter 4Exercises

Separating Data and Instructions

3 exercises

4.1
Haiku Topic
template
Write a prompt in the highlighted template box that will take in a variable called "{{TOPIC}}" and output a haiku about the topic. This exercise is just meant to test your understanding of the variable templating structure.
LLM Response

Submit your prompt to see the response here.

4.2
Dog Question with Typos
template
Fix the prompt in the highlighted template box by adding XML tags so that the LLM produces the right answer. Try not to change anything else about the prompt. The messy and mistake-ridden writing is intentional, so you can see how the LLM reacts to such mistakes. the LLM's response will turn GREEN if your prompt produces the right answer. Note: Although the LLM can somewhat parse through broken prompts with poor grammar and misspelled words, having a clearly written, spell-checked and grammatically correct prompt far decreases the risk of the LLM making mistakes and far increases the quality of the LLM's output.
{{QUESTION}}
LLM Response

Submit your prompt to see the response here.

4.3
Dog Question Part 2
template
Fix the prompt in the highlighted template box WITHOUT adding XML tags. Instead, remove only one or two words from the prompt. Just as with the above exercises, try not to change anything else about the prompt. This will show you what kind of language the LLM can parse and understand. the LLM's response will turn GREEN if your prompt produces the right answer. ← Chapter 4: Separating Data from Instructions Table of Contents
{{QUESTION}}
LLM Response

Submit your prompt to see the response here.