brainax

Get the answer in the right format

Lesson 14 of 23 in the course “AI basics”. Free, with animations and a quiz.

Format is part of the task

Without instructions the model often replies with a wall of text. Example: you compare three side jobs and get a paragraph where everything is mixed up. Name the format directly: “table: hourly pay, schedule, commute”, “a list of 5 points”, “no more than 100 words”. For apps there's JSON: text where data is written as fields, like "name": "Ana". In short: say what shape is handy for you.

Give it a skeleton to fill

The most reliable way: give a ready template and ask the model to fill in only that. Example for lecture notes: “Topic: … / Main idea: … / 3 terms explained: … / Self-check question: …”. The model sees the fields and their order and barely drifts off. The same template works for every lecture, and all your notes will look the same.

Separate data from instructions

When you paste someone else's text, fence it off. A delimiter is a mark like ### or quotes that shows where the pasted part starts and ends. Example: “Shorten the email between ### to 3 points.” Why: the email might say “reply by Friday”, and without marks the model may take that as an order for itself. With marks it's clear: that's data, and only you give commands.

Let it say “I don't know”

A template with fields puts pressure on the model: it wants to fill everything. If the data isn't there, it may invent it. That's a hallucination, meaning a confident made-up answer. Example: you ask it to pull the pay from a job post, the post doesn't mention pay, and a random number shows up in your table. Add to your prompt: “If the text doesn't say it or you're unsure, write: no data.”

Check before you use it

Format is easier to check than meaning, so start there. Are all the columns there? Do the totals add up? Was the length limit respected? Models count words only roughly, since they see tokens, not words. If the JSON goes into an app, one missing quote mark can break it. Bottom line: a neat table doesn't mean correct data. Still check the numbers and facts.

Check yourself

  1. You want an easy-to-read comparison of three side jobs. How do you ask?
    Correct answer: As a table: hourly pay, schedule, commute. The more precise the format, the handier the result. A table with the right columns sorts everything out at once.
  2. Why wrap pasted text in ###?
    Correct answer: So the model tells your data apart from instructions. The delimiter shows where the pasted part ends. Then the model won't mistake a line from the email for your command.
  3. You fill a template from a job post, but it doesn't mention pay. What do you add to the prompt?
    Correct answer: “If the data is missing, write: no data”. Without that permission the model may invent a number just to fill the field. “No data” is more honest than a guess.

← Think step by step AI + your documents (RAG) →