Learn Before
Prompt Field Labeling for Clarity and Structure
To improve the clarity and readability of prompts while reducing ambiguity, it is a common practice to format them with distinct fields. These fields are identified by labels (e.g., SYSTEM, USER, Input:, Output:) that structure the prompt and clarify the role of each piece of information for the language model.
0
1
Tags
Ch.3 Prompting - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Prompt Field Labeling for Clarity and Structure
Code-like Prompt Templates
An engineer is tasked with creating a prompt that instructs a language model to summarize a given text. Below are two versions of the prompt they are considering.
Prompt A: "Please summarize the following text for me. The summary should be exactly two sentences long and maintain a formal tone. The text to summarize is: The quick brown fox jumps over the lazy dog."
Prompt B: "INSTRUCTIONS: Summarize the provided text.
CONSTRAINTS:
- Length: Exactly 2 sentences.
- Tone: Formal.
TEXT: The quick brown fox jumps over the lazy dog."
What is the primary advantage of using the formatting in Prompt B over the formatting in Prompt A?
Refining a Prompt for Clarity
Evaluating Prompt Structure for a Chatbot
Learn After
A developer is creating a prompt to have a language model summarize a news article. The initial prompt, shown below, often results in the model confusing the instructions with the article content itself.
Initial Prompt:
Summarize the following text into three paragraphs. It's about a new AI chip. A new AI chip was announced today by a major tech company. It promises to be 10x faster than previous models...Which of the following revised prompts best uses distinct fields to resolve this ambiguity and improve clarity for the model?
Constructing a Structured Prompt for a Classification Task
Diagnosing Inconsistent LLM Behavior