Principle:Infiniflow Ragflow Embedding Generation
| Knowledge Sources | |
|---|---|
| Domains | RAG, NLP, Machine_Learning |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
A vector representation technique that converts text chunks into dense numerical vectors for semantic similarity search.
Description
Embedding Generation transforms text chunks into fixed-dimensional dense vectors using neural language models. These vectors capture semantic meaning, enabling similarity-based retrieval. RAGFlow supports 30+ embedding providers (OpenAI, Cohere, HuggingFace, BAAI, SiliconFlow, etc.) through a factory pattern with a common Base.encode interface. Embeddings are stored alongside chunk text in the document store for hybrid search.
Usage
This operates automatically during document processing after chunking. The embedding model is configured per-tenant and applied to all knowledge bases owned by that tenant.
Theoretical Basis
Dense embeddings map text to a continuous vector space where:
- Semantic similarity correlates with vector cosine similarity
- Dimensionality varies by model (768 for BERT, 1536 for OpenAI ada-002, etc.)
- Batch processing with batch_size=16 balances throughput and API limits
- Title weighting: RAGFlow combines title and content embeddings for better retrieval