Skip to main content

Import

import {
  createEvalReport,
  createEvalSourceDocument,
  deriveEvalId,
  discoverEvals,
  evalAgent,
  findEvalById,
} from "veryfront/eval";

Examples

import { datasets, evalAgent, metrics } from "veryfront/eval";

export default evalAgent({
  target: "agent:researcher",
  dataset: datasets.inline([
    { id: "q1", input: "Capital of France?", reference: "Paris" },
  ]),
  metrics: [
    metrics.answer.contains({ text: "Paris" }).gate(),
    metrics.agent.noFailedTools().gate(),
  ],
});

Exports

Functions

NameDescriptionSource
createEvalReportCreate a JSON-serializable eval report from executed records.source
createEvalSourceDocumentCreate the normalized Eval document Studio can list, inspect, and edit.source
deriveEvalIdDerive the stable eval:<path> ID for an eval file.source
discoverEvalsDiscover eval definitions from a project eval directory.source
evalAgentDefine a V1 eval that targets a Veryfront agent.source
findEvalByIdDiscover and return one eval definition by ID.source
isEvalDefinitionCheck whether a value is a normalized eval definition.source
runEvalExecute an eval locally with injected target adapters.source
summarizeEvalRecordsSummarize eval records into pass/fail and metric aggregates.source

Types

NameDescriptionSource
CreateEvalSourceDocumentOptionsOptions for creating a Studio source document from a discovered eval.source
DiscoveredEvalEval definition discovered from project source.source
EvalAgentAdapterAdapter used by runEval to execute V1 agent targets.source
EvalAgentAdapterContextContext passed to an agent adapter when runEval executes an example.source
EvalAgentAdapterResultAgent adapter result normalized into an eval record.source
EvalAgentInputInput accepted by evalAgent.source
EvalCheckContextContext passed to an eval definition’s check callback.source
EvalDatasetDataset loader used by an eval definition.source
EvalDatasetLoadContextContext passed to dataset loaders.source
EvalDefinitionFirst-class eval definition discovered from project source.source
EvalDiscoveryOptionsOptions for project-local eval discovery.source
EvalDiscoveryResultResult returned by eval discovery.source
EvalEditableFieldForm-editable Eval source field name.source
EvalExampleNormalized dataset example used by eval runners and reports.source
EvalExampleInputDataset example shape accepted by eval definitions.source
EvalExpectBuilt-in expectation helpers available inside check.source
EvalExpectationFluent severity helpers for check expectations.source
EvalMetricMetric contract used by eval definitions.source
EvalMetricContextOptional runtime context passed to metric evaluators.source
EvalMetricFamilyMetric family used for grouping report summaries.source
EvalMetricResultResult emitted by a metric or check assertion.source
EvalMetricSummaryAggregate pass/fail summary for one metric.source
EvalMetricThresholdNumeric threshold attached to score-based metrics.source
EvalRecordOne executed example and repetition inside an eval report.source
EvalReportJSON-serializable report produced by runEval.source
EvalReportSummaryAggregate pass/fail summary for one eval report.source
EvalRunV2-ready Eval run projection.source
EvalSeverityHow a metric result affects the final eval result.source
EvalSourceSource location for a discovered eval definition.source
EvalSourceDocumentStudio-editable Eval source document.source
EvalSourcePatchEval source patch submitted by Studio forms.source
EvalSourceReferenceSource location for an Eval definition.source
EvalStudioCapabilityCapability string Studio uses for Eval read and write access.source
EvalTargetKindPrimitive kind an eval can execute. V1 supports agent targets.source
EvalToolCallTool call metadata captured during one eval record.source
EvalTraceTrace metadata captured for one eval record.source
EvalUsageToken and cost usage captured for one eval record.source
RunEvalOptionsOptions for running an eval locally.source

Constants

NameDescriptionSource
datasetsDataset factories for inline, JSON, and JSONL eval examples.source
getEvalEditableFieldSchemaSchema for an editable Eval source field name.source
getEvalRunSchemaSchema for V2-ready Eval run projections.source
getEvalSourceDocumentSchemaSchema for a Studio-editable Eval source document.source
getEvalSourcePatchSchemaSchema for a source patch submitted from an Eval editor.source
getEvalSourceReferenceSchemaSchema for an Eval source reference.source
getEvalStudioCapabilitySchemaSchema for Eval Studio capabilities.source
metricsMetric factories for deterministic answers, agent behavior, operations, and judges.source