karat-filter
September 20, 2026 · View on GitHub
Don't feed the model every scrap from the dredge. Retrieve, judge the karat, then load the crucible.
@ormus/karat-filter is Jev Pattern 5 with speculative fan-out: filter RAG / search hits with lightweight relevance+confidence judgments before they burn context. Fan out query variants, merge, dedupe, keep the purest ore.
Echoes retrieve-then-judge patterns from TypeSafe and Vercel Jev writeups, and the free master-Jev teaching vibe: context is precious metal — assay before you spend it.
Install
npm i @ormus/karat-filter
Quick pour
import { filterHits, speculativeFanOut } from '@ormus/karat-filter';
filterHits(hits, { query: 'confidence gates', topK: 5 });
await speculativeFanOut('jev routing', retrieveFn, { variants: 3, topK: 4 });
Liquid Gold siblings
| Repo | Role |
|---|---|
| aurum-gate | Pattern 2 gates |
| quicksilver-judge | Raven pre-filter |
| gold-assay | Vibium assay |
| molten-cascade | Pattern 4 cascade |
| karat-filter | You are here — Pattern 5 + fan-out |
| liquid-gold | Index |
Scripts
npm test
npm run build
License
MIT © 2026 Ormus Solutions