Yes — this is the right understanding. Now convert these learnings into ClaimFlow AI’s Week 2 architecture.

Your final mental model should be:

Label Studio taught us:
data → prediction → annotation

A2I taught us:
review trigger → human loop/task → reviewer UI → human output → stored result

For ClaimFlow AI:

Document/PDF/email
→ Gemini extractedJson
→ validationJson
→ if NEEDS_REVIEW create ReviewTask
→ reviewer opens task
→ reviewer approves / edits / rejects
→ ReviewDecision stores human output
→ ReviewEvent stores audit trail

ClaimFlow AI custom human review mapping

1. Label Studio mapping

Label Studio ClaimFlow AI
Data Document row: original PDF/email
Prediction ExtractionRun.extractedJson
Annotation ReviewDecision.correctedJson
Prediction is read-only extractedJson is immutable
Human-corrected annotation reviewer-created correctedJson

Architectural decision:

Do not overwrite extraction_runs.extractedJson.
Human review creates a corrected copy.

2. A2I mapping

A2I concept ClaimFlow AI concept
Data object PDF/email + extractedJson + validationJson
Activation condition finalStatus === "NEEDS_REVIEW"
Human loop ReviewTask
Task sent to workers task appears in /review
Worker UI review detail page
Worker response ReviewDecision
Output in S3 output in Postgres for now
Human loop metadata ReviewEvent, startedAt, completedAt, reviewerName

Architectural decision:

ReviewTask is our custom human loop.
ReviewDecision is our custom human output.
ReviewEvent is our custom audit metadata.

Week 2 architecture decisions

Decision 1 — Review task creation

When validation completes and produces: