propose_receipt_transaction
Turn receipt data into a proposed Beancount transaction, flagging low-confidence fields. Returns reviewable JSON without writing, so you can confirm details before committing the entry.
Instructions
Turn what you read off a staged receipt into a PROPOSED transaction.
You supply the reading and, for every field, how sure you are of it on a 0.0-1.0 scale. Be honest about the confidences — they are the whole mechanism. Anything below the floor comes back flagged rather than as a value, and the floor can be raised by argument but never lowered, so a low confidence is not a suggestion.
expense_account and paid_from_account are yours to choose:
categorisation is the part of this a model is genuinely good at. The book's
open directives are read here so that two failures which would otherwise
land AT THE WRITE — an account that was never opened, and an account pinned
to a currency this receipt is not in — arrive now, as a sentence, instead of
as a bean-check dump after the customer has already approved the entry.
exchange_rate is how much ONE unit of the receipt's currency cost in the
paying account's currency. Take it off the card statement; no rate is ever
invented here.
Returns JSON. It NEVER writes. Show the person the merchant, the date and
the total, ask about anything flagged, and only then pass beancount to
add_transactions unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tax | No | ||
| date | No | ||
| total | No | ||
| currency | No | ||
| merchant | No | ||
| receipt_key | No | ||
| exchange_rate | No | ||
| extracted_text | No | ||
| receipt_sha256 | Yes | ||
| tax_confidence | No | ||
| date_confidence | No | ||
| expense_account | No | ||
| line_items_json | No | ||
| confidence_floor | No | ||
| total_confidence | No | ||
| paid_from_account | No | ||
| operating_currency | No | ||
| currency_confidence | No | ||
| merchant_confidence | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |