Sub topic 2
Writing a brief the model can work from
This chapter assumes you have prompted a large language model before and have seen a content workflow of writing, editing, and publishing. The code is simple Python. A brief is the written input that tells the model what to draft. It is the first step of the pipeline and the cheapest place to prevent problems that reviewers would otherwise catch later.
Why the brief matters
A model only knows what you give it. If the request is "write a blog post about our new plan", the model fills each gap with a guess. Guesses about audience, tone, and facts become review comments, and sometimes they slip past review.
A good brief does two jobs. It gives the model what it needs to write a useful first draft. It also gives reviewers a written record of what the draft was supposed to do, so they can check the draft against it.
The parts of a brief
Include these five parts.
- Audience. Who will read this, and what do they already know?
- Purpose. What should the reader understand or do afterward?
- Sources. The facts the draft may use. Paste them in or point to them.
- Constraints. Length, tone, format, required and banned phrases, and claims the draft must not make.
- Open items. Things you do not know yet, so the model does not invent them.
The sources and constraints do the most to reduce risk. If the draft may only use facts from the supplied sources, a reviewer can check each claim against that list.
A brief as structured data
Keeping the brief as data instead of free text makes it easy to reuse, store with the content item, and turn into a prompt. Here is a small version.
from dataclasses import dataclass, field
@dataclass
class Brief:
audience: str
purpose: str
sources: list[str]
constraints: list[str]
open_items: list[str] = field(default_factory=list)
def validate(self):
problems = []
if not self.sources:
problems.append("no sources: the model would have to invent facts")
if not self.purpose.strip():
problems.append("purpose is empty")
return problems
def to_prompt(self):
sources = "\n".join(f"- {s}" for s in self.sources)
rules = "\n".join(f"- {c}" for c in self.constraints)
unknown = "\n".join(f"- {o}" for o in self.open_items) or "- none"
return (
f"Audience: {self.audience}\n"
f"Purpose: {self.purpose}\n\n"
f"Use only these facts:\n{sources}\n\n"
f"Follow these rules:\n{rules}\n\n"
"If a needed fact is missing, write [NEEDS INPUT] "
f"instead of guessing. Known gaps:\n{unknown}\n"
)
brief = Brief(
audience="Existing customers on the Basic plan",
purpose="Explain the new Plus plan and how to upgrade",
sources=["Plus costs 12 USD per month", "Upgrades take effect immediately"],
constraints=["Under 150 words", "No claims about savings", "Plain language"],
open_items=["Annual pricing is not decided"],
)
print(brief.validate())
print(brief.to_prompt())validate runs before any model call. A brief with no sources is rejected, which is cheaper than finding invented facts in review.
The marker for missing facts
The prompt tells the model to write [NEEDS INPUT] where a fact is missing. Models tend to fill gaps with plausible text. An explicit instruction gives them an alternative, and the marker is easy to find. The automated checks in a later chapter can block any draft that still contains it.
Common errors
| Error | Effect | Fix |
|---|---|---|
| No sources given | The model invents facts | Make sources required, as `validate` does |
| Vague purpose ("inform people") | The draft has no clear point | State the action or understanding wanted |
| Constraints that conflict | The model picks one and ignores the other | Rank constraints or remove one |
| Whole documents pasted as sources | Key facts get buried | Extract the relevant facts |
| Brief not saved | Reviewers cannot see the intent | Store the brief with the item |
How the brief connects to the pipeline
The brief is created before the draft exists. It is stored with the content item, so the same text that guided the model also guides the reviewer. The next chapter covers generating the draft from it.
Exercise
A teammate's brief lists the audience and purpose but no sources, and says "make it accurate". What will likely go wrong, and what should change?
Show answer
The model will fill the gaps with plausible but unverified facts, and "make it accurate" gives it nothing to be accurate against. Add the facts the draft may use as sources, tell the model to use only those, and have it write [NEEDS INPUT] for anything missing. Reviewers can then check each claim against the list.