Jump to content

Prompt engineering for text generation: Difference between revisions

Line 34: Line 34:


===Example of a Prompt with the Above Structure===
===Example of a Prompt with the Above Structure===
<code>
<poem style="border: 1px solid; padding: 1rem">
Instruction: Who is the president of the United States of America?
Instruction: Who is the president of the United States of America?
Context: Because GPT-4 does not have information after September 2021. We need to inform it. The president of the United States is Joe Biden in 2022 and 2023.
Context: Because GPT-4 does not have information after September 2021. We need to inform it. The president of the United States is Joe Biden in 2022 and 2023.
Examples: 1964: Abraham Lincoln, 1940: Franklin D. Roosevelt
Examples: 1964: Abraham Lincoln, 1940: Franklin D. Roosevelt
Query and output indicator: 1940:  
Query and output indicator: 1940:  
</code>
</poem>


==Building Prompts==
==Building Prompts==
370

edits