Meridian Field Services: instructional example, not project evidence
Cheapest pattern first: single call, chain, router, parallelization, orchestrator-workers, evaluator-optimizer, agent, multi-agent. Anything agentic carries a written justification; so does the rejection.
| Feature | Pattern | Model | Rationale | Fallback |
|---|---|---|---|---|
| Suggestion ranking | single constrained call | ranking role[1] | One bounded task (rank the eligible set), no tool use, no iteration | Full-list degradation (suggestions_unavailable[2]) |
| Exception-review search | single retrieval call | none (retrieval-only at pilot) | The US-3 surface over the override-note index (retrieval[3]) | Keyword filter fallback |
An agent framework was REJECTED for suggestion ranking: the task has fixed inputs, a closed output space, and a two-second budget; agent tiers trade latency and cost for autonomy the task cannot use; multi-agent burns 4 to 220x tokens on work this shape (orchestration pattern[4]).
Guardrails, two layers. Input: the intake validation rules (validation[5]). Output: schema-constrained ranked ids from the eligible set only; constrained decoding per ADR-5[4], the strongest output guardrail. Observability: every call a span with model, input and output tokens, operation, and provider, landing in the LLM trace stream (instrumentation[6]).
Why considered: one AI feature at pilot; a second provider's resilience buys less than its gateway-maintenance and eval-duplication costs; direct integration hard-wires the vendor shape into application code. Findings: single-provider-with-gateway wins; the gateway is the egress enforcement point; anonymized codes only cross (SR-014[7], INT-4[8]); switching exposure stated: prompts and evals are provider-portable by design, the gateway isolates the API shape (provider strategy[4]).
SPOF, documented and owned: provider outage degrades suggestions to the full list (never blocks dispatch); accepted by A. Reyes; revisit trigger is a second AI feature entering the roadmap.
Orchestration-level shape only; the prompt CONTENT lives in the prompt spec, cited never restated.
The ranking call carries the system framing at the gateway layer; job attributes and candidate codes enter as typed variables; the instruction hierarchy is architectural: the system framing is not overridable by job-note content (injection defenses[9]). Structured output: the ranking feature feeds a machine (the board), so schema-constrained decoding is enforced at the gateway, citing ADR-5[4]; no free-text output path exists at pilot. Prompt content: one entry, PR-01[9].
Statelessness is a claim with rationale; the absence of a checkpointer is a decision, not an omission.
Stateless, as a claim: suggestion ranking is stateless per-request; every call carries its full context (job attributes plus the eligible set), nothing resumes, nothing checkpoints. Rationale: the task completes inside one budget window and the board re-requests on staleness (board read model[10]). The exception-review search is likewise stateless. No checkpointer, no persistence backend, no conversation state, and the first conversational feature on the roadmap re-opens this section.
Cost per task is designed, not discovered on the invoice.
| Feature | Budget / task | Caching | Measured actual |
|---|---|---|---|
| Suggestion ranking | 1,800 tokens (1,500 in / 300 out) | Prompt-prefix caching on the stable system framing (the eligible-set payload varies, the framing does not) | 1,410 tokens mean over pilot-shape trials (eval runs[1]) |
Semantic caching: rejected at pilot: dispatch contexts rarely repeat within the cache window; recorded so the rejection is a decision. Cost per thousand suggestions is budgeted and tracked on the value-case dashboard (dashboards[6]). Breach rule: a day above 120% of budget raises a ticket to A. Reyes; the alert is wired (alert catalog[6]).
| Rung | Suggestion ranking |
|---|---|
| Timeout | 2 s, the boundary the process flow owns (FLW-01[11]) |
| Retry budget | One retry inside the window, none after; a late suggestion is discarded, never late-applied (AI cases[12]) |
| Fallback chain | DEGRADED, declared: the full technician list with the degradation notice (suggestions_unavailable[2]) |
| Circuit breaker | 5 consecutive provider failures → open 5 min; suggestions degrade without per-request timeouts stacking |
| Posture | Degrade before error: dispatch never blocks on the model |
The failure paths themselves are owned by the process flows and edge-case analysis; cited, not remodeled.
| Question | Owner | Answer by | Blocks |
|---|---|---|---|
| Does the exception-review search add a generation step (summarize similar overrides) or stay retrieval-only through pilot? | A. Reyes | Sep 26, 2026 | The pattern table's second row only |