"Appoint judges and officers in all your gates"-Deuteronomy 16:18.
We are commanded to appoint judges who will implement the Torah's commandments, and compel those who stray from the true path to follow the mitzvot. They will command regarding the performance of the good, and warn against doing evil, and will implement punishments against those who transgress. This in order that the observance of the commandments and prohibitions of the Torah not be given to the discretion of each individual.
Included in this mitzvah is the establishment of a judicial hierarchy.
- A court of 23 judges is established in every city that meets a minimum population requirement. This court, called a sanhedrei ketanah (a "small court"), convenes at the gate of the city. A city that does not have sufficient population to warrant a 23-member court, should at the very least have a 3-member court, which presides over minor matters, and forwards larger matters to a court above them.
The local courts appoint inspectors to monitor the markets and ensure that people conduct business with honesty, so that not even slight injustices are perpetrated. - Every tribe has its own "supreme court."
- In Jerusalem sits the beit din hagadol (the "high court") consisting of 70 judges in addition to the chief presiding justice. This individual is also known as the Nasi. This court gathers in the location designated for them [in a chamber in the Holy Temple].
"Do not respect persons in judgment"-Deuteronomy 1:17.
It is forbidden for the Rabbinic Supreme Court or the Exilarch to appoint a judge who is not versed in Torah wisdom, though the individual possesses other qualities.
For example, one may not say, "I'll appoint this individual because he is handsome, powerful, related to me, lent me money, or proficient in many languages." Such an appointee is liable to pervert justice-not out of maliciousness, but out of ignorance.
Rather, with regards to all Torah appointments, we only consider the candidate's proficiency in Torah and knowledge of its commands and prohibitions, and that his personal behavior should be in concordance with this knowledge.
"To follow the majority"-Exodus 23:2.
We are commanded to follow the opinion of the majority in case of disagreement between the sages with regards to any Torah law. This mitzvah also applies to adjudication between litigants, if there is no consensus amongst the local judges regarding which party is in the right and which is in the wrong.