Goal
Run a reproducible curl-first test that shows:admincompletion sees raw sensitive valuesviewercompletion sees redacted placeholders- both use the exact same query prompt
Prerequisites
Step 1) Create a synthetic PII PDF
Step 2) Upload with redaction policy (capture workflow run)
Document ID vs workflow run ID
DOC_IDis the durable document identity (/document/:id/...).workflowIdis the processing run identity for that upload/reparse.- One document can have multiple workflow runs over time; polling
/statusis document-scoped and reflects the current/latest phase.
Step 3) Wait until extraction is complete
Step 4) Query admin and viewer with the exact same prompt
Step 5) Assert completion context redaction
Step 6) Generate viewer/admin markdown links (optional)
Notes
- This cookbook uses authenticated completion with
X-Redaction-Role. - It is the clearest way to verify role-aware redaction in LLM tool context.
- The name field may remain visible depending on active policy; this test asserts SSN/email/phone behavior.
uploadreturns a document-scoped response (documentId,phase,workflowId,urls) rather than a separate long-lived job object.