Citations
Render sources clearly. Show the citation label, Arabic text, translation, and grade when available.
What This Does
Citations show the sources behind an answer. Each citation is a complete source block, not a bare footnote.
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: quran, hadith, tafsir, or dua. |
| 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.
- Parsing answer text by character offsets instead of using the citation 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.