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

@effect-uai/retrieval

v0.17.0

Published

Retrieval-pipeline utilities for @effect-uai/core: text chunking, rank fusion, and a Hugging Face tokenizer layer.

Readme

@effect-uai/retrieval

Retrieval-pipeline utilities for @effect-uai/core: chunking, rank fusion, and a tokenizer layer.

The pieces of a retrieval pipeline that are plain functions rather than providers. The capability tags they implement (Chunker, Tokenizer) live in core, so your ingest code never names a strategy.

This package exposes:

  • Chunking - four chunkers (recursive, sentences, markdown, fixed), each reporting the offsets every passage came from, so a search hit can be traced back to its source. layer serves one through the core Chunker tag; withTokenizer sizes chunks by real tokens.
  • Rank - rrf, reciprocal rank fusion, for merging a keyword leg and a vector leg whose scores mean nothing to each other.
  • HuggingFaceTokenizer - the core Tokenizer tag over any Hugging Face repo with a tokenizer.json. Downloading and building are separate, so you cache the vocabulary instead of refetching on every boot.

Install

pnpm add @effect-uai/retrieval @effect-uai/core effect

The tokenizer needs one optional peer:

pnpm add @huggingface/tokenizers

ESM-only. Requires [email protected] as a peer.

Usage

import { chunk } from "@effect-uai/core/Chunker"
import * as Chunking from "@effect-uai/retrieval/Chunking"
import * as Rank from "@effect-uai/retrieval/Rank"

const ingest = Effect.gen(function* () {
  const passages = yield* chunk(document)
  // embed and store
})

const chunker = Chunking.layer(Chunking.recursive, { targetSize: 512 })

const fused = Rank.rrf([keywordIds, vectorIds], { weights: [1, 2] })

Docs

Full docs: https://effect-uai.betalyra.com/retrieval/

See Chunking, Tokenizers, and Agentic search for a pipeline using all of it.

License

MIT