| Original Filename: | Vat_detail_V2_1775543665.pdf |
| Upload Date: | April 07, 2026 at 07:38 AM |
| Total Pages: | 6 |
| Processing Status: | Failed |
| Total Documents: | 0 |
Invoice
90%Invoice
85%Invoice
90%Invoice
85%Nominal Ledger
95%Invoice
85%{
"document_groups": [
{
"avg_confidence": 0.9,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "28/02/2025",
"invoice_number": "1142",
"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": "Contemporary Cafe Bars Ltd",
"statement_period": null,
"total_amount": "5306.73"
},
"document_type": "invoice",
"end_page": 1,
"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 \u0027Invoice\u0027 along with invoice numbers, dates, VAT rates, net amounts, and total amounts. These are key indicators of an invoice document. Additionally, the presence of VAT details and sales transactions further supports this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": \"1142\",\n \"seller_name\": \"Contemporary Cafe Bars Ltd\",\n \"invoice_date\": \"28/02/2025\",\n \"total_amount\": \"5306.73\",\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-DRvIogw9SwdZf0gqCjxkwbldF452c\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 \\\u0027Invoice\\\u0027 along with invoice numbers, dates, VAT rates, net amounts, and total amounts. These are key indicators of an invoice document. Additionally, the presence of VAT details and sales transactions further supports this classification.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"1142\",\\n \"seller_name\": \"Contemporary Cafe Bars Ltd\",\\n \"invoice_date\": \"28/02/2025\",\\n \"total_amount\": \"5306.73\",\\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=1775547498, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=228, prompt_tokens=2467, total_tokens=2695, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "28/02/2025",
"invoice_number": "1142",
"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": "Contemporary Cafe Bars Ltd",
"statement_period": null,
"total_amount": "5306.73"
},
"llm_reasoning": "The document contains multiple references to \u0027Invoice\u0027 along with invoice numbers, dates, VAT rates, net amounts, and total amounts. These are key indicators of an invoice document. Additionally, the presence of VAT details and sales transactions further supports this classification.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple references to \u0027Invoice\u0027 along with invoice numbers, dates, VAT rates, net amounts, and total amounts. These are key indicators of an invoice document. Additionally, the presence of VAT details and sales transactions further supports this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": \"1142\",\n \"seller_name\": \"Contemporary Cafe Bars Ltd\",\n \"invoice_date\": \"28/02/2025\",\n \"total_amount\": \"5306.73\",\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.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.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.2222222222222222,
"pattern_score": 0.0,
"total_score": 0.13333333333333333
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "invoice"
}
},
"page_number": 1,
"text_length": 7425
}
],
"start_page": 1
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "25/12/2024",
"invoice_number": "IUKDN1099304707",
"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": "HP Instant Ink",
"statement_period": null,
"total_amount": "11.99"
},
"document_type": "invoice",
"end_page": 2,
"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 entries with details such as transaction dates, transaction types (e.g., \u0027Bill\u0027, \u0027Supplier Credit\u0027, \u0027Expense\u0027), invoice numbers (e.g., \u0027IUKDN1099304707\u0027, \u00273597247\u0027, \u0027186954035\u0027), seller names (e.g., \u0027HP Instant Ink\u0027, \u0027makro\u0027, \u0027Booker Limited\u0027), VAT codes, VAT rates, net amounts, and total amounts. These are key indicators of an invoice or a VAT detail report, which is closely related to invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"IUKDN1099304707\",\n \"seller_name\": \"HP Instant Ink\",\n \"invoice_date\": \"25/12/2024\",\n \"total_amount\": \"11.99\",\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-DRvIqb1MjyrdkZYVrziQZxgGi25o2\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 entries with details such as transaction dates, transaction types (e.g., \\\u0027Bill\\\u0027, \\\u0027Supplier Credit\\\u0027, \\\u0027Expense\\\u0027), invoice numbers (e.g., \\\u0027IUKDN1099304707\\\u0027, \\\u00273597247\\\u0027, \\\u0027186954035\\\u0027), seller names (e.g., \\\u0027HP Instant Ink\\\u0027, \\\u0027makro\\\u0027, \\\u0027Booker Limited\\\u0027), VAT codes, VAT rates, net amounts, and total amounts. These are key indicators of an invoice or a VAT detail report, which is closely related to invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"IUKDN1099304707\",\\n \"seller_name\": \"HP Instant Ink\",\\n \"invoice_date\": \"25/12/2024\",\\n \"total_amount\": \"11.99\",\\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=1775547500, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=286, prompt_tokens=2623,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "25/12/2024",
"invoice_number": "IUKDN1099304707",
"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": "HP Instant Ink",
"statement_period": null,
"total_amount": "11.99"
},
"llm_reasoning": "The document contains multiple entries with details such as transaction dates, transaction types (e.g., \u0027Bill\u0027, \u0027Supplier Credit\u0027, \u0027Expense\u0027), invoice numbers (e.g., \u0027IUKDN1099304707\u0027, \u00273597247\u0027, \u0027186954035\u0027), seller names (e.g., \u0027HP Instant Ink\u0027, \u0027makro\u0027, \u0027Booker Limited\u0027), VAT codes, VAT rates, net amounts, and total amounts. These are key indicators of an invoice or a VAT detail report, which is closely related to invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple entries with details such as transaction dates, transaction types (e.g., \u0027Bill\u0027, \u0027Supplier Credit\u0027, \u0027Expense\u0027), invoice numbers (e.g., \u0027IUKDN1099304707\u0027, \u00273597247\u0027, \u0027186954035\u0027), seller names (e.g., \u0027HP Instant Ink\u0027, \u0027makro\u0027, \u0027Booker Limited\u0027), VAT codes, VAT rates, net amounts, and total amounts. These are key indicators of an invoice or a VAT detail report, which is closely related to invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"IUKDN1099304707\",\n \"seller_name\": \"HP Instant Ink\",\n \"invoice_date\": \"25/12/2024\",\n \"total_amount\": \"11.99\",\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.13,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.07692307692307693,
"pattern_score": 0.0,
"total_score": 0.046153846153846156
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "nominal_ledger"
}
},
"page_number": 2,
"text_length": 7597
}
],
"start_page": 2
},
{
"avg_confidence": 0.9,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "05/02/2025",
"invoice_number": "006208589",
"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": "BURMA BACON SUPPLIES",
"statement_period": null,
"total_amount": "79.03"
},
"document_type": "invoice",
"end_page": 3,
"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 bills, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and total amounts, which are key indicators of an invoice document. Additionally, the presence of transaction details such as \u0027Bill\u0027, \u0027Supplier Credit\u0027, and \u0027VAT Detail Report\u0027 further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"006208589\",\n \"seller_name\": \"BURMA BACON SUPPLIES\",\n \"invoice_date\": \"05/02/2025\",\n \"total_amount\": \"79.03\",\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-DRvIsfnj7EAicNL3rezOMNwLyPZMz\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 bills, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and total amounts, which are key indicators of an invoice document. Additionally, the presence of transaction details such as \\\u0027Bill\\\u0027, \\\u0027Supplier Credit\\\u0027, and \\\u0027VAT Detail Report\\\u0027 further supports the classification as an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"006208589\",\\n \"seller_name\": \"BURMA BACON SUPPLIES\",\\n \"invoice_date\": \"05/02/2025\",\\n \"total_amount\": \"79.03\",\\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=1775547502, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=2626, total_tokens=2872, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "05/02/2025",
"invoice_number": "006208589",
"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": "BURMA BACON SUPPLIES",
"statement_period": null,
"total_amount": "79.03"
},
"llm_reasoning": "The document contains multiple references to bills, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and total amounts, which are key indicators of an invoice document. Additionally, the presence of transaction details such as \u0027Bill\u0027, \u0027Supplier Credit\u0027, and \u0027VAT Detail Report\u0027 further supports the classification as an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple references to bills, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and total amounts, which are key indicators of an invoice document. Additionally, the presence of transaction details such as \u0027Bill\u0027, \u0027Supplier Credit\u0027, and \u0027VAT Detail Report\u0027 further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"006208589\",\n \"seller_name\": \"BURMA BACON SUPPLIES\",\n \"invoice_date\": \"05/02/2025\",\n \"total_amount\": \"79.03\",\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.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.2222222222222222,
"pattern_score": 0.0,
"total_score": 0.13333333333333333
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "invoice"
}
},
"page_number": 3,
"text_length": 7229
}
],
"start_page": 3
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "Multiple dates detected, e.g., 06/12/2024, 07/12/2024, 18/12/2024, etc.",
"invoice_number": "Multiple invoice numbers detected, e.g., 3595335, 186946917, INV1435498, etc.",
"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": "Multiple seller names detected, e.g., Booker Limited, Lidl, Amazon, etc.",
"statement_period": null,
"total_amount": "Total amounts are not explicitly summarized but can be inferred from the \u0027BALANCE\u0027 column, e.g., 6,926.27, 7,330.51, etc."
},
"document_type": "invoice",
"end_page": 4,
"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 references to \u0027Bill\u0027, \u0027Invoice\u0027, \u0027Supplier Credit\u0027, and \u0027Transaction Type\u0027, which are key indicators of an invoice. Additionally, it includes details such as transaction dates, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and balances, which are typical components of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"Multiple invoice numbers detected, e.g., 3595335, 186946917, INV1435498, etc.\",\n \"seller_name\": \"Multiple seller names detected, e.g., Booker Limited, Lidl, Amazon, etc.\",\n \"invoice_date\": \"Multiple dates detected, e.g., 06/12/2024, 07/12/2024, 18/12/2024, etc.\",\n \"total_amount\": \"Total amounts are not explicitly summarized but can be inferred from the \u0027BALANCE\u0027 column, e.g., 6,926.27, 7,330.51, etc.\",\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-DRvItqWn30DmHAVU8Cb68ynBgGBB2\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 references to \\\u0027Bill\\\u0027, \\\u0027Invoice\\\u0027, \\\u0027Supplier Credit\\\u0027, and \\\u0027Transaction Type\\\u0027, which are key indicators of an invoice. Additionally, it includes details such as transaction dates, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and balances, which are typical components of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"Multiple invoice numbers detected, e.g., 3595335, 186946917, INV1435498, etc.\",\\n \"seller_name\": \"Multiple seller names detected, e.g., Booker Limited, Lidl, Amazon, etc.\",\\n \"invoice_date\": \"Multiple dates detected, e.g., 06/12/2024, 07/12/2024, 18/12/2024, etc.\",\\n \"total_amount\": \"Total amounts are not explicitly summarized but can be inferred from the \\\u0027BALANCE\\\u0027 column, e.g., 6,926.27, 7,330.51, etc.\",\\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}})], crea"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "Multiple dates detected, e.g., 06/12/2024, 07/12/2024, 18/12/2024, etc.",
"invoice_number": "Multiple invoice numbers detected, e.g., 3595335, 186946917, INV1435498, etc.",
"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": "Multiple seller names detected, e.g., Booker Limited, Lidl, Amazon, etc.",
"statement_period": null,
"total_amount": "Total amounts are not explicitly summarized but can be inferred from the \u0027BALANCE\u0027 column, e.g., 6,926.27, 7,330.51, etc."
},
"llm_reasoning": "The document contains multiple references to \u0027Bill\u0027, \u0027Invoice\u0027, \u0027Supplier Credit\u0027, and \u0027Transaction Type\u0027, which are key indicators of an invoice. Additionally, it includes details such as transaction dates, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and balances, which are typical components of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple references to \u0027Bill\u0027, \u0027Invoice\u0027, \u0027Supplier Credit\u0027, and \u0027Transaction Type\u0027, which are key indicators of an invoice. Additionally, it includes details such as transaction dates, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and balances, which are typical components of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"Multiple invoice numbers detected, e.g., 3595335, 186946917, INV1435498, etc.\",\n \"seller_name\": \"Multiple seller names detected, e.g., Booker Limited, Lidl, Amazon, etc.\",\n \"invoice_date\": \"Multiple dates detected, e.g., 06/12/2024, 07/12/2024, 18/12/2024, etc.\",\n \"total_amount\": \"Total amounts are not explicitly summarized but can be inferred from the \u0027BALANCE\u0027 column, e.g., 6,926.27, 7,330.51, etc.\",\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.13,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "nominal_ledger"
}
},
"page_number": 4,
"text_length": 6367
}
],
"start_page": 4
},
{
"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": 5,
"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, including transaction types, VAT codes, VAT rates, net amounts, and balances. These are key indicators of a nominal ledger or VAT detail report, which is used for accounting purposes to track financial transactions and VAT details. There are no specific identifiers for invoices, hire purchase agreements, 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-DRvIv92QXR4oKQbrbGDjL5bjS7aBV\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, including transaction types, VAT codes, VAT rates, net amounts, and balances. These are key indicators of a nominal ledger or VAT detail report, which is used for accounting purposes to track financial transactions and VAT details. There are no specific identifiers for invoices, hire purchase agreements, 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=1775547505, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=234, prompt_tokens=2536, total_tokens=2770, completion_tokens_details=CompletionTokensDetails(accepted_p"
},
"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, including transaction types, VAT codes, VAT rates, net amounts, and balances. These are key indicators of a nominal ledger or VAT detail report, which is used for accounting purposes to track financial transactions and VAT details. There are no specific identifiers for invoices, hire purchase agreements, or other document types listed.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions, including transaction types, VAT codes, VAT rates, net amounts, and balances. These are key indicators of a nominal ledger or VAT detail report, which is used for accounting purposes to track financial transactions and VAT details. There are no specific identifiers for invoices, hire purchase agreements, 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": "both_agree",
"pattern_based": {
"confidence": 0.13,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.07692307692307693,
"pattern_score": 0.0,
"total_score": 0.046153846153846156
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "nominal_ledger"
}
},
"page_number": 5,
"text_length": 6587
}
],
"start_page": 5
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "23/02/2025",
"invoice_number": "186994583",
"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": "Costco",
"statement_period": null,
"total_amount": "28816.95"
},
"document_type": "invoice",
"end_page": 6,
"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 references to \u0027Bill\u0027 transactions with details such as invoice numbers, seller names, VAT codes, VAT rates, and net amounts. These are key indicators of an invoice or a VAT-related purchase report. The presence of terms like \u0027Total for Box 7 Net value of purchases\u0027 and \u0027tax return\u0027 further supports this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": \"186994583\",\n \"seller_name\": \"Costco\",\n \"invoice_date\": \"23/02/2025\",\n \"total_amount\": \"28816.95\",\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-DRvIwljhLW0NVXbAFk2dVIIMS91ie\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 references to \\\u0027Bill\\\u0027 transactions with details such as invoice numbers, seller names, VAT codes, VAT rates, and net amounts. These are key indicators of an invoice or a VAT-related purchase report. The presence of terms like \\\u0027Total for Box 7 Net value of purchases\\\u0027 and \\\u0027tax return\\\u0027 further supports this classification.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"186994583\",\\n \"seller_name\": \"Costco\",\\n \"invoice_date\": \"23/02/2025\",\\n \"total_amount\": \"28816.95\",\\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=1775547506, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1651, total_tokens=1897, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, au"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "23/02/2025",
"invoice_number": "186994583",
"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": "Costco",
"statement_period": null,
"total_amount": "28816.95"
},
"llm_reasoning": "The document contains multiple references to \u0027Bill\u0027 transactions with details such as invoice numbers, seller names, VAT codes, VAT rates, and net amounts. These are key indicators of an invoice or a VAT-related purchase report. The presence of terms like \u0027Total for Box 7 Net value of purchases\u0027 and \u0027tax return\u0027 further supports this classification.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple references to \u0027Bill\u0027 transactions with details such as invoice numbers, seller names, VAT codes, VAT rates, and net amounts. These are key indicators of an invoice or a VAT-related purchase report. The presence of terms like \u0027Total for Box 7 Net value of purchases\u0027 and \u0027tax return\u0027 further supports this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": \"186994583\",\n \"seller_name\": \"Costco\",\n \"invoice_date\": \"23/02/2025\",\n \"total_amount\": \"28816.95\",\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.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.2222222222222222,
"pattern_score": 0.0,
"total_score": 0.13333333333333333
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": 6,
"text_length": 1403
}
],
"start_page": 6
}
],
"page_classifications": [
{
"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 \u0027Invoice\u0027 along with invoice numbers, dates, VAT rates, net amounts, and total amounts. These are key indicators of an invoice document. Additionally, the presence of VAT details and sales transactions further supports this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": \"1142\",\n \"seller_name\": \"Contemporary Cafe Bars Ltd\",\n \"invoice_date\": \"28/02/2025\",\n \"total_amount\": \"5306.73\",\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-DRvIogw9SwdZf0gqCjxkwbldF452c\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 \\\u0027Invoice\\\u0027 along with invoice numbers, dates, VAT rates, net amounts, and total amounts. These are key indicators of an invoice document. Additionally, the presence of VAT details and sales transactions further supports this classification.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"1142\",\\n \"seller_name\": \"Contemporary Cafe Bars Ltd\",\\n \"invoice_date\": \"28/02/2025\",\\n \"total_amount\": \"5306.73\",\\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=1775547498, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=228, prompt_tokens=2467, total_tokens=2695, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "28/02/2025",
"invoice_number": "1142",
"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": "Contemporary Cafe Bars Ltd",
"statement_period": null,
"total_amount": "5306.73"
},
"llm_reasoning": "The document contains multiple references to \u0027Invoice\u0027 along with invoice numbers, dates, VAT rates, net amounts, and total amounts. These are key indicators of an invoice document. Additionally, the presence of VAT details and sales transactions further supports this classification.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple references to \u0027Invoice\u0027 along with invoice numbers, dates, VAT rates, net amounts, and total amounts. These are key indicators of an invoice document. Additionally, the presence of VAT details and sales transactions further supports this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": \"1142\",\n \"seller_name\": \"Contemporary Cafe Bars Ltd\",\n \"invoice_date\": \"28/02/2025\",\n \"total_amount\": \"5306.73\",\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.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.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.2222222222222222,
"pattern_score": 0.0,
"total_score": 0.13333333333333333
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "invoice"
}
},
"page_number": 1,
"text_length": 7425
},
{
"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 entries with details such as transaction dates, transaction types (e.g., \u0027Bill\u0027, \u0027Supplier Credit\u0027, \u0027Expense\u0027), invoice numbers (e.g., \u0027IUKDN1099304707\u0027, \u00273597247\u0027, \u0027186954035\u0027), seller names (e.g., \u0027HP Instant Ink\u0027, \u0027makro\u0027, \u0027Booker Limited\u0027), VAT codes, VAT rates, net amounts, and total amounts. These are key indicators of an invoice or a VAT detail report, which is closely related to invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"IUKDN1099304707\",\n \"seller_name\": \"HP Instant Ink\",\n \"invoice_date\": \"25/12/2024\",\n \"total_amount\": \"11.99\",\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-DRvIqb1MjyrdkZYVrziQZxgGi25o2\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 entries with details such as transaction dates, transaction types (e.g., \\\u0027Bill\\\u0027, \\\u0027Supplier Credit\\\u0027, \\\u0027Expense\\\u0027), invoice numbers (e.g., \\\u0027IUKDN1099304707\\\u0027, \\\u00273597247\\\u0027, \\\u0027186954035\\\u0027), seller names (e.g., \\\u0027HP Instant Ink\\\u0027, \\\u0027makro\\\u0027, \\\u0027Booker Limited\\\u0027), VAT codes, VAT rates, net amounts, and total amounts. These are key indicators of an invoice or a VAT detail report, which is closely related to invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"IUKDN1099304707\",\\n \"seller_name\": \"HP Instant Ink\",\\n \"invoice_date\": \"25/12/2024\",\\n \"total_amount\": \"11.99\",\\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=1775547500, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=286, prompt_tokens=2623,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "25/12/2024",
"invoice_number": "IUKDN1099304707",
"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": "HP Instant Ink",
"statement_period": null,
"total_amount": "11.99"
},
"llm_reasoning": "The document contains multiple entries with details such as transaction dates, transaction types (e.g., \u0027Bill\u0027, \u0027Supplier Credit\u0027, \u0027Expense\u0027), invoice numbers (e.g., \u0027IUKDN1099304707\u0027, \u00273597247\u0027, \u0027186954035\u0027), seller names (e.g., \u0027HP Instant Ink\u0027, \u0027makro\u0027, \u0027Booker Limited\u0027), VAT codes, VAT rates, net amounts, and total amounts. These are key indicators of an invoice or a VAT detail report, which is closely related to invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple entries with details such as transaction dates, transaction types (e.g., \u0027Bill\u0027, \u0027Supplier Credit\u0027, \u0027Expense\u0027), invoice numbers (e.g., \u0027IUKDN1099304707\u0027, \u00273597247\u0027, \u0027186954035\u0027), seller names (e.g., \u0027HP Instant Ink\u0027, \u0027makro\u0027, \u0027Booker Limited\u0027), VAT codes, VAT rates, net amounts, and total amounts. These are key indicators of an invoice or a VAT detail report, which is closely related to invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"IUKDN1099304707\",\n \"seller_name\": \"HP Instant Ink\",\n \"invoice_date\": \"25/12/2024\",\n \"total_amount\": \"11.99\",\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.13,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.07692307692307693,
"pattern_score": 0.0,
"total_score": 0.046153846153846156
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "nominal_ledger"
}
},
"page_number": 2,
"text_length": 7597
},
{
"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 bills, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and total amounts, which are key indicators of an invoice document. Additionally, the presence of transaction details such as \u0027Bill\u0027, \u0027Supplier Credit\u0027, and \u0027VAT Detail Report\u0027 further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"006208589\",\n \"seller_name\": \"BURMA BACON SUPPLIES\",\n \"invoice_date\": \"05/02/2025\",\n \"total_amount\": \"79.03\",\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-DRvIsfnj7EAicNL3rezOMNwLyPZMz\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 bills, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and total amounts, which are key indicators of an invoice document. Additionally, the presence of transaction details such as \\\u0027Bill\\\u0027, \\\u0027Supplier Credit\\\u0027, and \\\u0027VAT Detail Report\\\u0027 further supports the classification as an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"006208589\",\\n \"seller_name\": \"BURMA BACON SUPPLIES\",\\n \"invoice_date\": \"05/02/2025\",\\n \"total_amount\": \"79.03\",\\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=1775547502, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=2626, total_tokens=2872, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "05/02/2025",
"invoice_number": "006208589",
"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": "BURMA BACON SUPPLIES",
"statement_period": null,
"total_amount": "79.03"
},
"llm_reasoning": "The document contains multiple references to bills, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and total amounts, which are key indicators of an invoice document. Additionally, the presence of transaction details such as \u0027Bill\u0027, \u0027Supplier Credit\u0027, and \u0027VAT Detail Report\u0027 further supports the classification as an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains multiple references to bills, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and total amounts, which are key indicators of an invoice document. Additionally, the presence of transaction details such as \u0027Bill\u0027, \u0027Supplier Credit\u0027, and \u0027VAT Detail Report\u0027 further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"006208589\",\n \"seller_name\": \"BURMA BACON SUPPLIES\",\n \"invoice_date\": \"05/02/2025\",\n \"total_amount\": \"79.03\",\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.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.2222222222222222,
"pattern_score": 0.0,
"total_score": 0.13333333333333333
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "invoice"
}
},
"page_number": 3,
"text_length": 7229
},
{
"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 references to \u0027Bill\u0027, \u0027Invoice\u0027, \u0027Supplier Credit\u0027, and \u0027Transaction Type\u0027, which are key indicators of an invoice. Additionally, it includes details such as transaction dates, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and balances, which are typical components of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"Multiple invoice numbers detected, e.g., 3595335, 186946917, INV1435498, etc.\",\n \"seller_name\": \"Multiple seller names detected, e.g., Booker Limited, Lidl, Amazon, etc.\",\n \"invoice_date\": \"Multiple dates detected, e.g., 06/12/2024, 07/12/2024, 18/12/2024, etc.\",\n \"total_amount\": \"Total amounts are not explicitly summarized but can be inferred from the \u0027BALANCE\u0027 column, e.g., 6,926.27, 7,330.51, etc.\",\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-DRvItqWn30DmHAVU8Cb68ynBgGBB2\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 references to \\\u0027Bill\\\u0027, \\\u0027Invoice\\\u0027, \\\u0027Supplier Credit\\\u0027, and \\\u0027Transaction Type\\\u0027, which are key indicators of an invoice. Additionally, it includes details such as transaction dates, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and balances, which are typical components of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"Multiple invoice numbers detected, e.g., 3595335, 186946917, INV1435498, etc.\",\\n \"seller_name\": \"Multiple seller names detected, e.g., Booker Limited, Lidl, Amazon, etc.\",\\n \"invoice_date\": \"Multiple dates detected, e.g., 06/12/2024, 07/12/2024, 18/12/2024, etc.\",\\n \"total_amount\": \"Total amounts are not explicitly summarized but can be inferred from the \\\u0027BALANCE\\\u0027 column, e.g., 6,926.27, 7,330.51, etc.\",\\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}})], crea"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "Multiple dates detected, e.g., 06/12/2024, 07/12/2024, 18/12/2024, etc.",
"invoice_number": "Multiple invoice numbers detected, e.g., 3595335, 186946917, INV1435498, etc.",
"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": "Multiple seller names detected, e.g., Booker Limited, Lidl, Amazon, etc.",
"statement_period": null,
"total_amount": "Total amounts are not explicitly summarized but can be inferred from the \u0027BALANCE\u0027 column, e.g., 6,926.27, 7,330.51, etc."
},
"llm_reasoning": "The document contains multiple references to \u0027Bill\u0027, \u0027Invoice\u0027, \u0027Supplier Credit\u0027, and \u0027Transaction Type\u0027, which are key indicators of an invoice. Additionally, it includes details such as transaction dates, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and balances, which are typical components of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple references to \u0027Bill\u0027, \u0027Invoice\u0027, \u0027Supplier Credit\u0027, and \u0027Transaction Type\u0027, which are key indicators of an invoice. Additionally, it includes details such as transaction dates, invoice numbers, seller names, VAT codes, VAT rates, net amounts, and balances, which are typical components of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"Multiple invoice numbers detected, e.g., 3595335, 186946917, INV1435498, etc.\",\n \"seller_name\": \"Multiple seller names detected, e.g., Booker Limited, Lidl, Amazon, etc.\",\n \"invoice_date\": \"Multiple dates detected, e.g., 06/12/2024, 07/12/2024, 18/12/2024, etc.\",\n \"total_amount\": \"Total amounts are not explicitly summarized but can be inferred from the \u0027BALANCE\u0027 column, e.g., 6,926.27, 7,330.51, etc.\",\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.13,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "nominal_ledger"
}
},
"page_number": 4,
"text_length": 6367
},
{
"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, including transaction types, VAT codes, VAT rates, net amounts, and balances. These are key indicators of a nominal ledger or VAT detail report, which is used for accounting purposes to track financial transactions and VAT details. There are no specific identifiers for invoices, hire purchase agreements, 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-DRvIv92QXR4oKQbrbGDjL5bjS7aBV\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, including transaction types, VAT codes, VAT rates, net amounts, and balances. These are key indicators of a nominal ledger or VAT detail report, which is used for accounting purposes to track financial transactions and VAT details. There are no specific identifiers for invoices, hire purchase agreements, 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=1775547505, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=234, prompt_tokens=2536, total_tokens=2770, completion_tokens_details=CompletionTokensDetails(accepted_p"
},
"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, including transaction types, VAT codes, VAT rates, net amounts, and balances. These are key indicators of a nominal ledger or VAT detail report, which is used for accounting purposes to track financial transactions and VAT details. There are no specific identifiers for invoices, hire purchase agreements, or other document types listed.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed breakdown of transactions, including transaction types, VAT codes, VAT rates, net amounts, and balances. These are key indicators of a nominal ledger or VAT detail report, which is used for accounting purposes to track financial transactions and VAT details. There are no specific identifiers for invoices, hire purchase agreements, 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": "both_agree",
"pattern_based": {
"confidence": 0.13,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.07692307692307693,
"pattern_score": 0.0,
"total_score": 0.046153846153846156
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": "nominal_ledger"
}
},
"page_number": 5,
"text_length": 6587
},
{
"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 references to \u0027Bill\u0027 transactions with details such as invoice numbers, seller names, VAT codes, VAT rates, and net amounts. These are key indicators of an invoice or a VAT-related purchase report. The presence of terms like \u0027Total for Box 7 Net value of purchases\u0027 and \u0027tax return\u0027 further supports this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": \"186994583\",\n \"seller_name\": \"Costco\",\n \"invoice_date\": \"23/02/2025\",\n \"total_amount\": \"28816.95\",\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-DRvIwljhLW0NVXbAFk2dVIIMS91ie\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 references to \\\u0027Bill\\\u0027 transactions with details such as invoice numbers, seller names, VAT codes, VAT rates, and net amounts. These are key indicators of an invoice or a VAT-related purchase report. The presence of terms like \\\u0027Total for Box 7 Net value of purchases\\\u0027 and \\\u0027tax return\\\u0027 further supports this classification.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"186994583\",\\n \"seller_name\": \"Costco\",\\n \"invoice_date\": \"23/02/2025\",\\n \"total_amount\": \"28816.95\",\\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=1775547506, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1651, total_tokens=1897, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, au"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "23/02/2025",
"invoice_number": "186994583",
"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": "Costco",
"statement_period": null,
"total_amount": "28816.95"
},
"llm_reasoning": "The document contains multiple references to \u0027Bill\u0027 transactions with details such as invoice numbers, seller names, VAT codes, VAT rates, and net amounts. These are key indicators of an invoice or a VAT-related purchase report. The presence of terms like \u0027Total for Box 7 Net value of purchases\u0027 and \u0027tax return\u0027 further supports this classification.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains multiple references to \u0027Bill\u0027 transactions with details such as invoice numbers, seller names, VAT codes, VAT rates, and net amounts. These are key indicators of an invoice or a VAT-related purchase report. The presence of terms like \u0027Total for Box 7 Net value of purchases\u0027 and \u0027tax return\u0027 further supports this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": \"186994583\",\n \"seller_name\": \"Costco\",\n \"invoice_date\": \"23/02/2025\",\n \"total_amount\": \"28816.95\",\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.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.2222222222222222,
"pattern_score": 0.0,
"total_score": 0.13333333333333333
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"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": 6,
"text_length": 1403
}
],
"processing_timestamp": "2026-04-07T07:38:28.658246"
}