Class 4: Giving AI the Right Information
By the end of this class you will be able to
- Explain what the context window is and why the AI only knows what it can "see".
- Choose between pasting text, uploading a file and using a project or knowledge base for a given task.
- Describe in plain words how RAG (retrieval-augmented generation) works, and what can go wrong with it.
- Write a grounded prompt that makes the AI answer only from your documents, cite them and say "not found" when the answer isn't there.
- Recognise when the AI's knowledge cutoff or a long, messy pile of documents is likely to give you a wrong answer.
- Work with documents in more than one language without losing accuracy.
Where we are
In Class 3 you learned to write clear instructions. This class is about the material you give the AI to work with, the Context & Data part of the AI Map. A well-written prompt can't rescue an answer if the right facts aren't in front of the model. In Class 5 we put both skills to work on everyday tasks.
1. The model only knows what it can see¶
Picture a skilled analyst who works in a room with one desk and no windows. Everything they have ever read is stored in their memory, but that memory is a year or two old and a little fuzzy. On the desk in front of them is whatever you have handed in: your question, your instructions, a few documents. When you ask something, they answer from two places, the desk and their memory. They strongly prefer the desk, because it is right there. And if the desk is empty, they will answer from memory, fluently and confidently, even when their memory is out of date or never contained the answer.
That is a good picture of an AI chat tool. It has two sources of information:
- What it learned in training. The model was trained on a very large amount of text, up to a certain date. This is its general knowledge: how to write, what a situation report looks like, broad facts about the world. It knows nothing about your programme, your inbox, your internal documents or anything that happened after training.
- What is in front of it right now. Your messages, the AI's earlier replies in the same chat, any text you paste, any files you upload and anything the tool looks up for you (for example with a web search or a search of your organization's documents).
The second source is called the context. Almost every accuracy problem in everyday AI use comes down to one of three things: the right information wasn't in the context, the wrong information was, or there was so much that the important part got lost. This class is about getting the context right.
The one-sentence version
If it isn't on the desk, the AI is guessing from memory. Put the facts you need in front of it, and tell it to use them.
2. The context window in practice¶
The context window is the size of the desk: the maximum amount of text the model can take in and consider at once. It is measured in tokens, the word-pieces you met in Class 2. As a rough guide, 1,000 tokens is about 750 English words. Other languages can use more tokens for the same meaning; Arabic, Chinese and Russian text often takes more tokens than English.
As of 2026, context windows in mainstream enterprise tools range from tens of thousands of tokens up to around a million. A million tokens is a few thousand pages. That sounds like "unlimited", but in practice there are three catches.
Everything shares the same desk. The context window holds all of the following at once:
- any standing instructions set by your organization or by you (a system prompt or custom instructions)
- every message in the conversation so far, yours and the AI's
- every file and pasted text
- the answer the AI is currently writing
A long conversation with three uploaded reports can fill the desk faster than you'd expect.
When the desk is full, something falls off. Tools handle this differently, and often without telling you. Some quietly drop the oldest messages. Some summarize the earlier conversation into a shorter note. Some read only the first part of a very long file, or only search parts of it. The symptom is the same: the AI seems to "forget" an instruction from early in the chat, or answers as if a document's final chapter didn't exist.
The tool's limit may be smaller than the model's. Your enterprise tool may cap the size of uploads, the number of files per chat or the length of a conversation, whatever the underlying model can handle. Check your tool's help page for its real limits.
The AI rarely tells you it didn't read everything
If you upload a 200-page evaluation and ask a question about page 180, the AI may answer from what it did see, without mentioning that it never reached page 180. When the answer matters, ask: "Which sections of the document did you use for this answer?" and check.
A practical habit follows from all this: start a new chat for a new task. Carrying yesterday's long conversation into today's unrelated work fills the desk with clutter and increases the chance that old instructions interfere with new ones.
3. Three ways to hand the AI your material¶
Enterprise AI tools (as of 2026, for example Microsoft Copilot, ChatGPT Enterprise and Claude) give you roughly three ways to put information in front of the model. The names differ between products, but the ideas are the same.
| Method | What it is | Best for | Watch out for |
|---|---|---|---|
| Pasting text | You copy text straight into your message | Short material: an email, a field note, a few paragraphs of a report | Formatting and tables can get scrambled. Easy to paste more than you meant to |
| Uploading a file | You attach a document, spreadsheet or PDF to the chat | One or a few documents for a single task | The tool may read only part of a long file. Scanned PDFs and images of tables may be read poorly or not at all |
| Projects / knowledge bases | A saved space holding a set of documents and standing instructions, reused across many chats. Some tools also connect to your organization's document stores | A body of reference material you use repeatedly: guidelines, templates, past reports | The AI usually searches the collection rather than reading all of it (see Section 4). Out-of-date documents stay in there until someone removes them |
A few practical notes:
- Paste when it's short and you want the AI to read every word. Pasted text sits directly in
the context, so nothing is skipped. Put clear markers around it (
""", as in Class 3). - Upload when it's longer, or when layout matters. But for any document over a few dozen pages, assume the AI may not have read all of it, and point it to the part you care about: "Use Section 4, 'Water and sanitation', on pages 22–30."
- Use a project when you'd otherwise paste the same thing every week. A "SitRep" project could hold your reporting template, your style guide and last month's approved reports, plus standing instructions like "Write 'not stated' for missing figures." Everyone in the team then starts from the same brief.
- Check what the tool is approved for. Uploading a file or adding it to a shared project is sharing data with the tool. The data rules from Class 3 apply in full (see the data rules on the About page).
Know the Term: System prompt
A system prompt is a set of standing instructions given to the AI before the conversation starts. It usually sets the AI's role, its rules and its style, such as "You are an assistant for humanitarian staff. Answer in plain English. Never invent figures." The people who set up the tool write it, and you usually cannot see it. Many chat tools also let you write your own version, often called custom instructions, a project, or a custom assistant, that applies to every chat in that space. Your prompt is added on top of it.
Analogy: the standing orders a new colleague receives in their induction pack. Each request you make is a new task, but the standing orders still apply.
Why you care: if you retype the same background ("I work in programme support, write in British English…") in every chat, put it in custom instructions once. It also explains why the same question can get different answers in different tools.
4. RAG, explained simply¶
Suppose your project contains 400 documents: guidelines, assessments, meeting notes, three years of situation reports. Even with a large context window, putting all 400 on the desk for every question would be slow, costly and, as Section 7 explains, would make answers worse. So tools use a different approach. They look things up first, then answer.
Think of the difference between a closed-book exam and an open-book exam. In a closed-book exam, the student answers from memory, and if they don't remember, they may bluff. In an open-book exam, the student first finds the right pages in the textbook, then writes the answer from those pages, and can point to where it came from. The second answer is usually more accurate and much easier to check.
This open-book approach is called RAG, short for retrieval-augmented generation: retrieval (finding the relevant passages), augmented (adding them to the context) and generation (writing the answer).
Know the Term: RAG (Retrieval-Augmented Generation)
Instead of relying only on what the model memorized during training, a RAG system first searches a collection of documents for passages relevant to your question, then hands the best matches to the model together with your question. The model writes its answer from those passages and can cite them.
Analogy: an open-book exam instead of answering from memory.
Why you care: RAG is the main way to make AI answer from your organization's documents — current, specific and citable — without retraining a model.
The pipeline in plain words¶
| Step | What happens | Open-book exam equivalent |
|---|---|---|
| 1. Split | Before any question is asked, each document is cut into short pieces called chunks, often a few paragraphs each | Putting sticky tabs on every section of the textbook |
| 2. Find | When you ask a question, the system searches all the chunks and picks the handful that best match it | Flipping to the tabbed pages that look relevant |
| 3. Answer | Those chunks go on the desk with your question, and the model writes an answer from them, with citations saying which document each point came from | Writing the answer from those pages and noting the page numbers |
The search in step 2 is usually by meaning, not just by exact words, so a question about "displaced families" can find a passage that says "households who left their homes". (Class 4 of the AI Engineering course shows how this works under the hood.)
You meet RAG whenever your tool says something like "searching your documents", "searching SharePoint", "using project knowledge" or shows little numbered source links under its answer.
What can go wrong¶
RAG is a big improvement over answering from memory, but it isn't magic. Each step can fail:
- The right chunk isn't found. If your question uses different words from the document, or the answer is spread across three places, the search may bring back the wrong passages. The AI then answers from those, often confidently.
- The chunk lost its context. A chunk that says "the figure rose to 1,450" may have been cut off from the heading that said which district and which month.
- The answer is in a form the system can't read: a scanned page, a chart, an image of a table.
- The question needs the whole collection. "Summarize all 400 documents" or "What's the trend across three years?" can't be answered from a handful of chunks. The AI will summarize the few it found and may present that as the whole picture.
- Old and new versions both exist. If last year's guideline and this year's are both in the collection, the search may find the old one.
Ask RAG questions the way you'd use an index
RAG works best for specific questions whose answer sits in one or two places: "What does the 2026 WASH guideline say about the minimum water quantity per person?" It works worst for questions that need everything at once. For those, give the AI a smaller, hand-picked set of documents and ask it to read them all.
5. Grounding and citations¶
Grounding means making the AI answer from specific sources you trust, rather than from its general memory. RAG is one way to ground an answer. Pasting or uploading the source documents yourself is another. Either way, the instruction you give matters as much as the documents.
Without an instruction, the model blends the desk and its memory freely. If your documents don't contain the answer, it will often fill the gap from general knowledge, or simply invent something plausible, and the result looks just like a sourced answer. So say explicitly what you want:
Answer the question using ONLY the documents provided below.
Rules:
- After each statement, cite the document it came from in square
brackets, e.g. [Doc A].
- If the documents do not contain the answer, reply exactly:
"Not found in the documents provided." Do not use general knowledge and do not guess.
- If two documents disagree, show both figures with their sources and
say they conflict. Do not pick one.
Question: [your question]
Documents:
"""
[Doc A — title, date]
...
[Doc B — title, date]
...
"""
Three parts of this prompt do the heavy lifting:
- "Only the documents provided" sets the boundary.
- An exact phrase for "not found" gives the AI an approved way out. Without one, the easiest thing for it to do is produce some answer.
- A rule for conflicts stops it quietly choosing one figure and hiding the disagreement.
Checking citations¶
A citation is only useful if you check it. Models sometimes attach a citation to a statement the source doesn't actually support, or cite the right document for a slightly wrong figure. For anything that will go into a report:
- Click or look up the cited passage and read it yourself.
- Ask the AI to quote the exact sentence it relied on: "For each figure, quote the sentence from the source word for word." A quote is easy to check; a paraphrase is not.
- Be suspicious of a citation to a document you never gave it.
Grounding reduces invented answers a great deal, but it doesn't remove them. Class 6 builds full verification habits on top of this.
Know the Term: Structured output
Structured output means asking the AI to answer in a fixed, predictable shape instead of
free-flowing text: a table with named columns, a form with set headings, or a data format
such as JSON (a plain-text format that computer programs can read, made of labelled
fields like "district": "Aramu"). You describe the shape, meaning the fields, their order
and what to write when something is missing, and the AI fills it in. Software that uses AI
goes a step further: it can require the model to follow an exact template and reject any
answer that does not fit.
Analogy: handing someone a printed form to fill in instead of a blank sheet of paper. Every answer lands in the same box, every time.
Why you care: structured answers are faster to check, easy to compare across reports and ready to paste into a spreadsheet or another system. An empty box also shows you straight away what information is missing.
6. Knowledge cutoff: what the model's memory doesn't include¶
The model's general knowledge comes from training, and training stopped on a certain date. That date is its knowledge cutoff.
Know the Term: Knowledge cutoff
A model learns from a huge collection of text gathered up to a certain date, and then its training stops. That date is its knowledge cutoff. Anything that happened afterwards, such as a new policy, a changed ceasefire line, last week's flood figures or a newly appointed head of agency, is simply not in the model's memory. Some tools add a web search or a document search on top, which can bring in newer information, but the model underneath still has a fixed cutoff. Worse, the model doesn't always know what it doesn't know: asked about recent events, it may answer confidently from older information as if it were current.
Analogy: a well-read colleague just back from a year at a remote field post with no internet. They know a lot, but nothing from the past year, and they may not realise how much has changed.
Why you care: for anything recent or fast-moving, don't rely on the model's memory. Give it the current documents yourself, and check the date on any fact that matters.
This matters a great deal in organizational work, because so much of what we deal with changes quickly: who holds which post, the current phase of a response, the latest funding figures, revised guidelines, the status of a negotiation. Ask the model about any of these from memory and you may get last year's answer, stated as though it were today's.
Three things to know:
- The cutoff is usually months before you use the tool. Models are trained, tested and then released, and stay in use long afterwards. A model you use today may have a cutoff a year or more back.
- Web search changes the picture, but only partly. Many tools can search the web (as of 2026 this is often a switch you can turn on or off). The answer then draws on search results, which may be recent but can also be unreliable, and the tool may not search at all unless the question clearly needs it. Look for visible sources in the answer; no sources usually means it answered from memory.
- The model may not know its own cutoff reliably. Asking "What is your knowledge cutoff?" gives you a rough idea, not a guarantee. Your tool's documentation is a better source.
The practical rule is simple: for anything recent or specific to your organization, provide the source. Paste the current guideline rather than asking what it says. Upload this week's figures rather than asking for "the latest numbers".
7. Why long, messy context gives worse answers¶
If the desk holds the facts, wouldn't more documents always be better? No. Picture handing a colleague a box of 60 unsorted papers, including three drafts of the same report, a few unrelated emails and last year's version of the template, and asking a quick question. They will be slower, more likely to pick the wrong draft and more likely to miss the one sentence that matters. Models behave in much the same way.
Research and everyday experience both show several effects:
- Things in the middle get less attention. Models tend to use information near the start and end of a long context more reliably than information buried in the middle. An important figure on page 90 of 150 is at risk.
- Irrelevant material distracts. Unrelated text increases the chance that the model draws on the wrong passage, or blends two topics together.
- Duplicates and versions confuse. With three drafts of a report on the desk, the model has no way of knowing which is final unless you tell it, and it may mix figures from different drafts.
- Long conversations drift. After many turns, early instructions ("British English", "under 200 words", "write 'not stated'") are more likely to be forgotten.
So curate your context, as you would for a human reader:
| Instead of… | Do this |
|---|---|
| Uploading the whole shared folder | Pick the three to five documents that actually answer the question |
| Uploading several drafts | Give only the final version, or label them: "Doc B is the final, approved version" |
| Leaving documents unlabelled | Give each a short label, title and date: [Doc A — VRC rapid assessment, 12 May 2026] |
| Asking about "the report" | Say which document and which section |
| Continuing a very long chat | Start a new chat with a clean brief and only the documents you need now |
| Putting key instructions in the middle | Put the question and rules at the start and repeat the key rule at the end |
Dates are context too
Whenever documents could disagree because one is newer, include their dates and tell the AI what to do: "Where documents conflict, prefer the most recent, but list the older figure too so I can check it."
8. Working across languages¶
Many organizations work in several languages, for example Arabic, Chinese, English, French, Russian and Spanish. Your documents, your colleagues and your readers may use any of the languages your organization works in. Modern models handle widely used languages like these well (as of 2026), but mixing languages in the context brings some specific risks.
- Say which language you want the answer in. If you ask in English about a French document, some tools reply in French, some in English. Don't leave it to chance: "Answer in English."
- Ask for quotes in the original language. When the source is in Spanish and the answer is in English, a translated figure or phrase can drift. Ask for the original sentence alongside the translation, so a Spanish-speaking colleague can check it.
- Search can be weaker across languages. In some RAG systems, a question in English may find English chunks more easily than equally relevant Arabic or Russian ones. If you know the key document is in another language, name it, or ask the question in that language as well.
- Names and places are easily garbled. Names written in Arabic, Chinese or Russian script can be transliterated into Latin script in several ways, and the AI may "correct" a name into a different person or place. Keep one agreed spelling and tell the AI to use it.
- Official terminology matters. Many terms have agreed equivalents in each language. The AI may choose a natural-sounding translation that isn't the official one. Where precision matters, give it a short glossary of your terms, or check against your organization's terminology list or an official terminology database.
- Token cost differs by language. The same text can take more tokens in some languages, so a long Arabic or Chinese document fills the context window faster than its English equivalent.
Class 5 returns to translation as a work task in its own right.
Prompt Lab¶
Work in pairs using your organization's approved AI chat tool. All exercises use the two short fictional documents below from the SitRep Assistant case study. Notice that they disagree on one figure. Copy both into a text file so you can paste them quickly.
Doc A (fictional)
[Doc A — Veloria Relief Coalition, Rapid Needs Assessment,
Aramu district, 12 May 2026]
Teams visited Aramu town, Lomi and Tavet on 10–11 May. Dorra could not be reached because the Kessa bridge road is cut.
Displacement: an estimated 1,450 households are displaced across the three locations visited. Around 600 people are sheltering at Aramu primary school.
Water: 2 of 3 boreholes in Lomi are flooded. Residents are using river water. Water trucking has not started.
Health: Tavet health post reports 14 cases of acute watery diarrhoea since 6 May, mostly children under five. Stocks of oral rehydration salts (ORS) will last about one week.
Priority needs: safe water, hygiene kits, ORS, shelter materials.
Doc B (fictional)
[Doc B — Aramu District Coordination Meeting, notes, 14 May 2026]
Present: district authorities, Veloria Relief Coalition, two local NGOs.
1. Figures. The district office reported 1,150 displaced households,
based on registration at the school and community hall. Partners agreed to use the district figure for planning until a joint count is done.
2. Water. Water trucking to Lomi to start 16 May (two trucks daily).
3. Dorra. Still no access. A team will try the northern route on
15 May.
4. Next meeting: 21 May.
Exercise 1: Grounded answers with citations¶
Task: Ask a factual question and require citations. Paste both documents.
Using ONLY the two documents below, answer these questions. After each answer, cite the document in square brackets, e.g. [Doc A], and quote the exact sentence you relied on.
1. What is the main water problem in Lomi, and what is being done?
2. How many cases of acute watery diarrhoea have been reported, where,
and since when?
3. When is the next coordination meeting?
If the documents do not contain an answer, reply exactly:
"Not found in the documents provided."
Documents:
"""
[paste Doc A]
[paste Doc B]
"""
What to look for:
- Does the water answer combine both documents (flooded boreholes from Doc A, trucking from Doc B), with a citation for each part?
- Are the quotes word for word? Check one against the source yourself.
- Did it add anything that isn't in either document, such as a cause for the diarrhoea, a number of trucks for Tavet, or a date when water trucking will end?
Exercise 2: The grounding test¶
Task: Ask questions the documents cannot answer. This is the most important test in this class. First run it with the rules, then open a new chat and run the same questions without the rules paragraph.
Using ONLY the two documents below, answer these questions.
1. How many households are displaced in Dorra?
2. What is the total budget of the Aramu flood response?
3. Which agency is leading the health response in Tavet?
Rules: if the documents do not contain the answer, reply exactly "Not found in the documents provided." Do not use general knowledge, do not estimate, and do not guess.
Documents:
"""
[paste Doc A]
[paste Doc B]
"""
What to look for:
- With the rules, does it say "Not found in the documents provided." for all three? A partial answer like "likely around 300 households" is a failure.
- Without the rules, does it invent an estimate, name an agency or suggest a typical budget? How convincing does the invented answer look?
- Question 3 is a trap: VRC appears in both documents, so the AI may be tempted to say VRC leads on health. Neither document says so.
Exercise 3: Spotting the conflict¶
Task: See whether the AI notices that the documents disagree, and whether it hides the disagreement when you ask for a single number.
How many households are displaced in Aramu district? Give me one number for the headline of today's SitRep.
Documents:
"""
[paste Doc A]
[paste Doc B]
"""
Then send this follow-up in the same chat:
Check again. Do the two documents agree on this figure? List every displacement figure in both documents, with its source, its date, how it was arrived at (estimate, registration, etc.) and what it covers. Then suggest how the SitRep headline should word this honestly.
What to look for:
- In the first answer, did it pick 1,450 or 1,150 without mentioning the other? Or did it average them (1,300), a number that appears in neither document?
- After the follow-up, does it notice the differences: Doc A is an estimate from three locations; Doc B is registration at two sites and is two days later?
- Does it note that Doc B says partners agreed to use the district figure for planning? That is the kind of detail a human reader would weigh.
- Rewrite the first prompt with a conflict rule so the single-number trap can't happen again.
Exercise 4: Probing the knowledge cutoff¶
Task: Find out what the model knows from memory, and how it behaves when asked about recent events. Use a new chat with no documents. If your tool has a web search switch, try each question with search off and then on.
1. What is your knowledge cutoff date? How confident are you in that?
2. What are the most recent developments in [pick a real, fast-moving
topic in your field, e.g. a recent change to a global funding mechanism]? Give dates.
3. For your answer to question 2, tell me which parts come from your
training and which from a search, and how current each part is.
What to look for:
- Does the stated cutoff match what your tool's documentation says?
- In question 2, are the "most recent" developments actually recent? Check one date yourself.
- Did it make clear which parts were from memory? With search on, are sources shown?
- Discuss: what would you paste in to make this answer trustworthy?
Exercise 5: Across languages¶
Task: Ask in one language about a document in another. Choose a language one of you reads well, other than English (French and Spanish work well for this exercise).
Réponds en français. En utilisant UNIQUEMENT les deux documents ci-dessous (en anglais), résume la situation de l'eau à Lomi en trois phrases. Pour chaque chiffre ou date, cite la phrase originale en anglais entre guillemets, avec la source [Doc A] ou [Doc B]. Si une information ne figure pas dans les documents, écris « Non indiqué dans les documents ».
Documents :
"""
[paste Doc A]
[paste Doc B]
"""
(Swap in a Spanish, Arabic, Chinese or Russian version of the same instruction if you prefer.)
What to look for:
- Is the answer in the requested language throughout?
- Do the numbers and dates survive translation unchanged ("2 of 3 boreholes", "16 May", "two trucks daily")?
- Are place names (Lomi, Kessa, Aramu) spelled as in the source, or "translated"?
- Does the French or Spanish read like natural, professional language? The partner who reads it well is the judge.
Check Your Understanding¶
1 You ask the chat tool, with no documents attached, "How many households are displaced in Aramu district?" It replies with a precise figure. Where did that figure most likely come from?
2 Midway through a long chat with three uploaded reports, the AI stops following your early instruction to "write 'not stated' for missing figures" and starts estimating. What is the most likely explanation?
3 Your team pastes the same reporting template, style guide and two approved past SitReps into every new chat, every week. What is the best improvement, if your tool supports it and is approved for the material?
4 Your project holds 400 documents. You ask, "Summarize everything these documents say about the last three years of the response." The answer is fluent but seems thin. Why?
5 You paste two field documents and ask, "How many households are displaced in Dorra?" Neither document gives a figure for Dorra. Which answer shows the AI is well grounded?
6 Doc A (12 May) estimates 1,450 displaced households. Doc B (14 May) records 1,150 from registration. You ask the AI for "one number for the headline". What should a good grounded answer do?
7 You ask the AI, with no documents and no web search, "What are the current funding guidelines for our pooled fund?" It answers confidently. What is the main risk?
Exit Ticket¶
Before you leave
Think of one question you regularly need answered from your own documents. Which three documents would you give the AI (and which would you leave out), and what one "not found" rule would you add to the prompt?
Key terms¶
- Context: everything the model can see when it answers: instructions, conversation, pasted text, files and search results.
- Context window: the maximum amount of text, measured in tokens, the model can consider at once.
- Project / knowledge base: a saved space in an AI tool holding documents and standing instructions that are reused across chats.
- RAG (retrieval-augmented generation): looking up relevant passages in a document collection first, then answering from them.
- Chunk: a short piece of a document, cut out so it can be searched and retrieved.
- Retrieval: the search step in RAG that finds the chunks that best match a question.
- Grounding: making the AI answer from specific trusted sources rather than general memory.
- Citation: a reference showing which source document a statement came from.
- Knowledge cutoff: the date after which the model's training data contains no information.
- Lost in the middle: the tendency of models to use information in the middle of a long context less reliably than information at the start or end.