Link to the tool: HadithGraph
For those wondering about the point of the probability calculation that this tool does I have added a last section explaining this.
I have been quietly working on a tool that automatically diagrams and “verifies” hadiths (based on my hadith verification method), and recently I finished it, and the results far exceeded my expectations, alhamdulillah. The tool is simply a calculator and diagrammer, so that instead of having to do the probability calculations and diagramming manually, they all take place automatically.
Users can use the tool merely for diagramming hadith chains, even if they have no interest in the probability calculations.
See the essay linked above for how the probability calculation works.
Rewriting and inputting the chains
Given the Bukhari hadith (Bukhari #1):
حَدَّثَنَا الحُمَيْدِيُّ عَبْدُ اللَّهِ بْنُ الزُّبَيْرِ ، قَالَ : حَدَّثَنَا سُفْيَانُ ، قَالَ : حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ الأَنْصَارِيُّ ، قَالَ : أَخْبَرَنِي مُحَمَّدُ بْنُ إِبْرَاهِيمَ التَّيْمِيُّ ، أَنَّهُ سَمِعَ عَلْقَمَةَ بْنَ وَقَّاصٍ اللَّيْثِيَّ ، يَقُولُ : سَمِعْتُ عُمَرَ بْنَ الخَطَّابِ رَضِيَ اللَّهُ عَنْهُ عَلَى المِنْبَرِ قَالَ : سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ : إِنَّمَا الأَعْمَالُ بِالنِّيَّاتِ ، وَإِنَّمَا لِكُلِّ امْرِئٍ مَا نَوَى ، فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى دُنْيَا يُصِيبُهَا ، أَوْ إِلَى امْرَأَةٍ يَنْكِحُهَا ، فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ *
Enter the hadith’s isnad in the textbox as follows:
Umar b. al-Khattab > Alqama b. al-Waqqas > Muhammad b. Ibrahim > Yahya b. Saeed > Sufyan > al-Humaydi
The chain starts from the chief transmitter (the Companion, in this case Umar. b. al-Khattab [RA]), and the transmitter names are separated by ” > “. Note that there are spaces before and after the “>”.
The spelling of the names does not matter as long as it is consistent. You must always use the same exact spelling for each unique transmitter, so Umar b. al-Khattab must always be spelled “Umar b. al-Khattab” in any additional chains you add.
But there is no need to worry too much about getting spellings wrong, because the diagram will immediately make it obvious by making the transmitter show up twice (below we have erroneously spelled Umar b. al-Khattab’s name differently on different chains):
Then gather additional chains for this hadith using hadith search engines and/or takhrīj tools, for example Bukhari #6587 gives us another chain for the hadith:
6587 حَدَّثَنَا أَبُو النُّعْمَانِ ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ ، عَنْ يَحْيَى بْنِ سَعِيدٍ ، عَنْ مُحَمَّدِ بْنِ إِبْرَاهِيمَ ، عَنْ عَلْقَمَةَ بْنِ وَقَّاصٍ ، قَالَ : سَمِعْتُ عُمَرَ بْنَ الخَطَّابِ رَضِيَ اللَّهُ عَنْهُ ، يَخْطُبُ قَالَ : سَمِعْتُ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ : يَا أَيُّهَا النَّاسُ ، إِنَّمَا الأَعْمَالُ بِالنِّيَّةِ ، وَإِنَّمَا لِامْرِئٍ مَا نَوَى ، فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ ، فَهِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ ، وَمَنْ هَاجَرَ إِلَى دُنْيَا يُصِيبُهَا أَوِ امْرَأَةٍ يَتَزَوَّجُهَا ، فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ *
Now enter the new chain from this second hadith into a new line in the textbox, so that we have the following two lines:
Umar b. al-Khattab > Alqama b. al-Waqqas > Muhammad b. Ibrahim > Yahya b. Saeed > Sufyan > al-Humaydi
Umar b. al-Khattab > Alqama b. al-Waqqas > Muhammad b. Ibrahim > Yahya b. Saeed > Hammad b. Zayd > Abu al-Nu`man
Now we get the following diagram:
And below we have added a chain from a third hadith (Bukhari 3719):
Umar b. al-Khattab > Alqama b. al-Waqqas > Muhammad b. Ibrahim > Yahya b. Saeed > Sufyan > al-Humaydi
Umar b. al-Khattab > Alqama b. al-Waqqas > Muhammad b. Ibrahim > Yahya b. Saeed > Hammad b. Zayd > Abu al-Nu`man
Umar b. al-Khattab > Alqama b. al-Waqqas > Muhammad b. Ibrahim > Yahya b. Saeed > Hammad b. Zayd > Musaddad
Adding hadith collection information
If you wish the details of the hadith collection to show up on the diagram, you may add it as follows:
A > [Bukhari]
B > [Muslim]
That is, the hadith collection information must be enclosed in square brackets. Adding the hadith collection information to the diagram has no effect on the probability calculations.
Important: Using square brackets here is essential, otherwise the hadith collection will be treated like any other transmitter, causing inaccurate calculations.
Adding comments
Comments can be added for your own convenience; they have no effect on the diagram or probability calculation. Comments start with a “#” character. You can add comments before each chain as follows:
# Bukhari 1
Umar b. al-Khattab > Alqama b. al-Waqqas > Muhammad b. Ibrahim > Yahya b. Saeed > Sufyan > al-Humaydi
# Bukhari 6587
Umar b. al-Khattab > Alqama b. al-Waqqas > Muhammad b. Ibrahim > Yahya b. Saeed > Hammad b. Zayd > Abu al-Nu`man
# Bukhari 3719
Umar b. al-Khattab > Alqama b. al-Waqqas > Muhammad b. Ibrahim > Yahya b. Saeed > Hammad b. Zayd > Musaddad
Setting custom probabilities
Each transmitter has a default probability 0.6 (i.e. 60%). Sometimes you are dealing with transmitters who are lower quality, although not totally unreliable. In those cases you can set a custom probability in brackets after the transmitter’s name, as follows:
Transmitter 1 > Transmitter 2 (0.4) > Transmitter 3
Above, Transmitter 2 gets a probability of 0.4 (40%) in the calculations.
Setting probabilities above 0.6 will be ignored.
We are verifying meanings
This tool gives the probable authenticity of the text (matn) of the hadith. But some variant hadiths sometimes contain additional sentences or lack them. Make sure all of the chains are the chains of hadith texts that mention the meaning you are trying to verify, such as “all actions are judged (by God) by the intentions behind them”.
What is the point of the calculation?
The point is simple: you may want to compare one authentic hadith’s reliability with another authentic hadith’s reliability (perhaps they seem to contradict each other). And they both have 5-10 complex chains of transmitters each of which involves a hundred transmitters. How do you know which one is the stronger?
Edit: I moved this lengthy section to the top of this essay in which I fully describe the verification method.
Ma Sha Allah brother!!! May this be recognized as a useful tool for the Ummah one day. Barak Allah fika.
Truly great work and I sincerely hope that one day it will be used by the muslims and ulama in order to clean out weak hadith
Ma Sha Allah TabarakAllah brother! Great to see you active again.
Should you add multiple narrations? Also how reliable is this ?
I’m a little confused by the point of this tool. The hadiths in the main books have already been classified into their reliability centuries ago. Any odd mistake here and there has also been corrected by other hadith specialists centuries ago. Why should a layman be bothering himself with a smart calculator to tell him what he doesn’t need to know? Not a criticism – a genuine question. Thanks.
I have added a section to the bottom of this article in which I mention the benefit of this method over the traditional method.