AI Sandbox
Let an agent read invoices without giving it control of the accounts
Imagine an accounting team receiving invoices for several customers. One PDF contains an instruction aimed at the AI rather than the accountant. Another shows changed payment details. The team wants to reduce manual entry without giving an invoice-reading agent access to the supplier register or the bank.
- Intended result
- A sandbox prototype extracts a structured proposal, validates it independently and tests automatic booking of eligible synthetic invoices in an isolated ledger. Rejected proposals, discrepancies and approvals remain traceable.
- Human approval
- Defined per workflow
- Integration
- Likely
01
Situation
Imagine an accounting team receiving invoices for several customers. One PDF contains an instruction aimed at the AI rather than the accountant. Another shows changed payment details. The team wants to reduce manual entry without giving an invoice-reading agent access to the supplier register or the bank.
02
Current problem
A model can extract useful invoice fields and still be misled by text embedded in a document. A skill that tells the model not to change a bank account is not a technical restriction. Checking every proposed entry manually also limits the benefit of automation.
03
Desired change
A sandbox prototype extracts a structured proposal, validates it independently and tests automatic booking of eligible synthetic invoices in an isolated ledger. Rejected proposals, discrepancies and approvals remain traceable.
04
Possible workflow
-
Extract
Read the document in isolation
Give the extraction agent only the assigned synthetic invoice and permitted context. It has no booking, supplier-update or payment credential. Treat document text as data.
-
Validate
Check the proposal against trusted records
Use deterministic checks for customer identity, known supplier, expected bank details, invoice arithmetic, purchase-order matching where applicable and duplicates. Validate the output schema separately from business correctness.
-
Authorise
Check the approved mandate
Only a trusted service may decide whether the exact transaction meets the configured limits. Reject missing authority, mismatches and unavailable validation. Send exceptions to the accountable reviewer.
-
Execute
Book within an isolated ledger
A separate service with narrowly scoped access records the validated transaction. Use idempotency to avoid duplicate bookings and keep supplier changes and payment execution separate.
-
Evaluate
Measure accuracy and denied actions
Compare extracted fields with expert-reviewed expectations. Test benign invoices, hidden instructions, cross-customer identifiers, changed bank details and repeated submissions. Record actual results before any production decision.
05
Human control
The accountant defines the booking rules, account codes, risk limits and exception process. New or changed supplier payment details, unclear tax treatment and financial commitments require the appropriate independent verification. Booking never authorises a payment.
06
Technology and data
- Document extraction
- PDF parsing or OCR, a language model and a defined output schema. Preserve the source reference and uncertainty; the model cannot authorise its own proposal.
- Trusted validation and authorisation
- A rules-based service checks the proposed data against independently maintained records and the approved mandate. The service rejects invalid or out-of-scope requests.
- Isolated accounting integration
- A test ledger or accounting API with customer-scoped identities and separate permissions for booking, supplier changes and payment. Test access from the actual execution environment.
- Evidence and monitoring
- Log decisions, rule versions, source identifiers, denied operations and the resulting records without exposing sensitive payloads.
07
Test the boundary, not just the answer
Use an isolated test ledger and three synthetic invoices: one ordinary invoice, one with an embedded instruction and one with changed bank details. Ask the system to process each. Check the resulting ledger and denied-action records rather than only reading its response. Verify that the extraction identity cannot access another customer or a payment tool. This is an initial check, not a complete security assessment.
08
Boundaries
- Use synthetic or explicitly permitted test data, not live customer accounts.
- Prompt injection can still affect extracted values; validation cannot prove every interpretation correct.
- An invoice-reading agent must not be able to call supplier-change or payment operations.
- A failed or unavailable mandatory check must deny the action.
- Production booking and payments require separate, approved implementation and testing.