Write a prompt that returns the same shape of answer every time, keep a library of templates for your team, and set up an assistant that knows your own documents.
Module 02 ~45 min read + lab No codePrerequisites: Module 1: Agents and Automation, Explained, plus an account on ChatGPT, Claude, Copilot or Gemini.
When you hand a task to a new temp, you do not say "deal with the inbox". You say who they are standing in for, what the team does, what exactly to do, what they must not do, and what the finished result should look like. A prompt is the same instruction, written for a model. Vague instruction, vague output.
The difference between a chat you enjoyed and a prompt you can put inside an automation is repeatability. In Module 6 the same prompt will run hundreds of times a day without you watching. It has to produce the same shape of answer for every input. That is the standard you are learning to write to now.
Role (who the model is), context (what it needs to know), task (the one thing to do), constraints (limits, tone, what not to do), output format (the exact shape of the answer). Most weak prompts are missing two of these.
Here is a real request an office coordinator typed, and the version that works inside a workflow.
| Part | What it does | What goes wrong without it |
|---|---|---|
| Role | Sets vocabulary, tone and assumed knowledge | Generic, over-long answers |
| Context | Gives the facts and definitions the model cannot know | The model guesses your policies |
| Task | One verb, one deliverable | The model does three things badly |
| Constraints | Length, tone, forbidden actions, what to do when unsure | Invented details, wrong register |
| Output format | Makes the answer machine- and colleague-readable | Different shape every run; nothing downstream can use it |
The line "If unclear, say unclear rather than guessing" is the single most valuable sentence in the prompt. It turns a confident wrong answer into a flag a person can act on. You will reuse it in every AI step you build.
An automation cannot read prose. It reads fields. Ask for labelled lines, a fixed set of categories, a markdown table, or a small set of key-value pairs, and say the allowed values out loud: "Category must be one of: billing, technical, sales, other."
Models copy patterns better than they follow descriptions. If your classification has edge cases, show two or three worked examples inside the prompt. This is called few-shot prompting.
That ten-row sheet is your first test set. Keep it. In Module 12 you will use it again every time you change the prompt or the model.
Every major assistant now lets you save a standing set of instructions together with uploaded files, so you do not repeat the context each time. The names differ; the idea is the same.
| Product | Feature | What you can upload | Sharing |
|---|---|---|---|
| ChatGPT | Projects, custom GPTs | PDF, Word, spreadsheets, text | Custom GPTs can be shared with a team or link |
| Claude | Projects with project knowledge | PDF, Word, text, images | Shared within a Team or Enterprise workspace |
| Microsoft Copilot | Copilot agents, Copilot Notebooks | SharePoint and OneDrive files | Shared through Microsoft 365 permissions |
| Google Gemini | Gems | Google Drive files | Shared with Workspace users |
A "department assistant" built this way is the simplest agent you will meet: a model, instructions, and memory in the form of your documents. It has no tools yet, so it can only answer, not act. That is a good thing while you learn what it gets wrong.
Before you upload a policy, a contract or anything with personal data, check your organisation's rules and the product's data terms. Consumer tiers may use uploads for training; business tiers usually do not. Module 11 covers this properly. Until then, use public or dummy documents in the labs.
A language model produces the most plausible next words. When it lacks a fact it will often produce a plausible fact instead. This is hallucination, and it looks exactly like a correct answer. Three habits catch most of it:
| Symptom | Likely cause | Fix |
|---|---|---|
| Cites a policy section that does not exist | No source provided, or source not searched | Upload the policy, require a quote |
| Different category for the same email on two runs | Categories not defined, no examples | List allowed values, add few-shot examples |
| Long, polite, says nothing | No task, no format | One verb, labelled output lines, word limit |
| Confident answer to an ambiguous request | No "unclear" option | Add the unsure clause and route unclear items to a person |
You will build two things: a five-template prompt library your team can reuse, and a department assistant that answers from uploaded documents. Use any of ChatGPT, Claude, Copilot or Gemini. For the documents, use public policies (for example a university's leave policy found online) or a made-up one; do not upload real internal documents yet.
Open a new document called M2-prompt-library. Make five headings: Triage an email, Summarise a meeting transcript, Draft a reply, Extract fields from a form, Classify a request.
Under each heading write role, context, task, constraints and output format. Use square-bracket placeholders such as [department] and [paste text] so a colleague can fill them in. Start from this skeleton:
For the Classify a request template, list four allowed categories and write one example for each. Add a fifth, awkward example that should be classified as other.
In a spreadsheet, write ten realistic inputs for the classifier, with the category you expect in the next column. Run the prompt on each and record the model's answer in a third column. Count the matches.
For every mismatch, change the prompt (a constraint or an example, not a plea for accuracy) and run all ten again. Record the second score.
In your assistant, create a Project (or custom GPT, Gem, or Copilot agent). Paste this as its instructions and upload two public policy documents:
Ask it three questions the documents answer, then two they do not (for example a benefit that is not mentioned). Note whether it admits "not covered" or invents an answer. Record the results at the bottom of your library document.
The M2-prompt-library document (five templates, test scores before and after, and the assistant's trap-test results) plus a screenshot of the assistant answering one question with a quotation.
Pick one answer per question, then check your score. These mirror the style of the final exam.
Answer in your own words first, then open the model answer.
Role: contracts assistant to the procurement team. Context: we need the notice period and any penalties. Task: extract the cancellation terms from the contract below. Constraints: only from the text, quote the clause, say unclear if absent, under 100 words. Output: Notice period / Penalty / Clause quoted / Confidence.
Because prompts and models change. Re-running the same ten inputs after any change tells you immediately whether quality dropped. It becomes the evaluation set used in Module 12.
The project assistant has a model, instructions and document memory but no tools; it can only answer. The Module 8 agent adds tools, so it can look things up and take actions.
Further reading: A Visual Guide to LLM Agents · LangChain and RAG concepts · Text classification with transformers