Bilel Abdelmoula

Home › Blog

OpenAI · Google Vision · Async workflows

Designing CV Processing So Users Don't Wait for AI

By Bilel Abdelmoula ·

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

  1. Receive the CV or application.
  2. Check for a duplicate.
  3. Extract and save the minimum identity fields.
  4. Create the candidate.
  5. Return success or the duplicate response immediately.
  6. Continue OCR and AI enrichment asynchronously.
  7. 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.

Add as a preferred sourceon Google

Got a slow or messy app?

I'm a full-stack developer (React/TypeScript, APIs, PostgreSQL, AI), open to remote roles and contract work. A short call is enough to see if I can help.

More articles