Skip to main content
Embedding adds vector representations to chunks so the vector database can perform semantic search. In the full SDK workflow, rag.ingest() embeds chunks for you. Use rag.embed() directly when you need to inspect vectors or control batching/model choice.

Embed Chunks

Result

An embedded chunk keeps the chunk fields and adds embedding:

Create an Embedder

Use input_type="document" while indexing and input_type="query" for retrieval. rag.query(), rag.retrieve(), and rag.chat() create query embedders automatically from constructor defaults.

Override the Model

Parameters

embedder()

embed()

Next Stage

Chunking

Create chunks.

Storing

Store embedded chunks.