Skip to content
Felspar
Esc
↑↓navigate↵open⌘Jpreview
On this page

Retries and attempts

What an agent does when Felspar can't decide yet - the retry guidance, the attempt limit, and when to escalate.

Sometimes Felspar can’t decide yet: a question has no evidence, or the evidence was too vague to classify. The result then tells the agent exactly what to fix, and how many more tries it has before a person takes over. Felspar enforces the limit, so the agent doesn’t need to count.

Three kinds of result

Result Looks like The agent should
Decided outcome is set, and the outcome is a decision Report the outcome and its next step exactly
Held outcome is a review lane, such as review_policy_gap, with a next step that names a person or a lane Escalate with that next step. Don’t retry.
Not decided yet outcome is null; retry and attempts are present Follow retry while attempts.next is retry; escalate when it is escalate
Gap with missing Status gap, outcome is null, and missing names a required related record, such as missing: counterparty Find that record and send its ID under related with its quotes, or escalate

Whatever the kind, when the result carries escalation, the pack has named the hand-off for it. Report escalation.id exactly, with its why, and hand the case off; don’t ask again or decide yourself. See Subjects and escalations.

Some held outcomes tell the agent to gather more itself, such as “read the company’s Product, Pricing and How it works pages, then classify again once”. Follow that next step as written.

The retry guidance

An undecided result carries result.retry: only the questions still open, and for each:

  • fix: what to change;
  • notUsed: which of the agent’s excerpts weren’t used and why, by position in its list;
  • the answers Felspar can choose from, with what each means;
  • where the policy says to look.

It also carries result.nextStep: the pack’s own “when unresolved” instruction, quoted from the policy.

Attempts

A case is one caller, one job and one subject: one ticket, one contract, one company domain. Felspar keys it by the case ID after normalizing it by the subject’s match rule, so Northwind.com and northwind.com are the same case for a subject matched without case. Each request for a decision on a case is an attempt. result.attempts says:

Field Meaning
used Attempts made on this case so far
remaining Attempts left
next retry or escalate

The pack sets the limit (attempts.max, 3 by default), and the brief states it as attempts. Two rules keep retries honest:

  • Every attempt after the first must make progress: close a question, or quote a source (a source ID and locator) no earlier attempt used. An attempt that makes no progress escalates the case at once.
  • One extra attempt beyond the limit is allowed, but only after progress.

A request past the limit is refused before anything runs, with attempt_limit_reached. That means: stop and escalate. The refusal carries the escalation the pack names for the attempt limit (attempts.escalate, or the unresolved path’s); otherwise escalate with the next step from the last result. The result whose attempts.next is escalate already carries that escalation, with trigger: "attempt_limit"; earlier undecided results carry the unresolved one, with trigger: "unresolved".

Attempts on a case count from its last decision, within 24 hours. Resending the same request with the same execution ID is never counted twice.

How a good agent retries

  1. Look where whereToLook says for each open question.
  2. Replace or drop the excerpts listed in notUsed.
  3. Keep every excerpt that was used.
  4. Ask again with all its facts, not just the new ones.
  5. When next is escalate, stop and escalate with nextStep, and with escalation.id when the result carries one.

A gap still counts

A request that leaves out a required related record (status gap with missing) decides nothing and keeps nothing, but it counts as an attempt. Send the record the first time when the brief says a relationship is required.

Fixing a refused request is not an attempt

If a request is refused because it was malformed (a wrong field, an unknown question, an excerpt that’s too long), nothing was decided. Fix every listed issue and send again. That doesn’t use an attempt. See Refusal codes.

Retrying a case without its own ID

For a job that identifies cases by fields, by content or by an ID Felspar issues (identity modes), attempts count against the case ID Felspar works out, which every result returns as case.id.

  • Issued: the agent leaves the case ID out of its first request and sends the returned case.id with every retry. A first request whose excerpts are exactly the same text as a case the same caller opened on the job in the last 24 hours reuses that case, so starting over doesn’t reset its attempts. A caller may open at most 200 new issued cases per job in any 24 hours (issued_case_limit).
  • Fields: the same field values are the same case, whatever order they’re sent in.
  • Content: the same judged text is the same case. Changing the text of the question the identity names makes a new case.

What Felspar keeps

For each attempt, Felspar records the question keys and source locators only, never the text, and deletes attempt records after 30 days.

Was this page helpful?