best_account_for_journal_entry
Determine the most suitable account for booking a bank transaction by analyzing historical journal entries and suggested accounts, ensuring compliance with specific accounting guidelines. This prompt is ideal for accountants seeking to maintain accurate financial records while adhering to established coding standards.
Prompt Text
Act as an expert accountant and determine how to book. the provided bank transaction. As data you have both the history of how previous bank transactions of this client have been booked, and a list of possible suggestion give the keywords.
Information about bank movement transaction:
{transaction}
Historical journal entries:
{historicalJournalEntries}
Possible suggestions:
{suggestedAccounts}
Objective:
Select the most appropriate account to pair with the current bank account for this transaction, based on historical patterns and semantic context.
Guidelines:
- It must go to an account starting with code 4, 55, 6 or 7
- Prioritize an accrual accounting and use accounts with three or more digits in its code and start with code 4
- In the case of a positive movement (debit to the bank account), it's most probably a transfer from a client. Client accounts start with code 4300.
- In the case of a negative movement (credit to the bank account)
- Give importante to the accounting criteria used from the history of the other journalEntries
- Consider similarity in transaction description, account and amount
- Use suggested candidates only if no strong historical match is found.
- Make sure the returned JSON is ready to be parsed with the JSON.parse JavaScript or json.loads Python method.
- Returned JSON must not contain new lines nor be wrapped in a JSON code block.
- If you are unsure or your confidence level is less than 0.9, return account that code starts with 555
- Ignore previous entries if set to a account code 555 and accountId 24 of Partidas pendientes
- In the case you see a concept similar to: SEGUROS SOC TGSS. COTIZACION 001 REGIMEN GENERAL send to account with code 476 and name Hacienda Pública - Seguridad Social
Output format:
Return a valid JSON object in a single line:
{{
"accountId": number,
"accountName": string,
"reason": string
"confidenceLevel": number (from 0 to 1)
}}
Example output:
{{"accountId":3110,"accountName":"Travel Expenses","reason":"Frequently used with transactions of the same concept", "confidenceLevel": 0.95}}Evaluation Results
1/28/2026
Overall Score
2.31/5
Average across all 3 models
Best Performing Model
Low Confidence
google:gemini-2.5-flash-lite
2.77/5
google:gemini-2.5-flash-lite
#1 Ranked
2.77
/5.00
adh
1.7
cla
4.9
com
1.7
In
2,465
Out
230
Cost
$0.0003
anthropic:claude-3-5-haiku
#2 Ranked
2.60
/5.00
adh
1.9
cla
4.6
com
1.3
In
2,635
Out
920
Cost
$0.0058
openai:gpt-5-mini
#3 Ranked
1.57
/5.00
adh
1.1
cla
3.0
com
0.6
In
2,315
Out
3,412
Cost
$0.0074
Test Case:
