Skip to main content
Ragrails ships with Voyage embeddings and Voyage/BM25 reranking. You can register additional embedding or reranking providers at application startup.

Register an embedder

A custom embedder factory must return an object that implements the embedding model interface used by Ragrails. The factory receives model_name, input_type, and any provider options.
SDK
Use it anywhere an embedding provider is accepted:

Register a reranker

A custom reranker factory must return an object with rerank(query, texts) -> list[float].
SDK
Use it in retrieval, query, or chat reranking:

Replacement behavior

Provider names must be unique unless you explicitly replace an existing registration.
Only use replace=True when you intentionally want to override a provider for the whole process.

Built-ins

Register providers once at startup, before creating RagRails clients, embedders, rerankers, or long-running workers.