VorkLab

LLM workflow optimization / implementation

Reuse completed steps

Keep completed LLM results when a later step fails.

When a later LLM step fails

Extract ticket fieldsStructured JSONHaiku 4.5Saved result
Summarize known factsRetrieved contextHaiku 4.5Saved result
Generate the answerRemaining LLM workSonnet 4.6Resume here
Completed steps are reused on retry.Reported calls per incoming task: 2.02

Reuse completed steps

A task_id connects model calls, retries, fallbacks, search requests and final status. Each call records the model, prompt version, step type, the four billing token categories, latency and retry reason.

Step-level checkpoints preserve completed results so a queue redelivery or a late-step timeout can reuse them. Search and tool results are cached using tenant_id, user permissions, query parameters and index version. Calls billed by the provider despite a timeout remain in the reported costs.

This change reduced repeated execution alongside model routing and context changes. The report does not isolate a dollar saving for checkpoints alone.

Read the execution trace

The example below shows completed extraction and summary results being reused when later work resumes. It illustrates the checkpoint mechanism; it is not a captured production trace. The calls-per-task measure reflects all changes in this case.

Agentic Code-Level Cloud & LLM Optimization
Request a free billing review

Accepted projects have no upfront service fee. Fixed fee: 30% of verified net savings over 12 agreed months, after approved transition and additional operating costs.