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

@framers/agentos-ext-citation-verifier

v0.1.0

Published

Verify claims in text against sources using semantic similarity with optional web fallback

Readme

Citation Verifier

Verify claims in text against sources using semantic similarity. Supports web search fallback for unverifiable claims.

Installation

npm install @framers/agentos-ext-citation-verifier

Usage

import { createExtensionPack } from '@framers/agentos-ext-citation-verifier';

const pack = createExtensionPack({
  config: {
    embedFn: async (texts) => myEmbeddingProvider.embed(texts),
  },
});

Tool: verify_citations

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | text | string | Yes | Text containing claims to verify | | sources | array | No | Sources to verify against ({ title, content, url }) | | webFallback | boolean | No | Search the web for unverifiable claims |

Example

User: "Verify this research summary"
Agent: verify_citations({
  text: "The Earth's core temperature is approximately 5,400°C. Mars has two moons.",
  sources: [
    { content: "Earth's inner core reaches temperatures of 5,400°C.", url: "https://example.com/earth" }
  ],
  webFallback: true
})
Result: {
  totalClaims: 2,
  supportedCount: 1,        // "Earth's core" matched the source
  unverifiableCount: 0,     // "Mars has two moons" verified via web
  summary: "2/2 claims verified (100%)"
}

How It Works

  1. Claim extraction — splits text into atomic factual claims using sentence boundaries
  2. Batch embedding — embeds all claims + all sources in one call
  3. Cosine similarity matrix — computes claim × source similarity
  4. Verdict assignment:
    • similarity >= 0.6supported (claim matches a source)
    • similarity 0.3-0.6weak (partial match)
    • similarity < 0.3unverifiable (no matching source)
  5. Web fallback — for unverifiable claims, searches the web via FactCheckTool

Verdicts

| Verdict | Meaning | Action | |---------|---------|--------| | supported | Claim semantically matches a source | Safe to present | | weak | Partial match, lower confidence | Present with caveat | | unverifiable | No source matches | Mark as "[unverified]" or search web | | contradicted | Source contradicts the claim (via NLI) | Do not present as fact |

Integration with Deep Research

When using the deep_research tool with depth: "deep", citation verification runs automatically on the synthesized output. No explicit verify_citations call needed.

Configure in agent.config.json:

{
  "queryRouter": {
    "verifyCitations": true
  }
}

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | SERPER_API_KEY | No | Enables web fallback for unverifiable claims | | TAVILY_API_KEY | No | Alternative search provider for web fallback |

Related

  • Skill: fact-grounding — instructs the agent to verify claims before presenting
  • Guardrail: grounding-guard — real-time NLI-based grounding (streaming)
  • Tool: fact_check — web-based fact verification (single claim)

License

MIT