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

@orq-ai/evaluators

v1.3.1

Published

Reusable evaluators for AI evaluation frameworks

Readme

@orq-ai/evaluators

Reusable evaluators for AI evaluation frameworks. This package provides a collection of pre-built evaluators that can be imported and used in your .eval files.

Installation

npm install @orq-ai/evaluators

Usage

String Contains Evaluator

Check if the output contains the expected output (case-insensitive by default):

import { stringContainsEvaluator } from "@orq-ai/evaluators";

// Default: case-insensitive matching
const evaluator = stringContainsEvaluator();

// Case-sensitive matching
const strictEvaluator = stringContainsEvaluator({
  caseInsensitive: false
});

// Custom name
const namedEvaluator = stringContainsEvaluator({
  name: "contains-capital-city"
});

The evaluator compares output against data.expectedOutput from the dataset and returns:

  • value: 1.0 and pass: true if output contains expected
  • value: 0.0 and pass: false otherwise

Cosine Similarity Evaluator

Compare semantic similarity between output and expected text using OpenAI embeddings:

import {
  cosineSimilarityEvaluator,
  cosineSimilarityThresholdEvaluator,
  simpleCosineSimilarity
} from "@orq-ai/evaluators";

// Simple usage - returns similarity score (0-1)
const evaluator = simpleCosineSimilarity("The capital of France is Paris");

// With threshold - returns boolean based on threshold
const thresholdEvaluator = cosineSimilarityThresholdEvaluator({
  expectedText: "The capital of France is Paris",
  threshold: 0.8,
  name: "semantic-match"
});

// Advanced configuration
const customEvaluator = cosineSimilarityEvaluator({
  expectedText: "Expected output text",
  model: "text-embedding-3-large", // optional: custom embedding model
  name: "custom-similarity"
});

Environment Variables

The cosine similarity evaluator requires one of:

  • OPENAI_API_KEY - For direct OpenAI API access
  • ORQ_API_KEY - For Orq proxy access (automatically uses https://api.orq.ai/v2/proxy)

When using Orq proxy, models should be prefixed with openai/ (e.g., openai/text-embedding-3-small).