Fallback drops a mandatory citation requirement
Detect: Invariant checks find missing evidence support.
Recover: Reject the output and repair the template before reuse.
Use evaluated alternate prompt strategies for specific recoverable failure classes while preserving policy, evidence requirements, and response contracts.
Fallback prompt strategies change how a task is presented when the primary prompt fails in a recognizable way. Examples include a simpler extraction prompt after formatting failure, a narrower evidence question after an overbroad answer, or a clarification request when required input is absent. Fallback is a controlled branch with its own evaluation, not an improvised attempt to bypass a refusal.
Keep mandatory constraints invariant across prompts. Authorization, sensitive-data rules, required citations, and factual uncertainty cannot disappear because a shorter prompt seems more likely to succeed. Classify the failure first: service outages call for operational recovery, while missing evidence calls for retrieval or abstention rather than different wording.
A prototype can compare one alternate prompt against the primary on a known defect set. Include normal cases to detect regressions introduced by the fallback.
Production maintains a versioned prompt registry, explicit trigger conditions, bounded attempts, and shared output validation. Record which strategy actually produced the accepted result.
At scale, monitor fallback frequency and total cost. A fallback that handles most traffic may indicate that it should become the primary, while a low-success branch should be removed rather than retained as ritual complexity.
Identifies formatting, ambiguity, coverage, or other explicitly recoverable prompt-level defects.
Stores approved primary and fallback templates with versions and invariant constraints.
Chooses a tested alternative for the observed failure class.
Applies the same required schema, evidence, and policy checks to every strategy.
Measures branch usage, recovery success, added cost, and introduced regressions.
flowchart LR
P["Primary prompt"] --> V["Shared acceptance validator"]
V --> A["Accepted result"]
V --> C["Failure classification"]
C --> F["Approved fallback prompt"]
C --> H["Clarification or escalation"]
F --> V
I["Invariant policy and evidence requirements"] --> P
I --> F
B["Strategy attempt budget"] --> CExecute the normal prompt with the task's evidence and required constraints.
Determine whether the defect can plausibly be repaired through a different prompting approach.
Choose the mapped strategy without weakening policy or inventing missing data.
Preserve essential evidence and constraints while simplifying irrelevant instructions.
Apply the same acceptance tests used for the primary result.
Accept the supported output or terminate after the bounded strategy budget is exhausted.
Logistics documentation · Illustrative enterprise scenario, not a reported customer outcome.
A freight forwarder's assistant extracts shipment fields from documents with inconsistent layouts and multilingual notes.
The primary prompt occasionally mixes explanatory prose into a strict structured result or confuses optional fields with required ones.
The assistant must recover formatting and scope errors without guessing missing shipment identifiers.
A failure classifier selects a field-by-field extraction prompt only for known schema or coverage defects, using the same source passages.
If the shipment identifier is absent, the fallback returns unknown and requests clarification instead of manufacturing a plausible number.
Track fallback recovery by defect class, unsupported values, additional tokens, and document-type coverage. Prompt changes are justified by measured recovery rather than stylistic preference.
| Decision | Benefit | Cost |
|---|---|---|
| Simpler alternate prompts | Specific formatting or focus defects can recover. | Additional calls increase latency and spend. |
| Shared validation | Alternate strategies preserve the same correctness contract. | Some useful partial outputs still require explicit separate contracts. |
| Versioned strategies | Behavior remains testable and attributable. | Too many branches become difficult to evaluate and maintain. |
Detect: Invariant checks find missing evidence support.
Recover: Reject the output and repair the template before reuse.
Detect: Error classification identifies transport failure rather than content failure.
Recover: Use timeout and failover policy instead.
Preserve policy and distinguish legitimate clarification from evasion.
Limit strategy attempts and reserve finalization capacity.
Retrieve evidence or return unknown.