Citations
Render sources clearly. Show the citation label, Arabic text, translation, and grade when available.
What This Does
Citations explain why an answer is grounded. They are source blocks, not loose footnotes.
Minimal Response
{
"answer": "Ayat al-Kursi teaches Allah's complete life, authority, and knowledge.",
"citations": [
{
"source_id": "quran_2_255",
"type": "quran",
"citation_label": "Qur'an 2:255",
"title": "Ayat al-Kursi",
"arabic": "اللَّهُ لَا إِلَٰهَ إِلَّا هُوَ الْحَيُّ الْقَيُّومُ…",
"translation": "Allah - there is no deity except Him, the Ever-Living, the Sustainer of existence…",
"grade": null,
"metadata": {
"surah": 2,
"ayah": 255
}
}
]
}
Fields Explained
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| source_id | string | Yes | — | Stable source identifier used by Madeenan. |
| type | string | Yes | — | Source corpus, usually quran or hadith. |
| citation_label | string | Yes | — | Human-readable label for badges and footnotes. |
| arabic | string | No | — | Arabic source text when available. |
| translation | string | No | — | English meaning or translation. |
| grade | string | No | — | Hadith authenticity grade when available. |
Real Examples
{
"source_id": "hadith_bukhari_1",
"type": "hadith",
"citation_label": "Sahih al-Bukhari 1",
"title": "Actions are by intentions",
"arabic": "إِنَّمَا الأَعْمَالُ بِالنِّيَّاتِ…",
"translation": "Actions are but by intentions…",
"grade": "Sahih",
"metadata": {
"collection": "bukhari",
"hadith_number": "1"
}
}
Common Mistakes
- Displaying an answer without a visible source path.
- Treating a citation label as proof without showing the source content.
- Using character offsets from older examples. Current citations use SourceBlock fields.
- Hiding Hadith grades when they are available.
Source note
A good citation UI answers three questions: what source, what text, and why it supports the answer.