Prompt engineering for text generation: Difference between revisions

Tag: Manual revert
Line 34: Line 34:


===Example of a Prompt with the Above Structure===
===Example of a Prompt with the Above Structure===
====Input====
<poem style="border: 1px solid; padding: 1rem">
<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''': 2023:
</poem>
 
====Output====
<poem style="border: 1px solid; padding: 1rem">
2023: Joe Biden
</poem>
</poem>


370

edits