POLARIS FIELD GUIDE / 3 MIN READ
Why detection and restoration use different compute paths
Sensitive-span detection and authorized restoration perform different work. Detection identifies what to transform in source text; restoration resolves permitted references using an existing task context. Polaris-Mist uses GPU-based G1 detection and CPU-only restoration. Measure latency, plan capacity and test failures for each stage independently. Restoration resolves the existing references directly on CPU.
Separate inference from reference resolution
Detection examines incoming text and produces a transformed representation. Its workload depends on the input and the detector path. Restoration takes the generated text and its context handle, verifies authorization and resolves placeholders to their original values. It operates on the association established earlier.
The Mist API exposes that separation as POST /v1/redact and POST /v1/restore. Restoration runs on CPU independently of the detection GPU. This is an architectural behavior developers can incorporate into a round-trip sequence and verify in an integration test.
Measure the full latency budget
Record times for request preparation, redaction, external model work, restoration and final validation. Use end-to-end measurements in addition to the service-specific durations. Include model generation and application retries in the end-to-end latency budget.
Use a trace record with safe identifiers and timing fields. Measure durations with safe request identifiers and timing fields. Keep warm and cold-start observations distinct, and record payload size so the team can compare similar requests when investigating a change.
| Stage | Measure |
|---|---|
| Redaction | Service time and input size |
| External model | Generation duration and retries |
| Restoration | CPU response time and result status |
| Final validation | Time to produce the deliverable |
Plan the restoration lifecycle
Use expires_at from the redaction response to track the context's usable lifetime. Long-running work can finish after that point. Define the recovery path before sending a task into a slow queue or waiting for a later human step.
Test normal completion, a delayed response, an expired handle and a task mismatch. Give each condition an explicit application state. Present its recovery action in the product flow and deliver the document after references resolve successfully.
Test detection unavailability separately
Exercise a failed redaction request and verify that the application holds the affected task until its approved recovery path completes. Then exercise restoration with a valid previously created context under the operating conditions.
This distinguishes the application's failure behavior from the service architecture. Mist uses a warm GPU primary and a fallback route. Configure the client with bounded retries, request deadlines and an explicit state for tasks requiring recovery.
Compare cost against completed work
Track redaction calls, model calls, restoration calls and successfully delivered tasks. In the Mist workspace, restoration runs independently of the redaction quota. Track each call class separately in the application ledger to connect service usage with completed tasks.
Include peak arrival rate, input-size distribution, queue duration and downstream outputs per context in the capacity worksheet. Use measured runs from representative work to fill it. The worksheet then supports a concrete decision about throughput and recovery needs for the integration.
QUESTIONS & ANSWERS
Details that matter.
Does restore require another model inference?
The Polaris-Mist API resolves authorized placeholders on CPU using the existing context, independently of the detection GPU.
Which timing describes the end-user experience?
Measure the complete task from accepted input to validated deliverable. Keep per-stage timings available for engineering diagnosis.
Why retain expires_at?
It lets the application plan for context expiration. Long tasks and delayed callbacks need an explicit recovery path when restoration can no longer use the original context.