account_from_ocr
Selects the most appropriate expense account from a provided list based on data extracted from an invoice, returning the result in a specific JSON format for easy parsing. This prompt is useful for automating accounting tasks and ensuring accurate categorization of expenses.
Prompt Text
Given the following data extracted from an invoice by on ocr:
{data}
And the following list of expense accounts:
{accounts}
Act as an expert accountant and select the appropriate expense account for this invoice.
Answer using the following JSON schema:
{{"accountId": "number"}}
Guidelines:
- If you are unsure return null for that field
- Pick the account that's most specific to the invoice item. For example, for an invoice item "manteminiento mensual de ascensores" choose an account with code 622000099 and name Mantenimiento de ascensores over account with code 6222 and name Mantenimiento
- You must select only one account and return in JSON form.
- Do not use an array
- Ensure the returned JSON is a single-line JSON array ready for parsing with JavaScript's JSON.parse method.
- Returned JSON must not contain new lines neither be wrapped in a JSON code block
- **Do not include any extra formatting such as newlines, code block syntax, or wrappers like ```json.**
- Validate the output JSON to ensure it conforms to standard JSON syntax.Evaluation Results
1/28/2026
Overall Score
3.13/5
Average across all 3 models
Best Performing Model
Low Confidence
openai:gpt-5-mini
4.40/5
openai:gpt-5-mini
#1 Ranked
4.40
/5.00
adh
4.2
cla
5.0
com
4.0
In
1,165
Out
1,163
Cost
$0.0026
google:gemini-2.5-flash-lite
#2 Ranked
2.90
/5.00
adh
1.8
cla
4.9
com
1.9
In
1,235
Out
70
Cost
$0.0002
anthropic:claude-3-5-haiku
#3 Ranked
2.08
/5.00
adh
1.0
cla
4.2
com
1.1
In
1,300
Out
464
Cost
$0.0029
Test Case:
