In short.
Mistral’s Set goals guide is a Python reference for developers defining acceptance thresholds for AI evaluations, with the catch that individual outputs and overall statistics can pass or fail independently. It documents threshold methods, statistic-level goals, terminal verdicts and the distinction between pass/fail gates and optimization settings. Installation requirements, pricing and runtime behavior remain unverified; no code was executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected page at [https://docs.mistral.ai/studio/observability/evaluations/goals.md]: goal types, basic usage, generation and statistic goals, run evaluators, direction and normalization, the full example, FAQ and aggregate_goal deprecation notice. All linked pages are excluded. Installation details, pricing, licensing and broader SDK behavior are not established by this source. No code was executed and no terminal or Studio behavior was tested.
The overview
Identity
Set goals is a Mistral documentation page about goals in its evaluations SDK, available at [https://docs.mistral.ai/studio/observability/evaluations/goals.md]. It teaches a specific evaluation feature rather than providing a standalone application or a complete introduction to the SDK.
Assessment
The guide is useful for translating acceptance criteria into explicit score thresholds. Its strongest practical detail is the separation between checking every generated answer and checking a statistic across an entire run.
A passing verdict establishes that the chosen score meets a threshold. It does not establish that the scorer measures correctness adequately or that the evaluation data represents real use.
Users
The guide is best suited to Python developers who already have evaluation records, a task that produces outputs and functions that score those outputs. Developers maintaining AI applications can use it to express requirements for measures such as accuracy or latency.
Beginners can follow the threshold examples, but the complete example assumes familiarity with asynchronous Python, environment variables and SDK context objects.
Capabilities
Goal.gte requires a score at or above a threshold; Goal.lte requires one at or below it; Goal.between accepts an inclusive interval. Goal methods also accept a metric argument targeting avg, min, max or std, with the average as the default.
The page covers goals on individual generation scores, declared run statistics and RunEvaluator scores. It describes run.show() verdicts at run, record and generation levels, including counts of passing generations. Its description also mentions Studio verdicts, but supplies no Studio interface instructions.
Using it
Requirements
The complete example requires a Python environment exposing the illustrated mistralai.evaluations API, a Mistral API key in MISTRAL_API_KEY and access to the model used for chat completions. It supplies a small dataset, task function and scorer functions.
The page does not specify a minimum Python version, compatible SDK version, installation command, account entitlement or model availability requirements.
Mechanism
Evaluator.goal checks each generation’s score. A goal attached to a Statistic checks that statistic across the run. Both are evaluated independently. When statistics are omitted, the run-level display falls back to applying goal to the average; declaring statistics makes that list authoritative.
Goals determine pass/fail. Direction determines which way is better: gte implies maximize and lte implies minimize when direction is unset; other cases default to maximize. Normalization requires both min_value and max_value or neither, with min_value below max_value. Weight defaults to 1.0; weight=0 retains the goal as a constraint while excluding the metric from the optimization objective.
Setup
For an existing evaluation, import Evaluator, Goal and Statistic from mistralai.evaluations. Attach a threshold to goal for individual scores, and attach a separate goal to Statistic.avg or another declared statistic for a run-level requirement.
The full example creates a Mistral client from MISTRAL_API_KEY, defines the task and scorers, calls client.evaluation.run and displays generation details with run.show(level="generations"). The deprecated aggregate_goal parameter should be replaced by a goal on a declared Statistic. Include every statistic needed when supplying an explicit statistics list.
Example
The supplied example asks three factual questions with three generations per record. Its scorer returns 1 when the expected answer occurs anywhere in the output, ignoring case, and 0 otherwise. It sets an individual threshold of 0.8, an average threshold of 0.9 and a separate RunEvaluator threshold of 0.85 on average accuracy.
Assuming nine scored generations, eight scores of 1 and one of 0 would produce an average of approximately 0.889: the 0.9 statistic goal would fail while the 0.85 run-evaluator goal would pass. This is an arithmetic illustration of the documented rules, not an observed execution result.
Assessment & evidence
Limitations
The example’s substring scorer can accept an incorrect answer that happens to contain the expected text, including a negated answer. Its three factual questions do not establish suitability for broader application workloads.
The page documents displayed verdicts but does not establish whether a failed goal stops execution or produces a failing process exit code. The page names min-max normalization and gives one worked example (a 200 to 2000 ms window in which 850 ms normalizes to about 0.64 for a lower-is-better metric), but it does not state the formula explicitly or explain how scores outside the window are handled. No SDK behavior, terminal output or Studio behavior was tested.
Reasoning
Use an individual goal when each generated answer must satisfy a requirement, and a statistic-level goal when the requirement concerns overall performance. An average can conceal weak individual results, so the choice should follow the intended acceptance rule.
Keep direction, normalization and weighting explicit when their defaults would be misleading. A between goal defaults to maximize unless direction is supplied, and a mandatory constraint can use weight=0 without losing its pass/fail gate.
Alternatives
Within the documented API, statistic-level goals suit aggregate requirements, while RunEvaluator supports a score computed across records, illustrated with an F1 definition and an average-accuracy example. These address different evaluation needs.
The page provides no comparison with other evaluation libraries or services, so their relative suitability is unknown.
Evidence
The evidence is the complete supplied documentation capture, selected-page.txt, acquired from [https://docs.mistral.ai/studio/observability/evaluations/goals.md]. Its SHA-256 is 7b82c24ee1f073285addd25053ddb80e884a725d57813e8cb70f219bc13f4af2.
The page supplies API descriptions, examples, a deprecation notice and FAQ answers. These establish documented behavior; they provide no execution logs, measured outcomes or independent validation.
Access & freshness
Costs
Evaluation pricing, model rates, quotas and any Studio charges are unknown from this page. The example makes model API calls, but provides no usage receipt or cost estimate. Its execution cost cannot be established from the supplied evidence.
Rights
The supplied page contains no license or explicit redistribution permission for its documentation or embedded examples. SDK licensing, service terms and rights governing evaluation inputs and outputs are also not established by this page.
Freshness
The source was captured on 2026-11-15 at 10:24:33.996 UTC. It supplies no publication date, last-update date or pinned SDK version. The mistral-small-latest model alias in the example does not identify a fixed model version.
The aggregate_goal deprecation notice is relevant to existing integrations. Compatibility with a particular installed SDK and the current availability of the example’s model remain unverified.
Actions
Before adopting these examples, confirm the installed SDK supports the illustrated imports and statistic-level goals. Choose representative evaluation records and a scorer that measures the intended outcome, then set individual and aggregate thresholds deliberately.
Check displayed verdicts against known passing and failing cases. If using goals in automation, verify failure handling and process exit behavior separately. Confirm applicable pricing and reuse terms before relying on the example operationally.
