Embedding providers convert text into high-dimensional vectors for semantic search. Agentium provides a unifiedDocumentation Index
Fetch the complete documentation index at: https://docs.xhipai.com/llms.txt
Use this file to discover all available pages before exploring further.
EmbeddingProvider interface with OpenAI and Google implementations.
EmbeddingProvider Interface
OpenAI Embeddings
Available Models
| Model | Dimensions | Best For |
|---|---|---|
text-embedding-3-small | 1536 | General use, cost-effective |
text-embedding-3-large | 3072 | Higher accuracy |
text-embedding-ada-002 | 1536 | Legacy |
OpenAI API key. Falls back to
OPENAI_API_KEY env var.Embedding model name.
Google Embeddings
Available Models
| Model | Dimensions | Best For |
|---|---|---|
text-embedding-004 | 768 | General use |
embedding-001 | 768 | Legacy |
Google API key. Falls back to
GOOGLE_API_KEY env var.Embedding model name.
Using with KnowledgeBase
Embedding providers are passed toKnowledgeBase via the vector store. Most vector stores accept an EmbeddingProvider in their configuration or the KnowledgeBase handles embedding internally.
RAG Example
See a complete end-to-end RAG implementation using embeddings.