OpenAI · Google Vision · Async workflows
Designing CV Processing So Users Don't Wait for AI
AI steps are slow by nature: OCR on a scanned CV and a model call can each take seconds. On a production ATS, a CV upload waited for all of it, about 32 seconds, before the user saw anything. The fix wasn't a faster model. It was redesigning the flow so the user doesn't wait for the AI at all.
Before
The upload endpoint ran Google Vision OCR (for image and scanned CVs), OpenAI extraction and profile enrichment synchronously, then answered. Observed wait: ~32 seconds.
After: answer first, enrich later
- Receive the CV or application.
- Check for a duplicate.
- Extract and save the minimum identity fields.
- Create the candidate.
- Return success or the duplicate response immediately.
- Continue OCR and AI enrichment asynchronously.
- The richer profile appears a few seconds later (typically ~3–4 seconds).
Safety when AI reads public input
- Prompt-injection sanitization on CV text before it reaches the model.
- Unsafe markup handling so extracted text can't inject HTML.
- Duplicate protection and validation on public application endpoints.
Tips if you build this: store a status on the record (pending, done, failed) so the UI can show progress, and make the enrichment job safe to run twice in case of a retry.
Why it matters
Users get immediate feedback, a slow or failing AI call can't block the request, and enrichment can be retried. The same principle helped across the platform's backend performance work.