Skip to main content
Embedding models are injected independently from the LLM. They implement embed_documents() and embed_query(), which lets the same pipeline combine local retrieval with hosted generation or the reverse.

Create an embedding model

Connect embeddings to storage

The vector store owns the embedding model used for indexing and querying:
Pass the same embeddings object to RAGPipeline. The pipeline validates that all required components are present, while the vector store performs the actual embedding calls.
Changing the embedding model for an existing collection can make stored and query vectors incompatible. Use a new collection or rebuild the index.

Custom embeddings

No inheritance is required. A custom object is accepted when it exposes:
This structural contract keeps application integrations decoupled from framework internals.