← Volver al programa
Prompting That Works: Write Requests AI Can Execute Well · Lección 3 de 7

3. Show the Output Format With an Example

Practice specifying structure (tables, lists, JSON) and providing a short example so the model follows format precisely.

When you ask a model for structured output — a table, a list, JSON — describing the structure in words is a good start, but showing a short example is far more effective. Models follow examples better than descriptions. Instead of writing "give me a table with three columns," paste two sample rows so the model sees exact column names, separators, and content style. The example acts as a template: the model mirrors its shape, its level of detail, and even its tone. This is the "format" part of the five-part prompt framework (goal, context, format, constraints, example). A weak answer is almost always missing one of these parts, and format is the one people skip most often — then wonder why the output needs heavy reformatting.

Your example does not need to be long. Two or three items in a list, two rows of a table, or a tiny JSON snippet with the right keys is enough. The point is to remove ambiguity: should the table have headers? Should list items start with a verb or a noun? Should JSON values be strings or numbers? A three-line example answers all of these questions instantly, while a paragraph of description might still leave room for interpretation. Put the format instruction and the example at the end of your prompt, after the goal and context, so the model reads the task first and the shape last — right before it starts generating.

Consejo

When you provide an example, use obviously fake placeholder content ("Acme Corp", "Jane Doe") so the model understands it is a template, not real data to repeat. This prevents it from copying your sample values into the actual output.

Here is a concrete before/after. Vague prompt: "List some project risks in a table." The model might return two columns, five columns, or a bulleted list. Better prompt: "List the top 5 risks for this project in a table. Use this format:

| Risk | Likelihood (H/M/L) | Mitigation | | Supplier delay | H | Dual-source key parts |"

Now the model knows the exact columns, the scale for likelihood, and the depth of the mitigation cell. One example row did all that work. If the format really matters — say you need valid JSON to feed another tool — paste the exact schema and one filled entry. The model will match it precisely.

Consejo

If the model drifts from your format after a few exchanges, you do not need to start over. Stay in the same conversation and give targeted feedback: "Return to the three-column table format from my first message." Iterating in place keeps the context the model already has.

Ahora tú

Open ChatPro and ask the model to produce a structured output you actually need (meeting notes, a comparison table, a JSON config). Include a 2–3 line example of the exact format. Check whether the output matches your template. If it drifts, correct the format in the same conversation instead of starting a new one.

Seguir este curso en OUPI → Este ejercicio se realiza en la plataforma OUPI.
Para recordar

To get the exact output shape you need: (1) name the structure — table, list, JSON, etc.; (2) paste a short example with placeholder content so the model sees columns, keys, or bullet style; (3) place the format block at the end of your prompt, after goal and context; (4) if the model strays, correct in the same conversation with targeted feedback. Examples beat descriptions — show the format, don't just tell it.