AI & LLM
RAG Answer with Citations JSON Example
A JSON example of a RAG (retrieval-augmented generation) answer with citations — the generated answer plus the source chunks and spans it references. Copy-ready for grounded AI answers.
Field Reference
answerrequiredstringThe generated answer, grounded in the cited sourcescitationsrequiredarray<object>The retrieved chunks the answer is based on — shown to users for trustcitations[].quoteoptionalstringThe exact supporting span from the source, for verifiable groundingcitations[].sourcerequiredstringWhere the citation came from — links back to the documentconfidenceoptionalnumberModel/system confidence in the grounded answer (0–1)Variants
Inline citation markersAnswers can embed reference markers that map to the citations array.
No-answer (grounded refusal)When retrieval finds nothing relevant, a good RAG system abstains instead of hallucinating.
Common Use Cases
- →Returning grounded answers with verifiable sources in a RAG app
- →Rendering footnote-style citations in a chatbot UI
- →Detecting low-confidence answers to trigger a fallback or human handoff
ragcitationsgroundingsourcesllmretrieval
Validate or format this JSON
One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.
Frequently Asked Questions
Related JSON Examples
AI & LLMRAG Document ChunkA RAG chunk with text, source metadata, embedding reference, and relevance score.AI & LLMLangChain / LlamaIndex DocumentA LangChain/LlamaIndex Document with page_content and metadata for RAG pipelines.AI & LLMVector Database Search QueryVector DB query with topK and filter, plus a ranked matches response.