Skip to content
mentoor

Topic 1 of 4 · 3 min read

Attaching the right source material

Goal: Pick the sources a question needs, attach them, and write an instruction that limits the answer to those sources.

Grounding means giving the model the material the answer must come from, and telling it to use only that material. Without it, the model answers from what it learned in training, which may be old, general or wrong for your case.

Check yourself · 1 of 3

You want an answer about your own rental lease. What must you do for the model to answer from it?

Choose one answer

Why it matters

A chat assistant such as ChatGPT, Claude, Gemini or Copilot does not know your contract, your price list or last week's meeting notes. If you ask about them without attaching anything, it will not say "I have not seen that". It will write a likely answer. Attaching the source turns a guess into a reading task.

How to do it

  1. Decide what the question needs. Ask: where does the true answer live? A question about notice periods needs the signed contract, not a template from the web. A question about last quarter needs the quarter's report, not the annual one.
  2. Attach the smallest set that holds the answer. Add the pages or files that matter. Ten unrelated files give the model more places to go wrong. Models also tend to use facts in the middle of a very long input less well than facts at the start or end, so trimming helps.
  3. Use a readable copy. A clean PDF, a document or pasted text works best. A scan of a photo may be read badly. Check that the tool shows the file as attached before you ask.
  4. Name the sources in the prompt. Say which file to use and what role it plays: "Use only the attached file, Lease-2025.pdf."
  5. Limit the answer. Add a rule such as: "Answer only from the attached file. If the file does not say, reply 'Not stated in the file.' Do not use outside knowledge."

Tools differ. Some, like NotebookLM-style notebooks, answer from your sources by design. In a general chat, the instruction in step 5 is what holds the line, and it helps but does not guarantee it.

Before and after

Before: What is the notice period if I want to leave my flat?

The model will quote a typical rule for some country.

After: I attached my lease, Lease-2025.pdf. Using only that file, tell me the notice period for ending the lease early. If the lease does not say, reply "Not stated in the lease." Do not use general knowledge.

What goes wrong

  • The right file is not attached, so the model answers from memory and sounds sure.
  • An old version is attached next to the new one, and the answer mixes both.
  • The file fails to load or is only partly read, and nothing tells you.

Examples

Turning a guess into a reading task

Before: What did we agree about delivery dates?

After: I attached the meeting notes from 12 May, Notes-12-May.docx. Using only those notes, list what we agreed about delivery dates. If the notes do not mention delivery dates, say so.

The second prompt names the file, limits the sources and gives a way out.

Choosing the right file

You ask about the refund rule for a product bought in 2025. Three files exist: the 2023 terms, the 2025 terms and a marketing page. Attach only the 2025 terms. The old terms and the marketing page could each give a different answer.

Key points

  • Grounding means attaching the material the answer must come from and telling the model to use only that.
  • Without an attached source, the model answers from training and will not tell you it has not seen your document.
  • Attach the smallest set of files that holds the answer; more files give more places to go wrong.
  • Name the file in the prompt and give a fallback reply such as "Not stated in the file."
  • Check that the tool shows the file as attached and readable before you rely on the answer.

Common mistakes

  • Asking about a document without attaching it, so the model answers from general knowledge.
  • Attaching many files "just in case", which buries the one that matters.
  • Attaching an old and a new version together without saying which one counts.
  • Assuming the file was read without checking that it loaded.

Check yourself · 2 of 3

Which instruction best limits an answer to an attached file?

Choose one answer

Check yourself · 3 of 3

You ask about last quarter's sales. A folder holds the Q3 report, the full-year report from last year and a slide deck about Q1. Which should you attach?

Choose one answer

Practice items, not counted towards your mastery.

Start here