1. Learn
  2. /
  3. Courses
  4. /
  5. Working with Llama 3

Connected

Exercise

Formatting prompts for Llama

Models can sometimes struggle to separate the task, expected output, and additional context from a long, unstructured prompt. To remedy this, you can insert clear labels to break up and differentiate this information for the model.

The Llama model is available as llm, and will be available for the remainder of the course.

Instructions

100 XP
  • Add the labels Instruction, Question, and Answer to the prompt to format it more effectively.
  • Pass the prompt to the model.