Fill a Template
Part of the Prompting Techniques section of Coddy's AI Prompts journey. Lesson 14 of 24.
Sometimes the output must match a form that already exists: a ticket system, a report, an order sheet. Give the AI the form itself, with blanks to fill, and it returns exactly those lines.
Fill in this template from the message in <message> tags. Keep the labels, replace each [ ] and reply with the filled template only.
<message>Hey all, we're doing a picnic in Riverside Park this Sunday, the 14th!</message>
Event: [ ]
Date: [ ]
Place: [ ]Event: Picnic
Date: 14th
Place: Riverside Park
The template does the format work for you: the labels, their order and the number of lines are all fixed. Put the source text in tags before the template, so the AI does not mistake it for one more line to fill.
Challenge
MediumYour warehouse logs every order on this form:
Item: [ ]
Quantity: [ ]
Address: [ ]Fill it from this message:
Hi! Please send 2 boxes of printer paper to 14 Oak Road. Thanks, Mia
The AI's response must:
- Be exactly 3 lines, each a label and a filled value
- Have no
[ ]left - Keep the quantity 2 and the house number 14
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Prompting Techniques
3Structured Output
Tables From TextPull Data Out as JSONWhen Data Is MissingFill a TemplateRecap: Structured Output