# <source> tag — Claude XML prompting reference

> How to use the <source> XML tag in Claude prompts: when to use it, when not to, minimal and full examples, common mistakes.
>
> Source: https://claudexml.com/tags/source/ · Last updated 2026-05-25

Home / Tags / <source>

# <source> — when and how to use it in Claude prompts

    Nested inside . Lets Claude cite back to the source name or URL you supplied.

    Provenance metadata nested inside a `<document>`. Lets Claude cite back accurately.


## When to use `<source>`


- Any time you want the model to name its sources in the answer.


## When not to use it


- When the documents are anonymous or citation isn't required.


## Minimal example


```xml
<document>
  <source>RFC 2616, Section 14.9</source>
  <document_content>The Cache-Control general-header field is used to specify...</document_content>
</document>
```


## Full example

    See the RAG example on the `<document>` page.


## Common mistakes


- Putting the source after the content. Place `<source>` first inside the document — it primes attribution.


Cite this page

`<source> — When and How to Use in Claude Prompts. claudexml.com. https://claudexml.com/tags/source/`
