Differences in attainments among Arahants In the Anguttara Nikaya it is said that by possessing seven qualities one can attain direct knowledge of the Four Analytical Knowledges:


Mastery.

&quot;Bhikkhus, possessing seven qualities, Sāriputta exercises mastery over his mind and is not a servant of his mind. What seven? Here, (1) Sāriputta is skilled in concentration, (2) skilled in the attainment of concentration, (3) skilled in the duration of concentration, (4) skilled in emergence from concentration, (5) skilled in fitness for concentration, (6) skilled in the area of concentration, and (7) skilled in resolution regarding concentra- tion. Possessing these seven qualities, Sāriputta exercises mas- tery over his mind and is not a servant of his mind&quot;.
&quot;Bhikkhus, when he possessed seven qualities, Sāriputta realized for himself with direct knowledge the four analytical knowledges&quot;.
-- The Numerical Discourses of the Buddha - A Translation of the Anguttara Nikaya by Ven. Bhikkhu Bodhi: The Book of the Sevens, Sutta 39, p. 1023

What are the Four Analytical Knowledges?
In the Pali Canon Study &quot;Nibbana as Living Experience / The Buddha and The Arahant&quot; by Lily de Silva a well described section on the Four Analytical Knowledges can be found. Here is a quote from the study:

Among arahants too there are differences in attainment. In one place the Buddha states that in a group of 500 monks sixty are arahants with the six higher knowledges (cha.labhi~n~naa), sixty are arahants with the three clear knowledges (tevijjaa), another sixty are arahants liberated from both parts (ubhatobhaagavimutta), while the rest are arahants liberated by wisdom (pa~n~naavimutta).
The highest qualifications among arahants are the six higher knowledges (cha.labhi~n~naa) and the four analytical knowledges (catupa.tisambhidaa) . The former comprise psychic powers, the divine ear, thought reading, retrocognition (the ability to recall one's former births), clairvoyance (the ability to see beings dying and being reborn according to their kamma), and the knowledge of the destruction of defilements. The four analytical knowledges comprise insight into the meaning of words (attha), truth (dhamma), use of language (nirutti), and originality of ideas (pa.tibhaana) . They seem to pivot round the ability to teach the Dhamma through the medium of verbal communication with appealing and meaningful ways of presentation.
Some arahants are endowed with the special accomplishment of the fourfold analytical knowledge (pa.tisambhidaa-~naa.na), which qualifies them even more thoroughly for creative work. These are spelt out as analytical knowledge of the meaning or goal, profound truth, language or the medium of communication, and originality of expression (attha, dhamma, nirutti, pa.tibhaana). These four special qualifications make arahants experts in communicating to their audience the exact meanings and goals of the profound truths they have discovered, through the medium of refined language, using their own original modes of expression such as eloquent similes, metaphors, etc. Several arahants, both male and female, are recorded as eloquent speakers and erudite exponents of the Dhamma. Special mention must be made of the Theragaathaa and Theriigaathaa, which comprise poems of exquisite beauty. They are utterances of monks and nuns embodying their varied experiences. Literary critics rank them among the best lyrics in Indian literature. They remain unrivalled in the literary history of the world as creative writing issuing forth from the undefiled purity of the human heart and the nobility of human wisdom. They are ever-fresh fountains of inspiration to the truth-seeker and lasting monuments to the creative genius of the liberated beings.

For more information on this topic there is a comprehensive and detailed exposition called &quot;The Fourfold Analytical Knowledge in Pali Literature&quot; by Ven. Bhikkhu Kusalaguṇa. Here is a quote from the abstract:

The fourfold analytical knowledge (catu-paṭisambhidā) is an integrated set of knowledge gained by the noble persons (ariya) who had developed necessary conditions eligible for this distinctive attainment. The fourfold analytical knowledge consists of:
(1) The analytical knowledge of result (attha-paṭisambhidā),
(2) The analytical knowledge of cause (dhamma-paṭisambhidā),
(3) The analytical knowledge of language (nirutti-paṭisambhidā), and
(4) The analytical knowledge of knowledge (paṭibhāna-paṭisambhidā).
The noble persons who possess these kinds of knowledge are able to penetratingly understand the four types of ultimate realities (paramattha-dhammā), namely, consciousness (citta), mental concomitants (cetasika), matters (rūpa) and Nibbāna, the unconditioned element, and are capable of elucidating them with lucid language and exposition. The Buddha, Venerable Sāriputta and other great noble disciples were real legends in this field of comprehension and explanatory dexterity, as evidently described in the Pāḷi literature.
Each of the fourfold analytical knowledge possesses different analyticities. The analytical knowledge of result has the power to understand fully the so-called resultant phenomena including all cause-produced things, meanings of the Buddha’s Word classified into nine categories such as sutta (discourses in prose), geyya (discourses in prose and verse) and so on, and the unconditioned element, Nibbāna. Similarly, the analytical knowledge of cause has the ability to know various causative phenomena that comprise all result-generating causes, the Buddha’s Word, and the Noble Path leading to the realization of Nibbāna. The analytical knowledge of language, on the other hand, is endowed with the capability of recognizing the grammatically correct usage and the grammatically incorrect usage of Pāḷi language, and is able to understand a wide range of Pāḷi terminologies connected with the ultimate realities. The analytical knowledge of knowledge is, however, capable of taking the foregoing knowledge as objects, and of comprehending their functional activities.
The attainment of the fourfold analytical knowledge is nothing but the accomplishment of collectively conditioning factors accumulated in both the past and present lives. The eight conditions must be fulfilled in order to give rise to the fourfold analytical knowledge, they are: attainment of the highest mundane insight knowledge (knowledge of equanimity towards formations) in the past lives, great erudition, proficiency of dialects, knowledge of Scriptures, inquiry, attainment of the Noble Path, association with teachers, and acquisition of good friends.