A Python service must summarize 500 independent documents as quickly as possible without tripping rate limits. Which approach fits?
- Exam domain
- Applications and Integration33.1% of the exam
- Difficulty
- Medium
- In this mock
- 21 questions on this domainPractise this domain
Why the exam asks this
Domain 2: Applications and Integration (33.1%).
Objective in the exam guide: Software Engineering Foundations: REST APIs, JSON, asynchronous programming, version control, SDLC integration, and code review.
Asynchronous programming is named in the skill.
Why A is the answer
Use the async client with a bounded number of concurrent requests and the SDK's built-in retries
Async requests with a concurrency limit use the API efficiently while staying within rate limits; the SDK retries 429s.
How it works
Independent API calls can run concurrently.
The async client avoids blocking while waiting.
Bounding concurrency keeps requests within rate limits.
Clues in the question
The words that point to the answer, and what each one tells you.
- Independent, fast, without tripping limits
- Bounded async concurrency.
In detail
- If results are not needed soon, Message Batches cost less.
- Use a semaphore or task pool to bound concurrency.
Side by side with look-alikes
| Approach | Fast and safe? |
|---|---|
| Async, bounded, with retries | Yes |
| Synchronous loop | Slow |
| 500 threads | Rate limited |
| One giant prompt | No |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Use the async client with a bounded number of concurrent requests and the SDK's built-in retriesRight
Async requests with a concurrency limit use the API efficiently while staying within rate limits; the SDK retries 429s.
B. Send all 500 requests in a tight synchronous loop with no limitWrong
A synchronous loop is slow.
C. Start 500 threads at once with no limitWrongMost tempting
Unbounded concurrency causes many 429s.
Why it tempts: It is concurrent. But it floods the rate limit.
D. Join all 500 documents into one promptWrong
One prompt may exceed limits and mixes outputs.
In practice
- Set concurrency from your rate limit, not guesswork.