We use cookies to improve your experience and measure traffic. Cookie policy

    Scalor
    CONVINCE US →
    Glossary/Avaliação

    Evals

    avaliação de modelosevaluation harness

    Systematic processes and measurement tools to verify if an AI model's output is accurate, safe, and useful for a specific business case.

    What it is

    In the context of applied AI, Evals (short for evaluations) are the equivalent of quality control in traditional industry. It's not just about testing if the model responds, but precisely measuring how well it responds according to objective criteria. While in traditional software we have unit tests (where 2+2 must always be 4), in AI the output is probabilistic. Evals serve to transform this uncertainty into actionable metrics.

    For an SME, Evals represent the difference between launching a chatbot "by gut feeling" and launching a reliable system that won't invent discounts or insult customers. It is the process of creating a set of reference questions and answers (the Gold Dataset) to validate whether each change in the system improves or worsens the final performance.

    How it works

    The Evals process rests on three pillars: the test dataset, the success metric, and the evaluator.

    First, a set of representative real-world examples is defined. If you are automating customer support, this set includes the 50 most frequent questions and the expected correct answers.

    Then, metrics are chosen. These can be deterministic (e.g., does the answer contain the correct link to the pricing PDF?) or semantic (e.g., is the tone of the response professional?).

    Finally, the evaluation is executed. Currently, the concept of "LLM-as-a-judge" is widely used, where a more powerful model (like GPT-4o) evaluates the response of a simpler or more specific model, checking for hallucinations or if the information is present in the provided context. The final result is a report that says, for example: "This version of your system is 12% more accurate at answering about invoices than the previous version."

    When to use

    Evals should be introduced right after the proof of concept (PoC) phase. Whenever you decide that AI will touch customer data or make business decisions, Evals become mandatory.

    They are crucial in four moments:

    1. Model Selection: Comparing whether the OpenAI model, Anthropic model, or an open-source model better serves your specific case at the lowest cost.
    2. Prompt Optimization: When you change an instruction in the system, you need to ensure that this change didn't break responses that were already working well (regression).
    3. Infrastructure Change: If you move from one vector database to another or change the way documents are sliced (chunking).
    4. Production Monitoring: To check if the system's performance is degrading over time with new types of user questions.

    Common errors

    The most frequent error in SMEs is relying on the "Vibe Check". This happens when the project owner asks the AI three questions, likes the answers, and assumes the system is ready. Ten minutes later, a customer asks a slightly different question and the system fails catastrophically because there was no systematic evaluation.

    Another error is focusing on academic metrics (like MMLU or BLEU) that do not reflect business value. For a company that sells management software, it doesn't matter if the model knows art history; it matters if it knows how to interpret a SAF-T file.

    Finally, ignoring edge cases. A good Evals system should purposely include poorly formulated, aggressive, or out-of-scope questions to test the robustness of safety filters and the model's ability to decline requests.

    Practical example for an SME

    Imagine a Portuguese real estate agency that created an assistant to qualify leads via WhatsApp. The assistant must extract the customer's budget, preferred area, and property type, entering this data into the CRM.

    Without Evals, the agency risks the AI confusing "I want to live near Sintra" with "I want to live in Sintra," sending wrong leads to agents.

    To implement Evals, the agency creates an Excel sheet with 30 past real interactions. For each one, they define what the perfect extraction would be. Every time the technical team updates the AI engine, they run these 30 examples automatically. If the system drops from 28/30 hits to 25/30, the update is rejected, even if the AI seems "smarter" in general conversation. This ensures that the commercial operation is never harmed by technical instability.

    Frequently Asked Questions

    Q: Do I need to know how to code to do Evals? A: Not necessarily. While there are tools for developers, many modern platforms allow you to create and run test sets using visual interfaces or simple spreadsheets, where you compare the AI's response with the ideal response.

    Q: How much does it cost to implement an evaluation system? A: The main cost is the initial time to define the "Gold Dataset" (the standard questions and answers). The technical cost of running the tests themselves is marginal, usually representing less than 5% of the total AI operation cost.

    Q: Can I use AI itself to evaluate AI? A: Yes, it is the current standard practice. It is much faster and cheaper to use a robust model to evaluate hundreds of responses than to have a human read them all. However, you should always perform a human audit on a small sample of the AI evaluations to ensure alignment.

    Q: How many examples do I need for a reliable Eval? A: For an SME, starting with 20 to 50 critical examples already offers drastically superior security compared to having no testing at all. As the system grows, you can expand to hundreds of cases.

    Practical examples

    • 01Testing if the chatbot responds correctly about return policies in 50 different scenarios.
    • 02Comparing the accuracy of data extraction from invoices between GPT-4 and Claude 3.5 Sonnet.
    • 03Ensuring that a change in the prompt didn't cause the AI to start ignoring safety instructions.
    • 04Measuring the hallucination rate in a RAG system after updating the technical document base.

    Want to use Evals in your company?

    30 minutes, free, no commitment. We map where it fits.

    Free AI diagnosis