Jump to content

Prompt engineering for text generation: Difference between revisions

Line 39: Line 39:
====Input====
====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: Identify the president of the United States of America for the given year.
'''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
'''Query and output indicator''': 2023:
</poem>


Instruction: Identify the president of the United States of America for the given year, considering that GPT-4's knowledge is limited to information up until September 2021. We need to provide some context to help with the task. Joe Biden is the president of the United States in 2022 and 2023.
'''Context:'''


<poem style="border: 1px solid; padding: 1rem">
Considering that GPT-4's knowledge is limited to information up until September 2021. We need to provide some context to help with the task with Joe Biden.
Context:


#1861-1865: Abraham Lincoln was the 16th president of the United States.
#1861-1865: Abraham Lincoln was the 16th president of the United States.
Line 74: Line 69:
====Output====
====Output====
<poem style="border: 1px solid; padding: 1rem">
<poem style="border: 1px solid; padding: 1rem">
2023: Joe Biden
*1945: Franklin D. Roosevelt
*2017: Barack Obama
*2023: Joe Biden
</poem>
</poem>


370

edits