>_TheQuery
← Glossary

Citation

NLP

The practice of attributing specific claims in an LLM-generated answer to their source documents, enabling verification and building trust.

Citation in RAG systems refers to the practice of linking specific claims in a generated answer back to the source documents or knowledge graph facts that support them. This is typically implemented by including source identifiers in the context (e.g., [Source 1], [Source 2]) and instructing the LLM to reference these identifiers when making claims.

Citation serves multiple critical functions in production systems: it enables users to verify claims by checking original sources, it builds trust in the system's outputs, it provides a mechanism for detecting hallucination (uncited claims may be fabricated), and it creates an audit trail for compliance-sensitive applications in healthcare, finance, and legal domains.

Implementation involves building context with numbered source labels, prompting the LLM to use [Source X] notation, and optionally post-processing the response to extract and validate citations. In hybrid RAG+KG systems, citations can reference both document sources ([Doc 2]) and graph facts ([Graph: entity relationship]), providing richer provenance tracking than document-only citations.

Last updated: February 22, 2026