Batch Embedding
Basic Usage
string[] texts = new[]
{
"First document",
"Second document",
"Third document"
};
float[][] embeddings = await texts
.GENEmbed()
.ExecuteAsync();Configuration
string[] texts = new[] { "Text 1", "Text 2", "Text 3" };
float[][] embeddings = await texts
.GENEmbed()
.SetModel(OpenAIModel.TextEmbedding3Small)
.ExecuteAsync();Unity Integration Examples
Example 1: Bulk Document Indexing
Example 2: FAQ Database Builder
Example 3: Content Library Processor
Example 4: Multi-Language Indexer
Performance Benefits
Sequential vs Batch
Batch Size Recommendations
Best Practices
✅ Good Practices
❌ Bad Practices
Error Handling
Provider Limits
Provider
Max Batch Size
Notes
Performance Comparison
Method
Time
API Calls
Use Cases
Use Case
Batch Size
Next Steps
Last updated