azure-ai-evaluation: Batch evaluation issues with higher request rates
- Package Name:
azure-ai-evaluation - Package Version: 1.8.0
- Operating System: macOS Sequoia 15.5
- Python Version: 3.11.8
Describe the bug
I am seeing a lot of APIConnectionError messages in the logs during batch evaluation processing. It seems to be happening solely at higher request rates. At the moment, I have my evaluation tool setup to run four concurrent batch evaluations using a handful of evaluators including groundedness and retrieval. The issue seems to have nothing to do with the evaluators being used, but rather, solely the request rate. However, it feels like request rates have nothing to do with API connection errors. Resulting from these connection errors are a lot of failed tests, and resultantly, I get faulty evaluation results.
Errors
- Here's the API connection error:
2025-08-04 15:06:48 -0400 72737 execution ERROR 23/36 flow run failed, indexes: [10,16,14,13,11,15,12,17,19,18,20,23,21,22,24,25,26,29,27,33,28,31,30], exception of index 10: (UserError) OpenAI API hits APIConnectionError: Connection error. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]
======= Run Summary =======
Run name: "azure_ai_evaluation_evaluators_response_completeness_20250804_150051_814454"
...
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
- And here's the final summary showing the poor results:
======= Combined Run Summary (Per Evaluator) =======
{
"groundedness": {
"status": "Completed with Errors",
"duration": "0:02:54.777369",
"completed_lines": 13,
"failed_lines": 23,
"log_path": "/Users/jacobmontgomery/.promptflow/.runs/azure_ai_evaluation_evaluators_groundedness_20250805_095103_096894"
},
"relevance": {
"status": "Completed with Errors",
"duration": "0:02:55.028590",
"completed_lines": 25,
"failed_lines": 11,
"log_path": "/Users/jacobmontgomery/.promptflow/.runs/azure_ai_evaluation_evaluators_relevance_20250805_095103_097594"
},
"retrieval": {
"status": "Completed with Errors",
"duration": "0:03:00.367557",
"completed_lines": 16,
"failed_lines": 20,
"log_path": "/Users/jacobmontgomery/.promptflow/.runs/azure_ai_evaluation_evaluators_retrieval_20250805_095103_098826"
},
"coherence": {
"status": "Completed with Errors",
"duration": "0:02:57.259804",
"completed_lines": 15,
"failed_lines": 21,
"log_path": "/Users/jacobmontgomery/.promptflow/.runs/azure_ai_evaluation_evaluators_coherence_20250805_095103_101692"
},
"fluency": {
"status": "Completed with Errors",
"duration": "0:03:03.330086",
"completed_lines": 17,
"failed_lines": 19,
"log_path": "/Users/jacobmontgomery/.promptflow/.runs/azure_ai_evaluation_evaluators_fluency_20250805_095103_103661"
}
}
To Reproduce Steps to reproduce the behavior:
- Establish a few evaluation-compatible files with 30+ Q&A sets.
- I used 36 Q&A sets.
- Run batch evaluations using a handful of evaluators.
- I used evaluators
groundedness,relevance,retrieval,coherence,fluency, andresponse_completeness.
- I used evaluators
Expected behavior No API connection errors and no failed evaluations.
Screenshots N/A
Additional context
- I am working within a Foundry Hub project and am using a global standard
gpt-4.1-minimodel for evaluations. - I initially posted a discussion here.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @luigiw @needuv @singankit.
Hello @jacobreesmontgomery, thanks for bringing this to our attention. Is there a way you can upgrade your package to the latest and give it a try?
We have removed the promptflow dependency in our most recent 1.10.0 version.
If your encounter rate limit errors, you'll see something like this:
WARNING [0/10] AsyncAzureOpenAI request failed. RateLimitError: Error code: 429 - {'error': {'code': '429', 'message': 'Requests to the ChatCompletions_Create Operation under Azure OpenAI API version 2024-02-15-preview have exceeded token rate limit of your current AIServices S0 pricing tier. Please retry after 60 seconds. Please go here: https://aka.ms/oai/quotaincrease if you would like to further increase the default rate limit. For Free Account customers, upgrade to Pay as you Go here: https://aka.ms/429TrialUpgrade.'}}. Retrying in 60.000000 seconds.
It keeps retrying till it finishes the execution.
Hi @jacobreesmontgomery. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Hello @jacobreesmontgomery, thanks for bringing this to our attention. Is there a way you can upgrade your package to the latest and give it a try? We have removed the promptflow dependency in our most recent
1.10.0version.If your encounter rate limit errors, you'll see something like this:
WARNING [0/10] AsyncAzureOpenAI request failed. RateLimitError: Error code: 429 - {'error': {'code': '429', 'message': 'Requests to the ChatCompletions_Create Operation under Azure OpenAI API version 2024-02-15-preview have exceeded token rate limit of your current AIServices S0 pricing tier. Please retry after 60 seconds. Please go here: https://aka.ms/oai/quotaincrease if you would like to further increase the default rate limit. For Free Account customers, upgrade to Pay as you Go here: https://aka.ms/429TrialUpgrade.'}}. Retrying in 60.000000 seconds.It keeps retrying till it finishes the execution.
Sure, I can try this.
Hi @jacobreesmontgomery. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Hi @jacobreesmontgomery, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!