Learn Before
Improving Prompt Reliability for Information Extraction
Rewrite the data scientist's prompt using a structured, code-like template to improve the consistency and reliability of the model's output. Your new prompt should clearly define the input and specify the format for the three required output fields.
0
1
Tags
Ch.2 Generative Models - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Ch.3 Prompting - Foundations of Large Language Models
Application in Bloom's Taxonomy
Cognitive Psychology
Psychology
Social Science
Empirical Science
Science
Related
Example of a Code-like Prompt for Machine Translation
Example of a Generic Code-like Prompt Template
Name:Content Prompt Formatting Style
Example of a Demonstration in a Code-like Prompt
A developer needs a large language model to perform two tasks on a given text: create a one-sentence summary and extract the names of any people mentioned. Below are two potential prompt structures for this task.
Structure A:
Summarize the following text in one sentence and list the names of any people mentioned. Text: {input_text}Structure B:
[INPUT_TEXT] = "{input_text}" [TASK_1] = Create a one-sentence summary. [TASK_2] = Extract all names of people. [OUTPUT] summary: people:Which of the following statements best analyzes why Structure B is a more effective prompt design for ensuring reliable and consistent results?
Improving Prompt Reliability for Information Extraction
Using Descriptive Prompts for Complex Tasks
Critiquing a Multi-Task Prompt