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

@reaatech/llm-judge-consensus

v0.1.0

Published

Multi-judge consensus strategies for LLM Judge Toolkit

Readme

@reaatech/llm-judge-consensus

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

Multi-judge consensus strategies for combining individual judgment scores into a final evaluation. Includes majority voting, weighted voting, and a cheap-first tiebreaker strategy to minimize API costs.

Installation

npm install @reaatech/llm-judge-consensus
# or
pnpm add @reaatech/llm-judge-consensus

Feature Overview

  • Three consensus strategies implementing shared interface
  • Confidence-weighted score aggregation
  • Automatic agreement score computation using variance-based formula
  • Cheap-first pattern uses N cheap model judgments with optional expensive tiebreakers
  • Zero external dependencies beyond types

Quick Start

import { MajorityVoting, CheapFirstTiebreaker } from '@reaatech/llm-judge-consensus';

const strategy = new MajorityVoting();
const result = strategy.execute([judgment1, judgment2, judgment3]);

console.log(result.finalScore, result.agreementScore);
// 0.82, 0.94
const cheapFirst = new CheapFirstTiebreaker(2);

const result = cheapFirst.execute([
  gpt4oMiniJudgment,
  gpt4oMiniJudgment2,
  gpt4oJudgment,    // tiebreaker — only used if cheap judges disagree
]);

console.log(result.tiebreakerUsed);
// false (or true if cheap judges disagreed)

API Reference

MajorityVoting

| Property | Description | |----------|-------------| | strategy | majority-voting — confidence-weighted average with agreement computation | | execute(judgments) | Weight scores by confidence, return consensus |

CheapFirstTiebreaker

| Property | Description | |----------|-------------| | strategy | cheap-first-tiebreaker | | constructor(cheapCount) | cheapCount fast/cheap judgments to compare first (default 2) | | agreementThreshold | 0.8 — escalate to remaining judges if cheap pair agreement is below this | | execute(judgments) | Compare cheap pair; escalate to remaining judges if agreement < threshold |

WeightedVoting

| Property | Description | |----------|-------------| | strategy | weighted-voting | | constructor(weights) | User-defined weights array (must match judgments.length) | | execute(judgments) | Weight scores by provided weights, return consensus |

ConsensusStrategy Interface

| Member | Type | Description | |--------|------|-------------| | name | string | Strategy identifier | | execute(judgments) | (judgments: Judgment[]) => ConsensusResult | Execute consensus on input judgments |

ConsensusResult

| Field | Type | Description | |-------|------|-------------| | finalScore | number | Consensus score (0–1) | | agreementScore | number | Inter-judge agreement (0–1) | | method | string | Strategy name used | | individualJudgments | Judgment[] | Input judgments | | tiebreakerUsed | boolean | Whether escalation happened (CheapFirstTiebreaker) |

Related Packages

License

MIT