Guides

Answer routing and fallback when a check fails

Use this routing table in Assistant builder and in the test panel. One primary checked answer route, one source-only extractive fallback, two other fallback routes, and one rule for every failure. A failure never shows a blank answer, and a fallback never shows as a checked answer.

Tier selection before the primary route

Choose the tier from the retrieved set for that exact question, college, and assistant, before any checked answer call is made. The tier is never chosen from a guess in answer text. A longer retrieved set never widens the source list and never uses another college or another assistant.

Named tier, when used, primary route, and fallback on error or timeout
TierWhen usedPrimary routeFallback on error or timeout
Tier S, fast primary checkSimple lookup. One retrieved passage supports one factual sentence. The source is approved and current. There is no conflict and no stale source.Path P1 on the locked core default, with one assist call per answer record and a recheck of the single retrieved source at answer time.On timeout, service error, empty text, invalid output, or rate limit, check F1 first with no new call. Retry at most once with the same idempotency key only when F1 does not apply in full, then F2. The exact refusal applies only when the check completes with no support.
Tier C, stronger checkComplex multi-source answer. Two or more retrieved passages are needed, the question has more than one part, a staff draft reconciles more than one passage, or passages disagree or are stale and need a full recheck before the refusal path.Path P1 on the same locked core default as Tier S, with a full recheck of every retrieved source at answer time and a per-sentence citation check for every factual sentence.The same order as Tier S. On disagreement or a stale source, use the exact refusal and record not answered. A stronger check never widens the source list and never adds a fact with no retrieved passage.
Tier D, writing draftWrite a first draft, Make it plain, Translate to Spanish, Summarize, or Checklist from supplied text only.Supplied text only through the draft helper on the locked core default, labeled as draft, with no source list and no inline citation.On timeout, service error, or empty text, use safe template D1 below. A person edits before saving. A writing draft is never saved as a sourced answer.

Both checked answer tiers use the same locked core assist configuration. No external name is stated on this page and no name is added in Assistant builder text. The locked core holds the actual setting. No token cap, rate limit, or throttle is added by this page for any tier. Escalation from Tier S to Tier C is by the extra verification steps in Tier C, not by a different setting. A failure on any tier never moves the call to a different setting.

Order is primary checked answer, then one retry where allowed, then source-only extractive response, then saved source passage, then unavailable wording for a check that did not complete, or the exact refusal for a completed check with no support. Record answered, extractive fallback, not answered, unavailable, and rate limit separately.

One state model for every background job

Use the same states for checked answer generation, notification sends, and imports. A job is never left in a running state with no owner and no next step.

Job state, meaning, and allowed next state
StateMeaningAllowed next state
queuedAccepted, with an idempotency key stored, waiting for a worker. No answer, send, or import count is recorded yet.running, cancelled when the work is done, dead-letter when the queue entry is malformed or its key cannot be resolved
runningA worker holds a lease with a lease expiry time. The idempotency key is checked before any new record is created.succeeded, retry-wait, failed-explicit, dead-letter, cancelled
retry-waitA retryable failure was recorded. The next attempt time, attempt number, and reason are stored. The same key and request reference are reused.running when the next attempt time is reached, dead-letter when the attempt budget is exhausted
succeededThe record exists once. A repeated delivery with the same key returns the existing record and adds no second count, send, or saved passage.None. A changed question, assistant, wording version, source passage, cadence, or file creates a new key and a new job.
failed-explicitThe job completed as a failure with a plain reason shown to the person. For a question, this is unavailable. For a notification, this is a recorded suppression or cancellation. For an import, this is an incomplete import that is not counted as imported.queued only by a new person action, such as try again, resume, or reassign. Never automatic and never with a new key that hides the earlier failure.
dead-letterThe attempt budget is exhausted, the lease expired with no heartbeat, or the job cannot be resolved to one recipient, one workspace, or one record. The job is kept visible, flagged, and out of the automatic retry loop.queued only after a named person fixes the cause and chooses retry or discard. The dead-letter record stays in the audit history.

A job in queued, running, or retry-wait is in progress. A job in succeeded, failed-explicit, dead-letter, or cancelled is finished. The screen for that work shows which group the job is in, with the college workspace, assistant, and date range where those filters apply.

Idempotency: the same key returns the same record

Every retry reuses the key created for the first attempt. A retry never creates a second answer, a second send, a second saved passage, or a second import count.

Idempotency key by job type
JobKeyOn repeat with the same key
Checked answer generationCollege workspace, question record id, assistant id, wording version, and the sorted retrieved source ids with a hash of each passage, as stated in the app kit answer generation rulesReturn the existing answer record. Do not create a second count or a second saved passage. A new question record, changed question text, changed assistant, new wording version, or changed passage gets a new key.
Public form sendRequest reference stored with the form draft and sent as the request identifier on every attemptReuse the same reference on retry, so the retry does not create a duplicate request. After a confirmation, a second submit is blocked on that page.
Notification sendCollege workspace, recipient account, reminder kind, and topic id, with one unsent item per keyUpdate the unsent item and add to its count. Do not create a second send. Caps, quiet period, and suppression are stated on Notification preferences and do not change the key.
ImportFile fingerprint from the file text, plus the list of entry ids added by that importResume from the stored next entry index with the same file. A different file does not resume the earlier import. Discard removes only the entry ids added by that import.
  • Before a retry, look up the key. If a succeeded record exists for the key, return it and stop.
  • Store the key with the job at acceptance time, not at completion time, so a crash during the attempt cannot lose the key.
  • Never widen a key to another college, another assistant, or another recipient to make a retry succeed.

Retry rules: what retries, what never retries, and how the budget ends

A retry is allowed only for a failure that can change on the next attempt. Every other failure is explicit on the first attempt.

Failure type, retry decision, and record
FailureRetry decisionRecord and wording
Timeout, network failure, or non-JSON answerRetry within the attempt budget, with the same key. Record each attempt with its time and reason.Unavailable for a question, kept separate from not answered. It is not counted as a source gap and it is not counted as a sourced answer.
Retryable status 408, 502, 503, or 504Retry within the attempt budget. A 503 for a health check means not live or not ready, not a retry loop.The plain error sentence only, with no internal detail. Show live or not live, or ready or not ready, as the check states.
Rate limit 429Do not retry in a loop. Record rate limit separately and show wait guidance only from the server, with no exact wait time unless the server provides one.Unavailable with reason rate limit only when a question record was created. Do not claim no approved source covers the question.
Validation, 400, 401, 403, 404, or 409Do not retry. The person or the state must change first.The plain sentence for what to fix, with the status code and code name from the response standard. No data field on error.
Completed check with no supporting passageDo not retry the same key. The exact refusal wording is the finished result.Not answered, with the handoff office named. List no source under the exact refusal.
Source changed status during the checkDiscard the retrieved passages for that question and follow the exact refusal. Do not show an answer from a source whose status changed.Not answered for that question, with the source status check recorded.
  • The builder sets one attempt budget and one delay rule in code, documents both in the configuration manifest in the same change, and shows only the plain outcome on screen. Do not invent a budget or delay in page text.
  • Delays grow between attempts and add jitter, so retries do not arrive in a burst. A server wait time, where the server provides one, replaces the local delay for that attempt.
  • When the budget is exhausted, the job moves to dead-letter. It does not loop, it does not stay in running, and it does not vanish.

Stuck-in-progress detection and resume

A running job whose lease expires is treated as failed, not as still running. The next trigger reaps it before any new attempt starts.

  1. Lease every running job

    Store the worker identity and the lease expiry time when a job enters running. A heartbeat extends the lease only while the worker is alive.

  2. Reap expired leases on the next trigger

    When a job is read for retry, resume, reporting, or display, check the lease first. An expired lease with no heartbeat moves the job to retry-wait or dead-letter, based on the remaining attempt budget.

  3. Resume from stored progress, never from memory

    An import resumes from the stored next entry index. A notification queue resumes at the next release time. A checked answer resumes by returning the existing record for the key when one exists. Stored progress is the source of truth after a reload, a crash, or a worker change.

  4. Show in progress plainly where it is shown

    Where a screen shows an import, a save, or a check, show the count processed, the total, and the next step to resume or discard. A screen that shows no progress control must still show the finished or failed result, never a blank result.

Follow You are offline for the import resume and discard steps on this device, Notification preferences for the 08:00 release and priority order, and Test answers for the test paths before publishing.

Dead-letter handling: explicit failure with a named next step

Dead-letter is a finished state with a visible record, not a silent drop. The work item stays in its queue, flagged, until a named person fixes it.

Dead-letter cause, visible result, and named next step
CauseVisible resultNamed next step
Attempt budget exhausted for a checked answerUnavailable wording, with the handoff office named. No source is listed and no claim is made that no approved source covers the question.The person chooses try again once, or uses the handoff. Staff open the dead-letter record and fix the source, the assistant, or the connection before a new attempt.
Recipient does not resolve to one named accountNo send occurs. The item stays in its queue flagged unassigned, with a suppression record for that workspace, kind, topic id, and college local time.A named account is assigned as owner for that item. A role, an office, or a workspace is never used as a broadcast substitute.
Import storage failed or progress could not be savedImport incomplete, with the count processed and the total. The import is not counted as imported.Resume with the same file, or discard the incomplete import. Discard removes only the entry ids added by that import.
Import file does not match the incomplete import fingerprintNothing is added in that step. The incomplete import stays listed with its count.Choose the same file to resume, or discard the incomplete import. Do not start a second import over the first.
Notification cap, quiet period, or suppression blocks a sendThe send is queued or held as an in-app queue item, recorded with its reason. It is not sent the same day and it is not queued to a digest for a type with no digest.Release at 08:00 the next college day in priority order, subject to the daily cap, or cancel the pending item when the work is done.
  • Every dead-letter record holds the key, the college workspace, the attempt count, the last reason, and the college local time.
  • A dead-letter record never counts as answered, as a source gap, as a sent notification, or as an imported entry.
  • Reading a dead-letter record needs the same permission as reading the work it came from, and viewing it is audit logged where the app states that rule.

Checks before you ship a retry change

Run each check in a test workspace. If a check fails, fix it before you publish.

  • Send the same key twice and confirm one record, one count, and one saved passage
  • Stop a worker during a run, let the lease expire, and confirm the job moves to retry-wait or dead-letter instead of staying in running
  • Exhaust the attempt budget and confirm the job shows explicit failure with a named next step and no retry loop
  • Test a timeout, a retryable status, a rate limit, and a validation failure and confirm each outcome is recorded separately
  • Interrupt an import part way, reload, and confirm resume continues from the stored index with the same file and that a different file adds nothing
  • Discard an incomplete import and confirm only the entry ids added by that import are removed
  • Confirm a notification that cannot resolve to one named account sends nothing and stays flagged in its queue
  • Confirm a completed check with no support still shows the exact refusal and lists no source

Next guide

Test each failure path before you publish an assistant.