6.1
Classifying Emails
templateIn this exercise, we'll be instructing Claude to sort emails into the following categories:
(A) Pre-sale question
(B) Broken or defective item
(C) Billing question
(D) Other (please explain)
Change the prompt in the YELLOW highlighted prompt template box to make Claude output the correct classification. Use Chain of Thought. To be marked as correct, Claude's answer needs to include the letter (A - D) of the correct choice, with the parentheses, as well as the name of the category.
The default email describes a broken Mixmaster4000 — the correct classification is (B) Broken or defective item.
Tip: Use precognition and other techniques you've learned leading up to this chapter! Remember, thinking only counts when it's out loud!
{{EMAIL}}
LLM Response
Submit your prompt to see the response here.
6.2
Email Classification Formatting
templateIn this exercise, we're going to refine the output of the above prompt to yield an answer formatted exactly how we want it.
Use your favorite output formatting technique to make Claude wrap just the letter of the correct classification in "<answer></answer>" tags. Refer to the above exercise if you forget which letter is correct for each email.
Claude's response will turn GREEN if your prompt yields the correct answer. For instance, the answer to the first email should contain the exact string "<answer>B</answer>".
Tip: As a first step, copy the final correct version of your prompt from Exercise 6.1 into the highlighted prompt template box below. Then edit and refine your initial prompt from there.
{{EMAIL}}
LLM Response
Submit your prompt to see the response here.