openai · OpenAI Platform Docs
Citation Formatting
A guide on designing and implementing a citation system for LLM responses, covering the selection of citable units, material representation, prompt engineering for citation instructions, and parsing strategies.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Citation Formatting
A guide on designing and implementing a citation system for LLM responses, covering the selection of citable units, material representation, prompt engineering for citation instructions, and parsing strategies.
When To Use
Use when you need to implement a system that allows an AI model to provide verifiable references to source documents or retrieved text chunks.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/citation-formatting-workflow-guide.md | A guide detailing how to prepare citable material and instruct models to format citations effectively. | Questions about a guide detailing how to prepare citable material and instruct models to format citations effectively. |
examples/citation-formatting-openai-citation-formatting-marker-syntax.text | A text example demonstrating the specific syntax for citation markers including start, delimiter, and stop tokens used in OpenAI documentation. | Exact payloads, commands, or snippets shown in A text example demonstrating the specific syntax for citation markers including start, delimiter, and stop tokens use... |
examples/citation-formatting-openai-citation-formatting-syntax-template.text | A text template demonstrating the specific syntax and delimiters required for OpenAI citation formatting. | Exact payloads, commands, or snippets shown in A text template demonstrating the specific syntax and delimiters required for OpenAI citation formatting. |
examples/citation-formatting-openai-citation-formatting-syntax.text | A text example demonstrating the specific syntax and delimiters used for citation formatting in OpenAI API responses. | Exact payloads, commands, or snippets shown in A text example demonstrating the specific syntax and delimiters used for citation formatting in OpenAI API responses. |
examples/citation-formatting-openai-citation-formatting-syntax-2.text | A text example demonstrating the specific syntax for citation start, delimiter, and stop markers used in OpenAI citations. | Exact payloads, commands, or snippets shown in A text example demonstrating the specific syntax for citation start, delimiter, and stop markers used in OpenAI citat... |
examples/citation-formatting-openai-citation-formatting-markdown.md | A markdown example demonstrating how to format citations and reference source IDs from tool outputs. | Exact payloads, commands, or snippets shown in A markdown example demonstrating how to format citations and reference source IDs from tool outputs. |
examples/citation-formatting-openai-citation-formatting-syntax-3.text | A text example demonstrating the specific syntax required for citing tool results using citation markers. | Exact payloads, commands, or snippets shown in A text example demonstrating the specific syntax required for citing tool results using citation markers. |
examples/citation-formatting-openai-citation-formatting.xml | An XML example demonstrating the structure and implementation of citation formatting guidelines for model responses. | Exact payloads, commands, or snippets shown in An XML example demonstrating the structure and implementation of citation formatting guidelines for model responses. |
examples/citation-formatting-openai-citation-formatting-marker-syntax-2.text | A text example demonstrating the specific syntax for citation markers including start, delimiter, and stop tags. | Exact payloads, commands, or snippets shown in A text example demonstrating the specific syntax for citation markers including start, delimiter, and stop tags. |
examples/citation-formatting-openai-citation-formatting-marker-syntax-3.text | A text example demonstrating the specific syntax for citation markers including start, delimiter, and stop tags. | Exact payloads, commands, or snippets shown in A text example demonstrating the specific syntax for citation markers including start, delimiter, and stop tags. |
examples/citation-formatting-openai-citation-formatting-markdown-2.md | A markdown example demonstrating how to format citations using source reference IDs like turn0file0. | Exact payloads, commands, or snippets shown in A markdown example demonstrating how to format citations using source reference IDs like turn0file0. |
examples/citation-formatting-openai-citation-formatting.text | A text example demonstrating the syntax for inline citations within a response. | Exact payloads, commands, or snippets shown in A text example demonstrating the syntax for inline citations within a response. |
examples/citation-formatting-openai-citation-formatting-2.xml | An XML representation of text content containing specific citation formatting markers for the OpenAI platform. | Exact payloads, commands, or snippets shown in An XML representation of text content containing specific citation formatting markers for the OpenAI platform. |
examples/citation-formatting-openai-citation-formatting-markdown-3.md | A markdown example demonstrating how to use citable unit IDs within a prompt to support citation formatting. | Exact payloads, commands, or snippets shown in A markdown example demonstrating how to use citable unit IDs within a prompt to support citation formatting. |
examples/citation-formatting-openai-citation-formatting-2.text | A text file demonstrating the syntax for embedding citations within a string using special unicode markers. | Exact payloads, commands, or snippets shown in A text file demonstrating the syntax for embedding citations within a string using special unicode markers. |
What This Skill Covers
- Reliable citations build trust and help readers verify the accuracy of responses. This guide provides practical guidance on how to prepare citable material a...
- Main sections:
Overview,Choose citable units,Represent citable material,Define citation format,Template.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/citation-formatting.md
