A primary source is the authoritative original: the actual code in the repo, the real type definitions, the official documentation, the live API response. It is reality, not someone's account of reality. When you want an agent to be right, you point it at a primary source and let it read.
Why it matters so much for agents
A model defaults to answering from memory, which is frozen at its training cutoff and often subtly out of date. A primary source overrides that. When the agent reads the real file, its answer becomes contextual knowledge: grounded in what is actually there, right now. This is the single biggest defence against confidently wrong output.
The move in practice is simple:
- Let the agent open the real file instead of recalling the library's shape.
- Point it at the official docs, not a half-remembered blog.
- Have it run the code and read the actual error, not imagine one.
You often do this with a context pointer: hand over the path or URL and let the agent fetch the source itself. Contrast this with a secondary source, which is second-hand and needs checking.
Related terms
Secondary source
A secondary source is second-hand information: blog posts, summaries, or the model's own memory. It is useful for orientation but must be checked against the primary source before you rely on it.
Read definition →Contextual knowledge
Contextual knowledge is what a model knows because it is in the context right now: the files, docs, and output you gave it. It is current and grounded, and it is the main lever against hallucination.
Read definition →Context pointer
A context pointer is a reference (a path, URL, or id) you give an agent instead of the full content, so it can fetch the material only if and when it needs it. It is a cheap way to make a lot of context available.
Read definition →