Batch Operations¶
Batch operations allow you to process multiple items in a single API call rather than making separate calls for each item. In Elluminate, this means you can generate multiple responses or perform multiple ratings in parallel, significantly improving efficiency and reducing overhead.
For example, instead of making 10 separate API calls to generate responses for 10 different sets of template variables, you can send all 10 sets in a single batch request. The server processes these requests concurrently and returns all results together.
Batch operations are particularly useful when you need to:
- Bulk Process Responses: Generate responses for multiple prompts efficiently
- Batch Evaluate: Rate multiple responses against criteria in parallel
-
Create an experiment to track the batch responses and ratings. This experiment will be used to associate all generated responses with this evaluation run.
-
Efficiently generates multiple responses from a single prompt template with different template variables. The experiment parameter links all generated responses to the experiment.
-
Efficiently rate multiple responses against their respective criteria. The ratings are automatically collected in the experiment because the responses were linked to it during generation. The rating mode determines the type of rating strategy to employ.
Performance Considerations¶
Batch operations offer several performance benefits:
- Reduced network overhead
- Parallel processing on the server
- Lower total latency for multiple operations
- More efficient resource utilization
However, be mindful of:
- Memory usage with large batches
- Timeout limits for long-running operations
- API rate limits and quotas
- Error handling complexity