← All recipesData and operations / PYTHON

Extract values without inventing them

Find the refund amount and scheduled date among several values in a document. Return exact source spans.

Up to 1 API requestsInputs: fictional, EnglishExternal actions: 0
01 / WORKFLOW

What the model decides. What code checks.

  1. Regular expressions find USD amounts and ISO dates. Calendar validation removes impossible dates before the request.
  2. Two Choice questions select the refund amount and its scheduled date. A none option allows abstention.
  3. Code checks the threshold, identifier, and source position. Decimal normalizes the amount without model arithmetic.
02 / LOCAL EXECUTION

Read. Run. Replay.

Unpack the archive and open its directory in a terminal. The first step needs neither a key nor a network connection.

1 · offline plan · 0 API requests
python3 runner.py value-extraction

For a real run, set SHVYDKO_API_KEY in your computer or server environment. Do not put the key in your browser or source code. Current account quotas and pricing apply.

2 · explicit live run
python3 runner.py value-extraction --live --output value-extraction-run.json

The report contains requests, actual responses, elapsed times, and known usage. The file is created with private permissions and never overwrites an existing file. Network failures are not automatically retried: check Usage before another call.

3 · replay saved responses · 0 API requests
python3 runner.py value-extraction --replay value-extraction-run.json

Replay checks that the recipe, inputs, and requests match. A local file is editable, so it is not signed proof of where responses came from. If you replace the inputs with your own data, the report will contain those data too: keep it private.

03 / REQUEST PLAN

An open contract, with every step visible.

The plan below was generated by the same runner from the bundled fixtures. It contains requests and author expectations, not model results.

offline-plan.json
{
  "mode": "offline_plan",
  "model_calls": 0,
  "recipe": "value-extraction",
  "author_expectation": {
    "amount": "USD 39.50",
    "scheduled_date": "2026-10-22"
  },
  "notice": "Requests only, no model answers. Hierarchy includes conditional branches; repetition requests are templates.",
  "requests": [
    {
      "state": {
        "text": "Original order total: USD 129.00, paid on 2026-10-01. Approved refund: USD 39.50, scheduled for 2026-10-22. Internal draft date 2026-02-30 is invalid and is not the scheduled date.",
        "amount_candidates": {
          "amount_0": {
            "value": "USD 129.00",
            "start": 22,
            "end": 32
          },
          "amount_1": {
            "value": "USD 39.50",
            "start": 71,
            "end": 80
          }
        },
        "valid_date_candidates": {
          "date_0": {
            "value": "2026-10-01",
            "start": 42,
            "end": 52
          },
          "date_1": {
            "value": "2026-10-22",
            "start": 96,
            "end": 106
          }
        }
      },
      "questions": {
        "amount": {
          "type": "choice",
          "instructions": "Select the approved refund amount, not the original order total.",
          "criteria": {
            "amount_0": "USD 129.00",
            "amount_1": "USD 39.50",
            "none": "No approved refund amount"
          }
        },
        "date": {
          "type": "choice",
          "instructions": "Select the scheduled refund date, not the original payment date.",
          "criteria": {
            "date_0": "2026-10-01",
            "date_1": "2026-10-22",
            "none": "No scheduled refund date"
          }
        }
      }
    }
  ]
}