For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Citation Formatting

Allow models to generate reliable citations.

Reliable citations build trust and help readers verify the accuracy of responses. This guide provides practical guidance on how to prepare citable material and instruct the model to format citations effectively, using patterns that are familiar to OpenAI models.

Overview

A citation system has many parts: you decide what can be cited, represent that material clearly, instruct the model how to cite it, and validate the result before it renders to the user.

This guide covers five core elements experienced directly by the model:

  1. Citable units: Define what the model is allowed to cite.
  2. Material representation: Present the source material in a clear, structured format.
  3. Citation format: Specify the exact format the model should use for citations.
  4. Prompt instructions: Tell the model when to cite and how to do it correctly.
  5. Citation parsing: Extract the citations from the model’s response for downstream use.

Choose citable units