| Original Filename: | Media_HQ_2_Ltd_VAT_Return_QE_31.08.2025_signed_1776242387.pdf |
| Upload Date: | April 15, 2026 at 08:55 AM |
| Total Pages: | 25 |
| Processing Status: | Completed |
| Total Documents: | 15 |
| Corporation Taxs: | 1 |
| Nominal Ledgers: | 5 |
| Invoices: | 8 |
| Bank Statements: | 1 |
Corporation Tax
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Invoice
85%Invoice
90%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Invoice
90%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
90%Nominal Ledger
95%Bank Statement
90%Nominal Ledger
95%Invoice
85%Nominal Ledger
90%Nominal Ledger
95%| Document Type | Pages | Confidence | Processing Status | Created | Actions |
|---|---|---|---|---|---|
| Corporation Tax | 1 (1 page) | 95% | Processed | 2026-04-15 08:55 | No view available |
| Nominal Ledger | 2-7 (6 pages) | 95% | Processed | 2026-04-15 08:55 | No view available |
| Invoice | 8 (1 page) | 90% | Processed | 2026-04-15 08:55 | View |
| Invoice | 8 (1 page) | 98% | Processed | 2026-04-15 08:55 | View |
| Invoice | 9 (1 page) | 95% | Processed | 2026-04-15 08:55 | View |
| Invoice | 9 (1 page) | 95% | Processed | 2026-04-15 08:55 | View |
| Nominal Ledger | 10-15 (6 pages) | 95% | Processed | 2026-04-15 08:55 | No view available |
| Invoice | 16 (1 page) | 95% | Processed | 2026-04-15 08:55 | View |
| Invoice | 16 (1 page) | 95% | Processed | 2026-04-15 08:55 | View |
| Invoice | 16 (1 page) | 95% | Processed | 2026-04-15 08:55 | View |
| Nominal Ledger | 17-20 (4 pages) | 94% | Processed | 2026-04-15 08:55 | No view available |
| Bank Statement | 21 (1 page) | 90% | Processed | 2026-04-15 08:55 | View |
| Nominal Ledger | 22 (1 page) | 95% | Processed | 2026-04-15 08:56 | No view available |
| Invoice | 23 (1 page) | 85% | Processed | 2026-04-15 08:56 | View |
| Nominal Ledger | 24-25 (2 pages) | 92% | Processed | 2026-04-15 08:56 | No view available |
{
"document_groups": [
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "corporation_tax",
"end_page": 1,
"pages": [
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains details related to a VAT return, including VAT calculations, VAT number, VAT scheme, and period covered by the return. These are key indicators of a corporation tax-related document, specifically a VAT return, which falls under the corporation_tax category.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqIysNT9f9TTgiB8AOeHucgPdmrJ\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains details related to a VAT return, including VAT calculations, VAT number, VAT scheme, and period covered by the return. These are key indicators of a corporation tax-related document, specifically a VAT return, which falls under the corporation_tax category.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243272, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=215, prompt_tokens=1345, total_tokens=1560, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=Pr"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains details related to a VAT return, including VAT calculations, VAT number, VAT scheme, and period covered by the return. These are key indicators of a corporation tax-related document, specifically a VAT return, which falls under the corporation_tax category.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains details related to a VAT return, including VAT calculations, VAT number, VAT scheme, and period covered by the return. These are key indicators of a corporation tax-related document, specifically a VAT return, which falls under the corporation_tax category.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "corporation_tax"
}
},
"page_number": 1,
"text_length": 1197
}
],
"start_page": 1
},
{
"avg_confidence": 0.9499999999999998,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "nominal_ledger",
"end_page": 7,
"pages": [
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account-level transactions categorized by VAT boxes, with references to accounts, VAT amounts, and net amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across accounts. There are no specific indicators of invoices, payroll, loan, or mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqIzKCfeOkZASsLorMZbfAiLx8Im\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed account-level transactions categorized by VAT boxes, with references to accounts, VAT amounts, and net amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across accounts. There are no specific indicators of invoices, payroll, loan, or mortgage statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243273, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=223, prompt_tokens=1808, total_tokens=2031, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_to"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed account-level transactions categorized by VAT boxes, with references to accounts, VAT amounts, and net amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across accounts. There are no specific indicators of invoices, payroll, loan, or mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account-level transactions categorized by VAT boxes, with references to accounts, VAT amounts, and net amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across accounts. There are no specific indicators of invoices, payroll, loan, or mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.04807692307692308,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "hp_agreement"
}
},
"page_number": 2,
"text_length": 2049
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027IT Software and Consumables(463)\u0027). This structure is characteristic of a nominal ledger or general ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ1fK6FYRYbHLEkER7xh5iRpVie\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \\\u0027Direct Expenses(325)\\\u0027, \\\u0027Subscriptions(485)\\\u0027, \\\u0027IT Software and Consumables(463)\\\u0027). This structure is characteristic of a nominal ledger or general ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243275, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=234, prompt_tokens=1811, total_tokens=2045, completion_tokens_details=CompletionTokensDetails(accepted_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed transaction records categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027IT Software and Consumables(463)\u0027). This structure is characteristic of a nominal ledger or general ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027IT Software and Consumables(463)\u0027). This structure is characteristic of a nominal ledger or general ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 3,
"text_length": 1990
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel - National, Audit \u0026 Accountancy) and includes account codes in parentheses (e.g., 463, 493, 401). This structure is indicative of a nominal ledger or general ledger, which tracks financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ3TSmyTmskOovaPICqGXf9p0rK\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel - National, Audit \u0026 Accountancy) and includes account codes in parentheses (e.g., 463, 493, 401). This structure is indicative of a nominal ledger or general ledger, which tracks financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243277, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1815, total_tokens=2061, completion_tokens_details=CompletionTokensDe"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel - National, Audit \u0026 Accountancy) and includes account codes in parentheses (e.g., 463, 493, 401). This structure is indicative of a nominal ledger or general ledger, which tracks financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel - National, Audit \u0026 Accountancy) and includes account codes in parentheses (e.g., 463, 493, 401). This structure is indicative of a nominal ledger or general ledger, which tracks financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 4,
"text_length": 2019
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed financial transactions categorized by accounts (e.g., \u0027Travel - National(493)\u0027, \u0027Direct Expenses(325)\u0027, \u0027Professional Fees(435)\u0027), VAT amounts, and net amounts. These are key indicators of a nominal ledger, which is used to record financial transactions and categorize them into accounts. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types listed.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ4akpAqyDDNhjLw8LYGBGYmZkq\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed financial transactions categorized by accounts (e.g., \\\u0027Travel - National(493)\\\u0027, \\\u0027Direct Expenses(325)\\\u0027, \\\u0027Professional Fees(435)\\\u0027), VAT amounts, and net amounts. These are key indicators of a nominal ledger, which is used to record financial transactions and categorize them into accounts. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types listed.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243278, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=245, prompt_tokens=1773, total_tokens=2018, completion_tokens_detail"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed financial transactions categorized by accounts (e.g., \u0027Travel - National(493)\u0027, \u0027Direct Expenses(325)\u0027, \u0027Professional Fees(435)\u0027), VAT amounts, and net amounts. These are key indicators of a nominal ledger, which is used to record financial transactions and categorize them into accounts. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types listed.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed financial transactions categorized by accounts (e.g., \u0027Travel - National(493)\u0027, \u0027Direct Expenses(325)\u0027, \u0027Professional Fees(435)\u0027), VAT amounts, and net amounts. These are key indicators of a nominal ledger, which is used to record financial transactions and categorize them into accounts. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types listed.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 5,
"text_length": 1975
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., Consumables(463), Consulting(412), Advertising \u0026 Marketing(400), etc.), which is a key indicator of a nominal ledger. It also includes transaction dates, descriptions, and amounts, which are typical components of a general ledger or nominal ledger. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types in the provided text.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ6I3ctp1KYwjltqJ3s4io9Lad3\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., Consumables(463), Consulting(412), Advertising \u0026 Marketing(400), etc.), which is a key indicator of a nominal ledger. It also includes transaction dates, descriptions, and amounts, which are typical components of a general ledger or nominal ledger. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types in the provided text.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243280, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=253, prompt_tokens=1887, total_tokens=214"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by account codes (e.g., Consumables(463), Consulting(412), Advertising \u0026 Marketing(400), etc.), which is a key indicator of a nominal ledger. It also includes transaction dates, descriptions, and amounts, which are typical components of a general ledger or nominal ledger. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types in the provided text.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., Consumables(463), Consulting(412), Advertising \u0026 Marketing(400), etc.), which is a key indicator of a nominal ledger. It also includes transaction dates, descriptions, and amounts, which are typical components of a general ledger or nominal ledger. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types in the provided text.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 6,
"text_length": 2135
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure aligns with a nominal ledger or general ledger, which records financial transactions by account codes and categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ85Jo19eYffhKpfI3DbuXwAc8x\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure aligns with a nominal ledger or general ledger, which records financial transactions by account codes and categories.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243282, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=224, prompt_tokens=1952, total_tokens=2176, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure aligns with a nominal ledger or general ledger, which records financial transactions by account codes and categories.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure aligns with a nominal ledger or general ledger, which records financial transactions by account codes and categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 7,
"text_length": 2249
}
],
"start_page": 2
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-08-06",
"invoice_number": "INV-0005",
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Halton Stairlifts",
"statement_period": null,
"total_amount": "14790.50"
},
"document_type": "invoice",
"end_page": 8,
"pages": [
{
"confidence_score": 0.85,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as an invoice number (INV-0005), a seller name (Halton Stairlifts), an invoice date (August 6, 2025), and a total amount (14,790.50). Additionally, the document includes line items with descriptions, VAT amounts, and net amounts, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0005\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"2025-08-06\",\n \"total_amount\": \"14790.50\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ97VIXMdZsdpiVXTPKfyy4nJaG\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as an invoice number (INV-0005), a seller name (Halton Stairlifts), an invoice date (August 6, 2025), and a total amount (14,790.50). Additionally, the document includes line items with descriptions, VAT amounts, and net amounts, which are typical of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"INV-0005\",\\n \"seller_name\": \"Halton Stairlifts\",\\n \"invoice_date\": \"2025-08-06\",\\n \"total_amount\": \"14790.50\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243283, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=256, prompt_tokens=1782, total_tokens=2038, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-08-06",
"invoice_number": "INV-0005",
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Halton Stairlifts",
"statement_period": null,
"total_amount": "14790.50"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as an invoice number (INV-0005), a seller name (Halton Stairlifts), an invoice date (August 6, 2025), and a total amount (14,790.50). Additionally, the document includes line items with descriptions, VAT amounts, and net amounts, which are typical of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as an invoice number (INV-0005), a seller name (Halton Stairlifts), an invoice date (August 6, 2025), and a total amount (14,790.50). Additionally, the document includes line items with descriptions, VAT amounts, and net amounts, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0005\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"2025-08-06\",\n \"total_amount\": \"14790.50\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 8,
"text_length": 1884
}
],
"start_page": 8
},
{
"avg_confidence": 0.9,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "06/05/2025",
"invoice_number": "INV-0007",
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Halton Stairlifts",
"statement_period": null,
"total_amount": "14,790.50"
},
"document_type": "invoice",
"end_page": 9,
"pages": [
{
"confidence_score": 0.9,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple invoice references (e.g., \u0027INV-0007\u0027, \u0027INV-0009\u0027), seller/company names (e.g., \u0027Halton Stairlifts\u0027, \u0027Crime Prevention Services (CPS)\u0027), invoice dates, and amounts. These are key indicators of an invoice document.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0007\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"06/05/2025\",\n \"total_amount\": \"14,790.50\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJBBRsjhg5Jp4MR4gY3IKolTXqH\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains multiple invoice references (e.g., \\\u0027INV-0007\\\u0027, \\\u0027INV-0009\\\u0027), seller/company names (e.g., \\\u0027Halton Stairlifts\\\u0027, \\\u0027Crime Prevention Services (CPS)\\\u0027), invoice dates, and amounts. These are key indicators of an invoice document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"INV-0007\",\\n \"seller_name\": \"Halton Stairlifts\",\\n \"invoice_date\": \"06/05/2025\",\\n \"total_amount\": \"14,790.50\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243285, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=240, prompt_tokens=1881, total_tokens=2121, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=Prom"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "06/05/2025",
"invoice_number": "INV-0007",
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Halton Stairlifts",
"statement_period": null,
"total_amount": "14,790.50"
},
"llm_reasoning": "The document contains multiple invoice references (e.g., \u0027INV-0007\u0027, \u0027INV-0009\u0027), seller/company names (e.g., \u0027Halton Stairlifts\u0027, \u0027Crime Prevention Services (CPS)\u0027), invoice dates, and amounts. These are key indicators of an invoice document.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple invoice references (e.g., \u0027INV-0007\u0027, \u0027INV-0009\u0027), seller/company names (e.g., \u0027Halton Stairlifts\u0027, \u0027Crime Prevention Services (CPS)\u0027), invoice dates, and amounts. These are key indicators of an invoice document.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0007\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"06/05/2025\",\n \"total_amount\": \"14,790.50\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.04807692307692308,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "hp_agreement"
}
},
"page_number": 9,
"text_length": 2189
}
],
"start_page": 9
},
{
"avg_confidence": 0.9499999999999998,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "nominal_ledger",
"end_page": 15,
"pages": [
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., IT Software, Travel - National, Advertising \u0026 Marketing) and includes VAT-related information. These are key indicators of a nominal ledger, which tracks financial transactions and categorizes them for accounting purposes. There are no specific identifiers for invoices, payroll, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJC2mKg5fw8TbrjJwvFpOVDjVH9\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., IT Software, Travel - National, Advertising \u0026 Marketing) and includes VAT-related information. These are key indicators of a nominal ledger, which tracks financial transactions and categorizes them for accounting purposes. There are no specific identifiers for invoices, payroll, or other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243286, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=233, prompt_tokens=1773, total_tokens=2006, completion_tokens_details=CompletionTokensDetails(acc"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by expense types (e.g., IT Software, Travel - National, Advertising \u0026 Marketing) and includes VAT-related information. These are key indicators of a nominal ledger, which tracks financial transactions and categorizes them for accounting purposes. There are no specific identifiers for invoices, payroll, or other document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., IT Software, Travel - National, Advertising \u0026 Marketing) and includes VAT-related information. These are key indicators of a nominal ledger, which tracks financial transactions and categorizes them for accounting purposes. There are no specific identifiers for invoices, payroll, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 10,
"text_length": 1912
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., \u0027Travel - National\u0027, \u0027Audit \u0026 Accountancy\u0027, \u0027Direct Expenses\u0027) and account codes (e.g., \u0027(493)\u0027, \u0027(401)\u0027, \u0027(325)\u0027). This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJEZTkeh28C56yhJPVo1YSIxiNx\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., \\\u0027Travel - National\\\u0027, \\\u0027Audit \u0026 Accountancy\\\u0027, \\\u0027Direct Expenses\\\u0027) and account codes (e.g., \\\u0027(493)\\\u0027, \\\u0027(401)\\\u0027, \\\u0027(325)\\\u0027). This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243288, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1883, total_tokens=2129, completion_tokens_detail"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by expense types (e.g., \u0027Travel - National\u0027, \u0027Audit \u0026 Accountancy\u0027, \u0027Direct Expenses\u0027) and account codes (e.g., \u0027(493)\u0027, \u0027(401)\u0027, \u0027(325)\u0027). This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., \u0027Travel - National\u0027, \u0027Audit \u0026 Accountancy\u0027, \u0027Direct Expenses\u0027) and account codes (e.g., \u0027(493)\u0027, \u0027(401)\u0027, \u0027(325)\u0027). This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 11,
"text_length": 2193
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account codes, references, and descriptions of transactions categorized by VAT boxes and expense types, which are key indicators of a nominal ledger. There are no explicit mentions of invoices, payroll, loans, or other specific document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJG2l3VLnQtMCO9OTOD69lSn9u8\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed account codes, references, and descriptions of transactions categorized by VAT boxes and expense types, which are key indicators of a nominal ledger. There are no explicit mentions of invoices, payroll, loans, or other specific document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243290, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1784, total_tokens=1996, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTok"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed account codes, references, and descriptions of transactions categorized by VAT boxes and expense types, which are key indicators of a nominal ledger. There are no explicit mentions of invoices, payroll, loans, or other specific document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account codes, references, and descriptions of transactions categorized by VAT boxes and expense types, which are key indicators of a nominal ledger. There are no explicit mentions of invoices, payroll, loans, or other specific document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 12,
"text_length": 2013
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel, Consulting) and includes VAT box references, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJHRU2wd0xW0WX48JN5PcMBTIvD\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel, Consulting) and includes VAT box references, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243291, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=220, prompt_tokens=1942, total_tokens=2162, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel, Consulting) and includes VAT box references, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel, Consulting) and includes VAT box references, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 2193
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJJr35MVT8ynSrRQGHlCYVbwPcR\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions categorized by accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243293, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=223, prompt_tokens=1878, total_tokens=2101, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tok"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions categorized by accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 14,
"text_length": 2092
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a list of transactions categorized by account codes (e.g., IT Software and Consumables(463), Travel - National(493), Insurance(433)), along with details such as dates, references, and amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across various accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJK4MVgxWuKyErVAoLtkWzvV4i2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a list of transactions categorized by account codes (e.g., IT Software and Consumables(463), Travel - National(493), Insurance(433)), along with details such as dates, references, and amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across various accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243294, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=229, prompt_tokens=1511, total_tokens=1740, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens="
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a list of transactions categorized by account codes (e.g., IT Software and Consumables(463), Travel - National(493), Insurance(433)), along with details such as dates, references, and amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across various accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a list of transactions categorized by account codes (e.g., IT Software and Consumables(463), Travel - National(493), Insurance(433)), along with details such as dates, references, and amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across various accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 15,
"text_length": 1253
}
],
"start_page": 10
},
{
"avg_confidence": 0.9,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "06/08/2025",
"invoice_number": "INV-0005",
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Halton Stairlifts",
"statement_period": null,
"total_amount": "17,748.60"
},
"document_type": "invoice",
"end_page": 16,
"pages": [
{
"confidence_score": 0.9,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple references to \u0027INV-\u0027 followed by numbers, which are typical invoice identifiers. It also includes details such as seller names (e.g., Halton Stairlifts), gross amounts, VAT, and net amounts, which are characteristic of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0005\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"06/08/2025\",\n \"total_amount\": \"17,748.60\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJM7lhgZQhELqOiRZMou7hwGffs\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains multiple references to \\\u0027INV-\\\u0027 followed by numbers, which are typical invoice identifiers. It also includes details such as seller names (e.g., Halton Stairlifts), gross amounts, VAT, and net amounts, which are characteristic of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"INV-0005\",\\n \"seller_name\": \"Halton Stairlifts\",\\n \"invoice_date\": \"06/08/2025\",\\n \"total_amount\": \"17,748.60\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243296, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=233, prompt_tokens=1764, total_tokens=1997, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_de"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "06/08/2025",
"invoice_number": "INV-0005",
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Halton Stairlifts",
"statement_period": null,
"total_amount": "17,748.60"
},
"llm_reasoning": "The document contains multiple references to \u0027INV-\u0027 followed by numbers, which are typical invoice identifiers. It also includes details such as seller names (e.g., Halton Stairlifts), gross amounts, VAT, and net amounts, which are characteristic of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple references to \u0027INV-\u0027 followed by numbers, which are typical invoice identifiers. It also includes details such as seller names (e.g., Halton Stairlifts), gross amounts, VAT, and net amounts, which are characteristic of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0005\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"06/08/2025\",\n \"total_amount\": \"17,748.60\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.11666666666666667,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.125,
"total_score": 0.11666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 16,
"text_length": 1789
}
],
"start_page": 16
},
{
"avg_confidence": 0.9375,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "nominal_ledger",
"end_page": 20,
"pages": [
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027Advertising \u0026 Marketing(400)\u0027). This structure is indicative of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJOObEcErrfN3xQdxe998iwsYWe\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., \\\u0027Direct Expenses(325)\\\u0027, \\\u0027Subscriptions(485)\\\u0027, \\\u0027Advertising \u0026 Marketing(400)\\\u0027). This structure is indicative of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243298, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=234, prompt_tokens=1765, total_tokens=1999, completion_tokens_details=CompletionTokensDetails(accepted_prediction_token"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027Advertising \u0026 Marketing(400)\u0027). This structure is indicative of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027Advertising \u0026 Marketing(400)\u0027). This structure is indicative of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 17,
"text_length": 1812
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027Travel - National(493)\u0027, \u0027IT Software and Consumables(463)\u0027, \u0027Audit \u0026 Accountancy fees(401)\u0027). This structure is characteristic of a nominal ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJPHz9oeuYB6VHv9L61iQ2ikoWE\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \\\u0027Travel - National(493)\\\u0027, \\\u0027IT Software and Consumables(463)\\\u0027, \\\u0027Audit \u0026 Accountancy fees(401)\\\u0027). This structure is characteristic of a nominal ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243299, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=237, prompt_tokens=1753, total_tokens=1990, completion_tokens_details=CompletionTokensDetails(accepted_pred"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed transaction records categorized by account codes (e.g., \u0027Travel - National(493)\u0027, \u0027IT Software and Consumables(463)\u0027, \u0027Audit \u0026 Accountancy fees(401)\u0027). This structure is characteristic of a nominal ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027Travel - National(493)\u0027, \u0027IT Software and Consumables(463)\u0027, \u0027Audit \u0026 Accountancy fees(401)\u0027). This structure is characteristic of a nominal ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 18,
"text_length": 1779
},
{
"confidence_score": 0.9,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by tax rates and expense types, which is characteristic of a nominal ledger. It includes account codes (e.g., National(493), Direct Expenses(325)), transaction dates, and amounts, but lacks identifiers specific to invoices, payroll, or other categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJRRiqYsi3pyc5VhPIzzuNBWGVG\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by tax rates and expense types, which is characteristic of a nominal ledger. It includes account codes (e.g., National(493), Direct Expenses(325)), transaction dates, and amounts, but lacks identifiers specific to invoices, payroll, or other categories.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243301, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=224, prompt_tokens=1717, total_tokens=1941, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_pred"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by tax rates and expense types, which is characteristic of a nominal ledger. It includes account codes (e.g., National(493), Direct Expenses(325)), transaction dates, and amounts, but lacks identifiers specific to invoices, payroll, or other categories.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by tax rates and expense types, which is characteristic of a nominal ledger. It includes account codes (e.g., National(493), Direct Expenses(325)), transaction dates, and amounts, but lacks identifiers specific to invoices, payroll, or other categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 19,
"text_length": 1647
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by expense types, tax rates, and vendors, which are key indicators of a nominal ledger. It includes account codes (e.g., Direct Expenses(325), Subscriptions(485)), VAT breakdowns, and adjustments, which are typical of general or nominal ledger reports.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJSCcMILVALTBhUtSRCSmtK1tOd\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed transaction records categorized by expense types, tax rates, and vendors, which are key indicators of a nominal ledger. It includes account codes (e.g., Direct Expenses(325), Subscriptions(485)), VAT breakdowns, and adjustments, which are typical of general or nominal ledger reports.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243302, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=225, prompt_tokens=1782, total_tokens=2007, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed transaction records categorized by expense types, tax rates, and vendors, which are key indicators of a nominal ledger. It includes account codes (e.g., Direct Expenses(325), Subscriptions(485)), VAT breakdowns, and adjustments, which are typical of general or nominal ledger reports.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by expense types, tax rates, and vendors, which are key indicators of a nominal ledger. It includes account codes (e.g., Direct Expenses(325), Subscriptions(485)), VAT breakdowns, and adjustments, which are typical of general or nominal ledger reports.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.11666666666666667,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.125,
"total_score": 0.11666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 20,
"text_length": 1845
}
],
"start_page": 17
},
{
"avg_confidence": 0.9,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01 Jun 2025 - 31 Aug 2025",
"total_amount": null
},
"document_type": "bank_statement",
"end_page": 21,
"pages": [
{
"confidence_score": 0.9,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains a list of transactions with dates, descriptions, and amounts, which are typical indicators of a bank statement. There are no invoice numbers, seller names, or other identifiers specific to invoices, nor are there details related to loans, mortgages, or hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJU8gJArGuXnT8Y582w7nLeLNi7\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains a list of transactions with dates, descriptions, and amounts, which are typical indicators of a bank statement. There are no invoice numbers, seller names, or other identifiers specific to invoices, nor are there details related to loans, mortgages, or hire purchase agreements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243304, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=229, prompt_tokens=1827, total_tokens=2056, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01 Jun 2025 - 31 Aug 2025",
"total_amount": null
},
"llm_reasoning": "The document contains a list of transactions with dates, descriptions, and amounts, which are typical indicators of a bank statement. There are no invoice numbers, seller names, or other identifiers specific to invoices, nor are there details related to loans, mortgages, or hire purchase agreements.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains a list of transactions with dates, descriptions, and amounts, which are typical indicators of a bank statement. There are no invoice numbers, seller names, or other identifiers specific to invoices, nor are there details related to loans, mortgages, or hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 21,
"text_length": 1884
}
],
"start_page": 21
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "nominal_ledger",
"end_page": 22,
"pages": [
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by tax rates and expense types (e.g., Travel, Consulting, IT Software, Advertising). It includes dates, amounts, and descriptions of transactions, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJW4fypL9MNXVOz07myl5kjCTwg\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by tax rates and expense types (e.g., Travel, Consulting, IT Software, Advertising). It includes dates, amounts, and descriptions of transactions, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243306, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=230, prompt_tokens=1859, total_tokens=2089, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by tax rates and expense types (e.g., Travel, Consulting, IT Software, Advertising). It includes dates, amounts, and descriptions of transactions, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by tax rates and expense types (e.g., Travel, Consulting, IT Software, Advertising). It includes dates, amounts, and descriptions of transactions, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 22,
"text_length": 1887
}
],
"start_page": 22
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "04/08/2025",
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Media HQ 2 Ltd",
"statement_period": "01 Jun 2025 - 31 Aug 2025",
"total_amount": "83.87"
},
"document_type": "invoice",
"end_page": 23,
"pages": [
{
"confidence_score": 0.85,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple transactions with details such as dates, seller names, and amounts. These are key indicators of an invoice. However, there is no explicit mention of an \u0027Invoice Number\u0027 or \u0027Invoice Date,\u0027 which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Media HQ 2 Ltd\",\n \"invoice_date\": \"04/08/2025\",\n \"total_amount\": \"83.87\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJXZLatbTbZo7iow35HtUG052oH\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document contains multiple transactions with details such as dates, seller names, and amounts. These are key indicators of an invoice. However, there is no explicit mention of an \\\u0027Invoice Number\\\u0027 or \\\u0027Invoice Date,\\\u0027 which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Media HQ 2 Ltd\",\\n \"invoice_date\": \"04/08/2025\",\\n \"total_amount\": \"83.87\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243307, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=235, prompt_tokens=1746, total_tokens=1981, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_to"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "04/08/2025",
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Media HQ 2 Ltd",
"statement_period": "01 Jun 2025 - 31 Aug 2025",
"total_amount": "83.87"
},
"llm_reasoning": "The document contains multiple transactions with details such as dates, seller names, and amounts. These are key indicators of an invoice. However, there is no explicit mention of an \u0027Invoice Number\u0027 or \u0027Invoice Date,\u0027 which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple transactions with details such as dates, seller names, and amounts. These are key indicators of an invoice. However, there is no explicit mention of an \u0027Invoice Number\u0027 or \u0027Invoice Date,\u0027 which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Media HQ 2 Ltd\",\n \"invoice_date\": \"04/08/2025\",\n \"total_amount\": \"83.87\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 23,
"text_length": 1690
}
],
"start_page": 23
},
{
"avg_confidence": 0.925,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "nominal_ledger",
"end_page": 25,
"pages": [
{
"confidence_score": 0.9,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027National(493)\u0027, \u0027Consumables(463)\u0027, \u0027Insurance(433)\u0027), which are typical of a nominal ledger. It also includes expense classifications, transaction dates, and amounts, which align with the structure of a general ledger or nominal ledger.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJZeScAdtfat3Zl3vj0N6lRiuSg\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \\\u0027National(493)\\\u0027, \\\u0027Consumables(463)\\\u0027, \\\u0027Insurance(433)\\\u0027), which are typical of a nominal ledger. It also includes expense classifications, transaction dates, and amounts, which align with the structure of a general ledger or nominal ledger.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243309, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=228, prompt_tokens=1763, total_tokens=1991, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejec"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed transaction records categorized by account codes (e.g., \u0027National(493)\u0027, \u0027Consumables(463)\u0027, \u0027Insurance(433)\u0027), which are typical of a nominal ledger. It also includes expense classifications, transaction dates, and amounts, which align with the structure of a general ledger or nominal ledger.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027National(493)\u0027, \u0027Consumables(463)\u0027, \u0027Insurance(433)\u0027), which are typical of a nominal ledger. It also includes expense classifications, transaction dates, and amounts, which align with the structure of a general ledger or nominal ledger.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "corporation_tax"
}
},
"page_number": 24,
"text_length": 1669
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by account codes (e.g., \u0027Staff Training(480)\u0027, \u0027Bank Fees(404)\u0027, \u0027Directors\u0027 Loan Account(835)\u0027), along with amounts and descriptions. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJaRGVcWjK0AtTaYZd1dABmYCLC\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by account codes (e.g., \\\u0027Staff Training(480)\\\u0027, \\\u0027Bank Fees(404)\\\u0027, \\\u0027Directors\\\u0027 Loan Account(835)\\\u0027), along with amounts and descriptions. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243310, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=227, prompt_tokens=1913, total_tokens=2140, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by account codes (e.g., \u0027Staff Training(480)\u0027, \u0027Bank Fees(404)\u0027, \u0027Directors\u0027 Loan Account(835)\u0027), along with amounts and descriptions. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by account codes (e.g., \u0027Staff Training(480)\u0027, \u0027Bank Fees(404)\u0027, \u0027Directors\u0027 Loan Account(835)\u0027), along with amounts and descriptions. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.06666666666666667,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 25,
"text_length": 2082
}
],
"start_page": 24
}
],
"page_classifications": [
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains details related to a VAT return, including VAT calculations, VAT number, VAT scheme, and period covered by the return. These are key indicators of a corporation tax-related document, specifically a VAT return, which falls under the corporation_tax category.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqIysNT9f9TTgiB8AOeHucgPdmrJ\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains details related to a VAT return, including VAT calculations, VAT number, VAT scheme, and period covered by the return. These are key indicators of a corporation tax-related document, specifically a VAT return, which falls under the corporation_tax category.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243272, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=215, prompt_tokens=1345, total_tokens=1560, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=Pr"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains details related to a VAT return, including VAT calculations, VAT number, VAT scheme, and period covered by the return. These are key indicators of a corporation tax-related document, specifically a VAT return, which falls under the corporation_tax category.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains details related to a VAT return, including VAT calculations, VAT number, VAT scheme, and period covered by the return. These are key indicators of a corporation tax-related document, specifically a VAT return, which falls under the corporation_tax category.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "corporation_tax"
}
},
"page_number": 1,
"text_length": 1197
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account-level transactions categorized by VAT boxes, with references to accounts, VAT amounts, and net amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across accounts. There are no specific indicators of invoices, payroll, loan, or mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqIzKCfeOkZASsLorMZbfAiLx8Im\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed account-level transactions categorized by VAT boxes, with references to accounts, VAT amounts, and net amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across accounts. There are no specific indicators of invoices, payroll, loan, or mortgage statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243273, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=223, prompt_tokens=1808, total_tokens=2031, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_to"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed account-level transactions categorized by VAT boxes, with references to accounts, VAT amounts, and net amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across accounts. There are no specific indicators of invoices, payroll, loan, or mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account-level transactions categorized by VAT boxes, with references to accounts, VAT amounts, and net amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across accounts. There are no specific indicators of invoices, payroll, loan, or mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.04807692307692308,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "hp_agreement"
}
},
"page_number": 2,
"text_length": 2049
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027IT Software and Consumables(463)\u0027). This structure is characteristic of a nominal ledger or general ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ1fK6FYRYbHLEkER7xh5iRpVie\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \\\u0027Direct Expenses(325)\\\u0027, \\\u0027Subscriptions(485)\\\u0027, \\\u0027IT Software and Consumables(463)\\\u0027). This structure is characteristic of a nominal ledger or general ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243275, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=234, prompt_tokens=1811, total_tokens=2045, completion_tokens_details=CompletionTokensDetails(accepted_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed transaction records categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027IT Software and Consumables(463)\u0027). This structure is characteristic of a nominal ledger or general ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027IT Software and Consumables(463)\u0027). This structure is characteristic of a nominal ledger or general ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 3,
"text_length": 1990
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel - National, Audit \u0026 Accountancy) and includes account codes in parentheses (e.g., 463, 493, 401). This structure is indicative of a nominal ledger or general ledger, which tracks financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ3TSmyTmskOovaPICqGXf9p0rK\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel - National, Audit \u0026 Accountancy) and includes account codes in parentheses (e.g., 463, 493, 401). This structure is indicative of a nominal ledger or general ledger, which tracks financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243277, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1815, total_tokens=2061, completion_tokens_details=CompletionTokensDe"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel - National, Audit \u0026 Accountancy) and includes account codes in parentheses (e.g., 463, 493, 401). This structure is indicative of a nominal ledger or general ledger, which tracks financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel - National, Audit \u0026 Accountancy) and includes account codes in parentheses (e.g., 463, 493, 401). This structure is indicative of a nominal ledger or general ledger, which tracks financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 4,
"text_length": 2019
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed financial transactions categorized by accounts (e.g., \u0027Travel - National(493)\u0027, \u0027Direct Expenses(325)\u0027, \u0027Professional Fees(435)\u0027), VAT amounts, and net amounts. These are key indicators of a nominal ledger, which is used to record financial transactions and categorize them into accounts. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types listed.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ4akpAqyDDNhjLw8LYGBGYmZkq\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed financial transactions categorized by accounts (e.g., \\\u0027Travel - National(493)\\\u0027, \\\u0027Direct Expenses(325)\\\u0027, \\\u0027Professional Fees(435)\\\u0027), VAT amounts, and net amounts. These are key indicators of a nominal ledger, which is used to record financial transactions and categorize them into accounts. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types listed.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243278, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=245, prompt_tokens=1773, total_tokens=2018, completion_tokens_detail"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed financial transactions categorized by accounts (e.g., \u0027Travel - National(493)\u0027, \u0027Direct Expenses(325)\u0027, \u0027Professional Fees(435)\u0027), VAT amounts, and net amounts. These are key indicators of a nominal ledger, which is used to record financial transactions and categorize them into accounts. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types listed.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed financial transactions categorized by accounts (e.g., \u0027Travel - National(493)\u0027, \u0027Direct Expenses(325)\u0027, \u0027Professional Fees(435)\u0027), VAT amounts, and net amounts. These are key indicators of a nominal ledger, which is used to record financial transactions and categorize them into accounts. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types listed.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 5,
"text_length": 1975
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., Consumables(463), Consulting(412), Advertising \u0026 Marketing(400), etc.), which is a key indicator of a nominal ledger. It also includes transaction dates, descriptions, and amounts, which are typical components of a general ledger or nominal ledger. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types in the provided text.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ6I3ctp1KYwjltqJ3s4io9Lad3\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., Consumables(463), Consulting(412), Advertising \u0026 Marketing(400), etc.), which is a key indicator of a nominal ledger. It also includes transaction dates, descriptions, and amounts, which are typical components of a general ledger or nominal ledger. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types in the provided text.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243280, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=253, prompt_tokens=1887, total_tokens=214"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by account codes (e.g., Consumables(463), Consulting(412), Advertising \u0026 Marketing(400), etc.), which is a key indicator of a nominal ledger. It also includes transaction dates, descriptions, and amounts, which are typical components of a general ledger or nominal ledger. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types in the provided text.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., Consumables(463), Consulting(412), Advertising \u0026 Marketing(400), etc.), which is a key indicator of a nominal ledger. It also includes transaction dates, descriptions, and amounts, which are typical components of a general ledger or nominal ledger. There are no specific indicators of invoices, payroll, loan, mortgage, or other document types in the provided text.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 6,
"text_length": 2135
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure aligns with a nominal ledger or general ledger, which records financial transactions by account codes and categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ85Jo19eYffhKpfI3DbuXwAc8x\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure aligns with a nominal ledger or general ledger, which records financial transactions by account codes and categories.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243282, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=224, prompt_tokens=1952, total_tokens=2176, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure aligns with a nominal ledger or general ledger, which records financial transactions by account codes and categories.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure aligns with a nominal ledger or general ledger, which records financial transactions by account codes and categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 7,
"text_length": 2249
},
{
"confidence_score": 0.85,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as an invoice number (INV-0005), a seller name (Halton Stairlifts), an invoice date (August 6, 2025), and a total amount (14,790.50). Additionally, the document includes line items with descriptions, VAT amounts, and net amounts, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0005\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"2025-08-06\",\n \"total_amount\": \"14790.50\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJ97VIXMdZsdpiVXTPKfyy4nJaG\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as an invoice number (INV-0005), a seller name (Halton Stairlifts), an invoice date (August 6, 2025), and a total amount (14,790.50). Additionally, the document includes line items with descriptions, VAT amounts, and net amounts, which are typical of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"INV-0005\",\\n \"seller_name\": \"Halton Stairlifts\",\\n \"invoice_date\": \"2025-08-06\",\\n \"total_amount\": \"14790.50\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243283, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=256, prompt_tokens=1782, total_tokens=2038, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-08-06",
"invoice_number": "INV-0005",
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Halton Stairlifts",
"statement_period": null,
"total_amount": "14790.50"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as an invoice number (INV-0005), a seller name (Halton Stairlifts), an invoice date (August 6, 2025), and a total amount (14,790.50). Additionally, the document includes line items with descriptions, VAT amounts, and net amounts, which are typical of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as an invoice number (INV-0005), a seller name (Halton Stairlifts), an invoice date (August 6, 2025), and a total amount (14,790.50). Additionally, the document includes line items with descriptions, VAT amounts, and net amounts, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0005\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"2025-08-06\",\n \"total_amount\": \"14790.50\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 8,
"text_length": 1884
},
{
"confidence_score": 0.9,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple invoice references (e.g., \u0027INV-0007\u0027, \u0027INV-0009\u0027), seller/company names (e.g., \u0027Halton Stairlifts\u0027, \u0027Crime Prevention Services (CPS)\u0027), invoice dates, and amounts. These are key indicators of an invoice document.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0007\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"06/05/2025\",\n \"total_amount\": \"14,790.50\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJBBRsjhg5Jp4MR4gY3IKolTXqH\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains multiple invoice references (e.g., \\\u0027INV-0007\\\u0027, \\\u0027INV-0009\\\u0027), seller/company names (e.g., \\\u0027Halton Stairlifts\\\u0027, \\\u0027Crime Prevention Services (CPS)\\\u0027), invoice dates, and amounts. These are key indicators of an invoice document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"INV-0007\",\\n \"seller_name\": \"Halton Stairlifts\",\\n \"invoice_date\": \"06/05/2025\",\\n \"total_amount\": \"14,790.50\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243285, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=240, prompt_tokens=1881, total_tokens=2121, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=Prom"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "06/05/2025",
"invoice_number": "INV-0007",
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Halton Stairlifts",
"statement_period": null,
"total_amount": "14,790.50"
},
"llm_reasoning": "The document contains multiple invoice references (e.g., \u0027INV-0007\u0027, \u0027INV-0009\u0027), seller/company names (e.g., \u0027Halton Stairlifts\u0027, \u0027Crime Prevention Services (CPS)\u0027), invoice dates, and amounts. These are key indicators of an invoice document.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple invoice references (e.g., \u0027INV-0007\u0027, \u0027INV-0009\u0027), seller/company names (e.g., \u0027Halton Stairlifts\u0027, \u0027Crime Prevention Services (CPS)\u0027), invoice dates, and amounts. These are key indicators of an invoice document.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0007\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"06/05/2025\",\n \"total_amount\": \"14,790.50\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.04807692307692308,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "hp_agreement"
}
},
"page_number": 9,
"text_length": 2189
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., IT Software, Travel - National, Advertising \u0026 Marketing) and includes VAT-related information. These are key indicators of a nominal ledger, which tracks financial transactions and categorizes them for accounting purposes. There are no specific identifiers for invoices, payroll, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJC2mKg5fw8TbrjJwvFpOVDjVH9\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., IT Software, Travel - National, Advertising \u0026 Marketing) and includes VAT-related information. These are key indicators of a nominal ledger, which tracks financial transactions and categorizes them for accounting purposes. There are no specific identifiers for invoices, payroll, or other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243286, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=233, prompt_tokens=1773, total_tokens=2006, completion_tokens_details=CompletionTokensDetails(acc"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by expense types (e.g., IT Software, Travel - National, Advertising \u0026 Marketing) and includes VAT-related information. These are key indicators of a nominal ledger, which tracks financial transactions and categorizes them for accounting purposes. There are no specific identifiers for invoices, payroll, or other document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., IT Software, Travel - National, Advertising \u0026 Marketing) and includes VAT-related information. These are key indicators of a nominal ledger, which tracks financial transactions and categorizes them for accounting purposes. There are no specific identifiers for invoices, payroll, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 10,
"text_length": 1912
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., \u0027Travel - National\u0027, \u0027Audit \u0026 Accountancy\u0027, \u0027Direct Expenses\u0027) and account codes (e.g., \u0027(493)\u0027, \u0027(401)\u0027, \u0027(325)\u0027). This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJEZTkeh28C56yhJPVo1YSIxiNx\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., \\\u0027Travel - National\\\u0027, \\\u0027Audit \u0026 Accountancy\\\u0027, \\\u0027Direct Expenses\\\u0027) and account codes (e.g., \\\u0027(493)\\\u0027, \\\u0027(401)\\\u0027, \\\u0027(325)\\\u0027). This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243288, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1883, total_tokens=2129, completion_tokens_detail"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by expense types (e.g., \u0027Travel - National\u0027, \u0027Audit \u0026 Accountancy\u0027, \u0027Direct Expenses\u0027) and account codes (e.g., \u0027(493)\u0027, \u0027(401)\u0027, \u0027(325)\u0027). This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by expense types (e.g., \u0027Travel - National\u0027, \u0027Audit \u0026 Accountancy\u0027, \u0027Direct Expenses\u0027) and account codes (e.g., \u0027(493)\u0027, \u0027(401)\u0027, \u0027(325)\u0027). This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 11,
"text_length": 2193
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account codes, references, and descriptions of transactions categorized by VAT boxes and expense types, which are key indicators of a nominal ledger. There are no explicit mentions of invoices, payroll, loans, or other specific document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJG2l3VLnQtMCO9OTOD69lSn9u8\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed account codes, references, and descriptions of transactions categorized by VAT boxes and expense types, which are key indicators of a nominal ledger. There are no explicit mentions of invoices, payroll, loans, or other specific document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243290, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1784, total_tokens=1996, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTok"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed account codes, references, and descriptions of transactions categorized by VAT boxes and expense types, which are key indicators of a nominal ledger. There are no explicit mentions of invoices, payroll, loans, or other specific document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account codes, references, and descriptions of transactions categorized by VAT boxes and expense types, which are key indicators of a nominal ledger. There are no explicit mentions of invoices, payroll, loans, or other specific document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 12,
"text_length": 2013
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel, Consulting) and includes VAT box references, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJHRU2wd0xW0WX48JN5PcMBTIvD\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel, Consulting) and includes VAT box references, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243291, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=220, prompt_tokens=1942, total_tokens=2162, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel, Consulting) and includes VAT box references, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., IT Software, Travel, Consulting) and includes VAT box references, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 2193
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJJr35MVT8ynSrRQGHlCYVbwPcR\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions categorized by accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243293, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=223, prompt_tokens=1878, total_tokens=2101, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tok"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions categorized by accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by expense types (e.g., Travel - National, IT Software and Consumables, Advertising \u0026 Marketing) and includes dates, descriptions, and amounts. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 14,
"text_length": 2092
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a list of transactions categorized by account codes (e.g., IT Software and Consumables(463), Travel - National(493), Insurance(433)), along with details such as dates, references, and amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across various accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJK4MVgxWuKyErVAoLtkWzvV4i2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a list of transactions categorized by account codes (e.g., IT Software and Consumables(463), Travel - National(493), Insurance(433)), along with details such as dates, references, and amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across various accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243294, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=229, prompt_tokens=1511, total_tokens=1740, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens="
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a list of transactions categorized by account codes (e.g., IT Software and Consumables(463), Travel - National(493), Insurance(433)), along with details such as dates, references, and amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across various accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a list of transactions categorized by account codes (e.g., IT Software and Consumables(463), Travel - National(493), Insurance(433)), along with details such as dates, references, and amounts. These are key indicators of a nominal ledger or general ledger, which tracks financial transactions across various accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 15,
"text_length": 1253
},
{
"confidence_score": 0.9,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple references to \u0027INV-\u0027 followed by numbers, which are typical invoice identifiers. It also includes details such as seller names (e.g., Halton Stairlifts), gross amounts, VAT, and net amounts, which are characteristic of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0005\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"06/08/2025\",\n \"total_amount\": \"17,748.60\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJM7lhgZQhELqOiRZMou7hwGffs\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains multiple references to \\\u0027INV-\\\u0027 followed by numbers, which are typical invoice identifiers. It also includes details such as seller names (e.g., Halton Stairlifts), gross amounts, VAT, and net amounts, which are characteristic of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"INV-0005\",\\n \"seller_name\": \"Halton Stairlifts\",\\n \"invoice_date\": \"06/08/2025\",\\n \"total_amount\": \"17,748.60\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243296, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=233, prompt_tokens=1764, total_tokens=1997, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_de"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "06/08/2025",
"invoice_number": "INV-0005",
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Halton Stairlifts",
"statement_period": null,
"total_amount": "17,748.60"
},
"llm_reasoning": "The document contains multiple references to \u0027INV-\u0027 followed by numbers, which are typical invoice identifiers. It also includes details such as seller names (e.g., Halton Stairlifts), gross amounts, VAT, and net amounts, which are characteristic of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple references to \u0027INV-\u0027 followed by numbers, which are typical invoice identifiers. It also includes details such as seller names (e.g., Halton Stairlifts), gross amounts, VAT, and net amounts, which are characteristic of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"INV-0005\",\n \"seller_name\": \"Halton Stairlifts\",\n \"invoice_date\": \"06/08/2025\",\n \"total_amount\": \"17,748.60\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.11666666666666667,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.125,
"total_score": 0.11666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 16,
"text_length": 1789
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027Advertising \u0026 Marketing(400)\u0027). This structure is indicative of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJOObEcErrfN3xQdxe998iwsYWe\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., \\\u0027Direct Expenses(325)\\\u0027, \\\u0027Subscriptions(485)\\\u0027, \\\u0027Advertising \u0026 Marketing(400)\\\u0027). This structure is indicative of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243298, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=234, prompt_tokens=1765, total_tokens=1999, completion_tokens_details=CompletionTokensDetails(accepted_prediction_token"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027Advertising \u0026 Marketing(400)\u0027). This structure is indicative of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by account codes (e.g., \u0027Direct Expenses(325)\u0027, \u0027Subscriptions(485)\u0027, \u0027Advertising \u0026 Marketing(400)\u0027). This structure is indicative of a nominal ledger or general ledger, which records financial transactions by account. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 17,
"text_length": 1812
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027Travel - National(493)\u0027, \u0027IT Software and Consumables(463)\u0027, \u0027Audit \u0026 Accountancy fees(401)\u0027). This structure is characteristic of a nominal ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJPHz9oeuYB6VHv9L61iQ2ikoWE\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \\\u0027Travel - National(493)\\\u0027, \\\u0027IT Software and Consumables(463)\\\u0027, \\\u0027Audit \u0026 Accountancy fees(401)\\\u0027). This structure is characteristic of a nominal ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243299, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=237, prompt_tokens=1753, total_tokens=1990, completion_tokens_details=CompletionTokensDetails(accepted_pred"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed transaction records categorized by account codes (e.g., \u0027Travel - National(493)\u0027, \u0027IT Software and Consumables(463)\u0027, \u0027Audit \u0026 Accountancy fees(401)\u0027). This structure is characteristic of a nominal ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027Travel - National(493)\u0027, \u0027IT Software and Consumables(463)\u0027, \u0027Audit \u0026 Accountancy fees(401)\u0027). This structure is characteristic of a nominal ledger, which tracks financial transactions across various accounts. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 18,
"text_length": 1779
},
{
"confidence_score": 0.9,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by tax rates and expense types, which is characteristic of a nominal ledger. It includes account codes (e.g., National(493), Direct Expenses(325)), transaction dates, and amounts, but lacks identifiers specific to invoices, payroll, or other categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJRRiqYsi3pyc5VhPIzzuNBWGVG\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by tax rates and expense types, which is characteristic of a nominal ledger. It includes account codes (e.g., National(493), Direct Expenses(325)), transaction dates, and amounts, but lacks identifiers specific to invoices, payroll, or other categories.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243301, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=224, prompt_tokens=1717, total_tokens=1941, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_pred"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by tax rates and expense types, which is characteristic of a nominal ledger. It includes account codes (e.g., National(493), Direct Expenses(325)), transaction dates, and amounts, but lacks identifiers specific to invoices, payroll, or other categories.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by tax rates and expense types, which is characteristic of a nominal ledger. It includes account codes (e.g., National(493), Direct Expenses(325)), transaction dates, and amounts, but lacks identifiers specific to invoices, payroll, or other categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03789473684210525,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 19,
"text_length": 1647
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by expense types, tax rates, and vendors, which are key indicators of a nominal ledger. It includes account codes (e.g., Direct Expenses(325), Subscriptions(485)), VAT breakdowns, and adjustments, which are typical of general or nominal ledger reports.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJSCcMILVALTBhUtSRCSmtK1tOd\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed transaction records categorized by expense types, tax rates, and vendors, which are key indicators of a nominal ledger. It includes account codes (e.g., Direct Expenses(325), Subscriptions(485)), VAT breakdowns, and adjustments, which are typical of general or nominal ledger reports.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243302, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=225, prompt_tokens=1782, total_tokens=2007, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed transaction records categorized by expense types, tax rates, and vendors, which are key indicators of a nominal ledger. It includes account codes (e.g., Direct Expenses(325), Subscriptions(485)), VAT breakdowns, and adjustments, which are typical of general or nominal ledger reports.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed transaction records categorized by expense types, tax rates, and vendors, which are key indicators of a nominal ledger. It includes account codes (e.g., Direct Expenses(325), Subscriptions(485)), VAT breakdowns, and adjustments, which are typical of general or nominal ledger reports.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.11666666666666667,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.125,
"total_score": 0.11666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 20,
"text_length": 1845
},
{
"confidence_score": 0.9,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains a list of transactions with dates, descriptions, and amounts, which are typical indicators of a bank statement. There are no invoice numbers, seller names, or other identifiers specific to invoices, nor are there details related to loans, mortgages, or hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJU8gJArGuXnT8Y582w7nLeLNi7\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains a list of transactions with dates, descriptions, and amounts, which are typical indicators of a bank statement. There are no invoice numbers, seller names, or other identifiers specific to invoices, nor are there details related to loans, mortgages, or hire purchase agreements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243304, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=229, prompt_tokens=1827, total_tokens=2056, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01 Jun 2025 - 31 Aug 2025",
"total_amount": null
},
"llm_reasoning": "The document contains a list of transactions with dates, descriptions, and amounts, which are typical indicators of a bank statement. There are no invoice numbers, seller names, or other identifiers specific to invoices, nor are there details related to loans, mortgages, or hire purchase agreements.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains a list of transactions with dates, descriptions, and amounts, which are typical indicators of a bank statement. There are no invoice numbers, seller names, or other identifiers specific to invoices, nor are there details related to loans, mortgages, or hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 21,
"text_length": 1884
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by tax rates and expense types (e.g., Travel, Consulting, IT Software, Advertising). It includes dates, amounts, and descriptions of transactions, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJW4fypL9MNXVOz07myl5kjCTwg\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed list of transactions categorized by tax rates and expense types (e.g., Travel, Consulting, IT Software, Advertising). It includes dates, amounts, and descriptions of transactions, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243306, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=230, prompt_tokens=1859, total_tokens=2089, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed list of transactions categorized by tax rates and expense types (e.g., Travel, Consulting, IT Software, Advertising). It includes dates, amounts, and descriptions of transactions, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed list of transactions categorized by tax rates and expense types (e.g., Travel, Consulting, IT Software, Advertising). It includes dates, amounts, and descriptions of transactions, which are typical of a nominal ledger or general ledger. There are no indicators of invoices, payroll, loan, or mortgage-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 22,
"text_length": 1887
},
{
"confidence_score": 0.85,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple transactions with details such as dates, seller names, and amounts. These are key indicators of an invoice. However, there is no explicit mention of an \u0027Invoice Number\u0027 or \u0027Invoice Date,\u0027 which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Media HQ 2 Ltd\",\n \"invoice_date\": \"04/08/2025\",\n \"total_amount\": \"83.87\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJXZLatbTbZo7iow35HtUG052oH\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document contains multiple transactions with details such as dates, seller names, and amounts. These are key indicators of an invoice. However, there is no explicit mention of an \\\u0027Invoice Number\\\u0027 or \\\u0027Invoice Date,\\\u0027 which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Media HQ 2 Ltd\",\\n \"invoice_date\": \"04/08/2025\",\\n \"total_amount\": \"83.87\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243307, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=235, prompt_tokens=1746, total_tokens=1981, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_to"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "04/08/2025",
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": "Media HQ 2 Ltd",
"statement_period": "01 Jun 2025 - 31 Aug 2025",
"total_amount": "83.87"
},
"llm_reasoning": "The document contains multiple transactions with details such as dates, seller names, and amounts. These are key indicators of an invoice. However, there is no explicit mention of an \u0027Invoice Number\u0027 or \u0027Invoice Date,\u0027 which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple transactions with details such as dates, seller names, and amounts. These are key indicators of an invoice. However, there is no explicit mention of an \u0027Invoice Number\u0027 or \u0027Invoice Date,\u0027 which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Media HQ 2 Ltd\",\n \"invoice_date\": \"04/08/2025\",\n \"total_amount\": \"83.87\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 Jun 2025 - 31 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.065,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 23,
"text_length": 1690
},
{
"confidence_score": 0.9,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027National(493)\u0027, \u0027Consumables(463)\u0027, \u0027Insurance(433)\u0027), which are typical of a nominal ledger. It also includes expense classifications, transaction dates, and amounts, which align with the structure of a general ledger or nominal ledger.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJZeScAdtfat3Zl3vj0N6lRiuSg\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \\\u0027National(493)\\\u0027, \\\u0027Consumables(463)\\\u0027, \\\u0027Insurance(433)\\\u0027), which are typical of a nominal ledger. It also includes expense classifications, transaction dates, and amounts, which align with the structure of a general ledger or nominal ledger.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243309, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=228, prompt_tokens=1763, total_tokens=1991, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejec"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed transaction records categorized by account codes (e.g., \u0027National(493)\u0027, \u0027Consumables(463)\u0027, \u0027Insurance(433)\u0027), which are typical of a nominal ledger. It also includes expense classifications, transaction dates, and amounts, which align with the structure of a general ledger or nominal ledger.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains detailed transaction records categorized by account codes (e.g., \u0027National(493)\u0027, \u0027Consumables(463)\u0027, \u0027Insurance(433)\u0027), which are typical of a nominal ledger. It also includes expense classifications, transaction dates, and amounts, which align with the structure of a general ledger or nominal ledger.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "corporation_tax"
}
},
"page_number": 24,
"text_length": 1669
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by account codes (e.g., \u0027Staff Training(480)\u0027, \u0027Bank Fees(404)\u0027, \u0027Directors\u0027 Loan Account(835)\u0027), along with amounts and descriptions. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DUqJaRGVcWjK0AtTaYZd1dABmYCLC\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by account codes (e.g., \\\u0027Staff Training(480)\\\u0027, \\\u0027Bank Fees(404)\\\u0027, \\\u0027Directors\\\u0027 Loan Account(835)\\\u0027), along with amounts and descriptions. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1776243310, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=227, prompt_tokens=1913, total_tokens=2140, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed breakdown of transactions categorized by account codes (e.g., \u0027Staff Training(480)\u0027, \u0027Bank Fees(404)\u0027, \u0027Directors\u0027 Loan Account(835)\u0027), along with amounts and descriptions. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions categorized by account codes (e.g., \u0027Staff Training(480)\u0027, \u0027Bank Fees(404)\u0027, \u0027Directors\u0027 Loan Account(835)\u0027), along with amounts and descriptions. This structure is characteristic of a nominal ledger or general ledger, which records financial transactions by account.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.06666666666666667,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 25,
"text_length": 2082
}
],
"processing_timestamp": "2026-04-15T08:55:12.236916"
}