The Sages taught in a baraita: The children of Noah [i.e., all of humanity] were commanded to observe seven mitzvot: (1) the requirement to establish courts of law; (2) the prohibition of cursing God's name; (3) the prohibition of idol worship; (4) the prohibition of forbidden sexual relations; (5) the prohibition of bloodshed; (6) the prohibition of robbery; (7) the prohibition of eating a limb from a living animal.
(13) Next day, Moses sat to judge the people, while the people stood around Moses from morning until evening. (14) But when Moses’ father-in-law saw how much he had to do for the people, he said, “What is this thing that you are doing to the people? Why do you act alone, while all the people stand about you from morning until evening?” (15) Moses replied to his father-in-law, “It is because the people come to me to inquire of God. (16) When they have a case it comes before me, and I decide between one person and another, and I make known the laws and teachings of God.” (17) But Moses’ father-in-law said to him, “The thing you are doing is not right; (18) you will surely wear yourself out, and these people as well. For the task is too heavy for you; you cannot do it alone. (19) Now listen to me. I will give you counsel, and God be with you! You represent the people before God: you bring the cases before God, (20) and enjoin upon them the laws and the teachings, and make known to them the way they are to go and the practices they are to follow. (21) But you must also seek out from among all the people capable men who fear God, men of truth, who hate wrongful gain. Set these over them as chiefs of thousands, hundreds, fifties, and tens, (22) and let them judge the people at all times. Have them bring every major case to you, but let them decide every minor case themselves....(24) Moses heeded his father-in-law and did just as he had said. (25) Moses chose capable men out of all Israel, and appointed them heads over the people—chiefs of thousands, hundreds, fifties, and tens; (26) and they judged the people at all times: the difficult case they would bring to Moses, and all the minor case they would decide themselves.
"Moses chose capable men": After he had looked in vain to find men with all the qualities Jethro had suggested, he chose men with expertise and diligence in finding out the truth and bringing the matter to a conclusion. Men of this type were more important [for this communal role] than God-fearing men who were incompetent. About this our Sages have said: “If a scholar is like a snake, keep him very close [literally: tie him around your waist]; but if an ignoramus is very pious, do not live anywhere near him."
דִּינֵי מָמוֹנוֹת, בִּשְׁלֹשָׁה. גְּזֵלוֹת וַחֲבָלוֹת, בִּשְׁלֹשָׁה. נֶזֶק וַחֲצִי נֶזֶק, תַּשְׁלוּמֵי כֶפֶל וְתַשְׁלוּמֵי אַרְבָּעָה וַחֲמִשָּׁה, בִּשְׁלֹשָׁה. הָאוֹנֵס וְהַמְפַתֶּה וְהַמּוֹצִיא שֵׁם רַע, בִּשְׁלֹשָׁה, דִּבְרֵי רַבִּי מֵאִיר. וַחֲכָמִים אוֹמְרִים, מוֹצִיא שֵׁם רַע, בְּעֶשְׂרִים וּשְׁלֹשָׁה, מִפְּנֵי שֶׁיֶּשׁ בּוֹ דִינֵי נְפָשׁוֹת:
Monetary cases [are judged] by three [judges]. [Cases of] theft and personal injury [are judged] by three [judges]. [Suits for] damages or half-damages, [crimes for which one would] pay double, or pay quadruple or quintuple, [are judged] by three. [Cases of] rape, seduction, and slander by three. These are the words of Rabbi Meir, but the Sages say, [a case of] slander by twenty-three, because it has the potential to be a capital case.
[Cases regarding transgressions punishable by] lashing, by three. In the name of Rabbi Yishmael it was said, by twenty-three. Intercalating the month by three; intercalating the year, by three, these are the words of Rabbi Meir. Rabbi Shimon ben Gamliel says, They begin with three, deliberate with five, and finish with seven. But if they finish with three, [the year] has still been intercalated.
The laying of hands by the elders, and the breaking of the neck of the calf [are performed] by three, these are the words of Rabbi Shimon. But Rabbi Yehudah says, by five. Chalitzah (release from a levirate marriage) and mi'un (rejection of youth betrothal), by three. Fourth year produce or the second tithe with unknown value, by three. [Redemption of] dedications [to the Temple], by three. Valuations of chattel, by three. Rabbi Yehudah says: one [of the judges] must be a priest. [Redemption of] real estate, by nine and a priest. Similarly with [redemption of the value of] a man.
Capital cases, by twenty-three. Bestiality, both the active and passive parties, by twenty-three, as it says (Leviticus 20:16) "and you shall kill the woman and the beast," and it says, (Leviticus 20:15) "and you shall kill the beast." An ox which killed a person is [judged to be] stoned by twenty-three, as it is written (Exodus 21:29) "the ox shall be stoned and its owner shall also be put to death," meaning, as the death of the owner is conducted [by a trial], so is the death of the ox. The wolf and the lion, the bear and the tiger, the leopard and the snake, are put to death by twenty-three. Rabbi Eli'ezer says: Whoever is the first to kill [the animal] has performed a meritorious deed. Rabbi Akiva says: they are put to death by twenty-three.
They may not judge a whole tribe [for the sin of idolatry], or a false prophet, or a high priest, except by a court of seventy-one. They may not [declare] a non-obligatory war, except by a court of seventy-one. They may not add [territory] to the city [of Jerusalem] or to the Temple courtyards, except by a court of seventy-one. They may not make a [minor] Sanhedrin for [individual] tribes, except by a court of seventy-one. They may not proclaim a wayward city [a city whose inhabitants are mostly idolatrous Jews], except by a court of seventy-one. They may not make a wayward city on the border, nor three wayward cities [in total], only one or two.
From there [the High Court in Jerusalem] they write and send forth [the following message] to all places [in Israel]: Anyone who is wise and modest and well-liked among the people may be a judge in his own town. From that appointment, he may be promoted to serve on the court at the entrance to the Temple Mount. From that appointment, he may be promoted to serve on the court at the Temple Courtyard. From that appointment, he may be promoted to serve on the court in the Chamber of Hewn Stone.
Rabbi Yochanan says: They do not appoint anyone to the [Great] Sanhedrin except those who possess height, wisdom, nice-appearance, advanced age, knowledge of sorcery, and who know the seventy languages [spoken throughout the world] so that the Sanhedrin will not need to hear testimony from a translator.
"Knowledge of sorcery": To put to death sorcerers who rely on their magic to escape judgment, and to expose the sorcerers who seduce and lead people astray [into idolatry] with their magic, like [censured version:] the Egyptians. [Likely original version: "Jesus the Nazarene."]
Rabbi Yehudah said in the name of Rav: They do not appoint someone to the [Great] Sanhedrin unless he knows how to prove that [what the Torah explicitly declares to be] a defiling creature is [actually] pure. Rav said: I myself can show how it is pure.
The meaning of this is that we do not appoint someone to the Sanhedrin unless he is able to discover some point of defense for a person who is guilty [of a crime]. And this is alluded to by referring to one who knows how to find a way to purify what is definitely impure, like certain reptiles.