apache_beam.ml.rag.embeddings.base module

apache_beam.ml.rag.embeddings.base.create_rag_adapter() EmbeddingTypeAdapter[Chunk, Chunk][source]

Creates adapter for converting between Chunk and Embedding types.

The adapter: - Extracts text from Chunk.content.text for embedding - Creates Embedding objects from model output - Sets Embedding in Chunk.embedding

Returns:

EmbeddingTypeAdapter configured for RAG pipeline types