agentskit.js
RAG

Hybrid search

Vector + BM25 blend with weighted normalization.

import { createHybridRetriever } from '@agentskit/rag'

const retriever = createHybridRetriever({
  vector: rag,
  lexical: bm25Index,
  weights: { vector: 0.7, lexical: 0.3 },
})

#When to use

Queries with rare keywords or exact tokens (error codes, SKUs, identifiers) that vector alone misses.

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page