Azure Revolutionizes AI Assessment with LLM-as-Judge

Le brief IA que les pros lisent chaque soir
Les 7 actus IA du jour, décryptées en 5 min. Gratuit.
Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.
Choisis ton rythme
Gratuit · Pas de spam · Désabonnement en 1 clic
Introduction: The Rise of Automated Judges in AI Evaluation
In today's digital world, artificial intelligence systems produce billions of results daily. Whether it's chatbot responses, code suggestions, translations, or creative content, the crucial question is how to assess the quality of these results. Traditionally, this task was assigned to human experts responsible for judging the quality, accuracy, and usefulness of the outputs. However, this method reaches its limits when the volume to be evaluated reaches tens of thousands of results per hour, or even millions per minute.
The concept of LLM-as-Judge marks a significant turning point. Instead of relying on human evaluators, this approach uses another large language model (LLM) to perform these evaluations. Imagine hiring an evaluator who never gets tired, capable of processing up to 16,000 responses per second with remarkable consistency.
Definition of LLM-as-Judge
The term LLM-as-Judge refers to the use of a Large Language Model to evaluate, score, or compare results according to predefined criteria. The basic formula is as follows:
Evaluation = LLM(Input + Context)
In this equation:
- Input represents the item to be evaluated, such as a chatbot response or a code snippet.
- Context includes the evaluation criteria, examples, and specific instructions.
- Evaluation denotes the final judgment, which can be a score, a choice, or a detailed critique.
Practical Illustration
Let's take the example of a customer support chatbot. When a user asks, "How do I reset my password?", the chatbot responds: "Click on 'Forgot Password' on the login page, enter your email, and follow the link sent to your inbox."
An LLM judge would evaluate this response based on several criteria:
-
Prompt to the judge: "Rate the following customer support response on a scale of 1 to 5 for its usefulness, accuracy, and clarity. User's question: How do I reset my password? Response: Click on 'Forgot Password' on the login page, enter your email... Provide your score and a brief explanation."
-
Judge's output:
- Usefulness: 5/5 — The response is direct and provides concrete steps.
- Accuracy: 4/5 — While correct, it omits the 2FA verification step.
- Clarity: 5/5 — The instructions are straightforward and easy to follow.
- Overall: 4.7/5
This method can be replicated on a massive scale, evaluating millions of responses per minute.
The Four LLM Evaluation Methods
-
Scoring (point-based) The judge assigns a numerical score on a defined scale, ideal for continuous quality monitoring and regression testing.
-
Binary (Yes/No) A simple pass/fail decision, suitable for high-volume filtering and automated pipelines.
-
Pairwise Comparison The judge selects the better result between two options, useful for A/B testing and candidate selection.
-
Multiple Choice Classification Selection from predefined categories, such as "Completely Correct" or "Off Topic," for content categorization.
Limitations of Human Evaluation
Although LLM judges do not perfectly replace humans, they offer a viable solution for over 90% of large-scale evaluation tasks. They are not only faster but also significantly less expensive. The optimal strategy combines human expertise for calibration with the efficiency of LLMs for large-scale evaluation.
Reliability and Challenges of LLM Judges
The reliability of LLM judges is crucial. An unreliable judge can mislead by providing false assurance.
Bias and Strategies for Reliability
- Detailed Grids: Precisely define what each score means with concrete examples.
- Chain of Thought: Ask the judge to explain their reasoning before giving a score.
- Multiple Judge Ensemble: Use 3 different models and take the majority vote.
- Calibration Sets: Test the judge against more than 200 human-labeled examples, with an agreement rate above 85%.
- Temperature = 0: To ensure consistency.
Implementation on Azure
To handle 1 million requests per minute, a robust architecture is necessary. Synchronous APIs are insufficient; solutions like partitioning and failover routing are essential.
Azure Stack Architecture
- Portal / Ingestion: Azure API Management (APIM)
- Buffer / Buffering: Azure Event Hubs
- Compute / Workers: Azure Kubernetes Service (AKS)
- The LLM Brain: Azure OpenAI Service
- State & Audit: Azure Cache for Redis & Azure Cosmos DB
Layer 1: Ingestion & Routing
With 16,700 requests per second, Azure API Management (APIM) ensures authentication and request validation. Payloads are deposited into Azure Event Hubs, ensuring that traffic spikes do not overwhelm the workers.
Layer 2: Processing
Evaluations are processed by Azure Kubernetes Service (AKS), which uses KEDA to dynamically adjust resources based on load. A tiered routing system is implemented to save costs:
- Level 1: Binary (yes/no) → GPT-4o-mini ($0.001/eval)
- Level 2: Scoring (1–10) → GPT-4o ($0.01/eval)
- Level 3: Complex (Ensemble) → Multiple models ($0.05/eval)
Layer 3: The LLM Brain
To manage scale, Provisioned Throughput Units (PTUs) are used, ensuring dedicated computing capacity. The use of APIM background load-balanced pools guarantees system resilience.
Layer 4: Caching
Approximately 15 to 30% of requests are duplicates, necessitating efficient management via Azure Cache for Redis.
Brief IA — L'actualité IA en français
L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.