npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@axlsdk/eval

v0.3.0

Published

Evaluation framework for Axl agentic workflows

Downloads

392

Readme

axl-eval

Evaluation framework for Axl agentic workflows. Define datasets, scoring functions, and run evaluations to measure and compare agent performance.

Installation

npm install @axlsdk/eval

API

dataset(config)

Define evaluation datasets:

import { dataset } from '@axlsdk/eval';
import { z } from 'zod';

// Inline items with schema and annotations
const ds = dataset({
  name: 'math-basics',
  schema: z.object({ question: z.string() }),
  annotations: z.object({ answer: z.number() }),
  items: [
    { input: { question: '2+2' }, annotations: { answer: 4 } },
    { input: { question: '3*5' }, annotations: { answer: 15 } },
    { input: { question: '10/2' }, annotations: { answer: 5 } },
  ],
});

// Load from file
const ds = dataset({
  name: 'math-advanced',
  schema: z.object({ question: z.string() }),
  file: './datasets/math.json',
});

scorer(config)

Define deterministic scoring functions. The score callback receives (output, input, annotations?):

import { scorer } from '@axlsdk/eval';

const exactMatch = scorer({
  name: 'exact-match',
  description: 'Checks if the output answer exactly matches the expected answer',
  score: (output, input, annotations) => output.answer === annotations?.answer ? 1 : 0,
});

const partialMatch = scorer({
  name: 'partial',
  description: 'Checks if the output contains the expected answer',
  score: (output, input, annotations) => {
    const outputStr = String(output).toLowerCase();
    const expected = String(annotations?.answer).toLowerCase();
    return outputStr.includes(expected) ? 1 : 0;
  },
});

llmScorer(config)

Use an LLM as a judge. The scorer automatically constructs a prompt from the input, output, and annotations, then validates the response against your Zod schema:

import { llmScorer } from '@axlsdk/eval';
import { z } from 'zod';

const qualityJudge = llmScorer({
  name: 'quality',
  description: 'Rates output quality on a 0-1 scale',
  model: 'openai:gpt-4o',
  system: 'You are an expert evaluator. Rate the quality of AI outputs.',
  schema: z.object({
    score: z.number().min(0).max(1),
    reasoning: z.string(),
  }),
  temperature: 0.2,
});

runEval(config, executeFn)

Run an evaluation:

import { runEval } from '@axlsdk/eval';

const results = await runEval(
  {
    dataset: ds,
    scorers: [exactMatch, qualityJudge],
    concurrency: 5,
  },
  async (input) => {
    const output = await runtime.execute('my-workflow', input);
    return { output };
  },
);

console.log(results.summary);
// { exact-match: { mean: 0.85, min: 0, max: 1 }, quality: { mean: 0.92, ... } }

evalCompare(baseline, candidate)

Compare two evaluation runs:

import { evalCompare } from '@axlsdk/eval';

const comparison = evalCompare(baselineResults, candidateResults);

console.log(comparison.regressions);
// [{ item: ..., scorer: 'exact-match', baseline: 1, candidate: 0 }]

console.log(comparison.improvements);
// [{ item: ..., scorer: 'quality', baseline: 0.5, candidate: 0.9 }]

defineEval(config)

Register an eval for CLI discovery:

import { defineEval } from '@axlsdk/eval';

export default defineEval({
  name: 'math-eval',
  dataset: ds,
  scorers: [exactMatch],
});

CLI

Run evaluations from the command line:

# Run an eval file
npx axl-eval run ./evals/math.ts

# Compare two results
npx axl-eval compare ./results/baseline.json ./results/candidate.json

Integration with AxlRuntime

import { AxlRuntime } from '@axlsdk/axl';

const runtime = new AxlRuntime();
runtime.register(myWorkflow);

const results = await runtime.eval({
  workflow: 'my-workflow',
  dataset: ds,
  scorers: [exactMatch],
  concurrency: 3,
});

License

Apache 2.0