| Original Filename: | W.E_22.11.25_1776757533.pdf |
| Upload Date: | April 21, 2026 at 09:36 AM |
| Total Pages: | 35 |
| Processing Status: | Completed |
| Total Documents: | 25 |
| Nominal Ledgers: | 1 |
| Invoices: | 24 |
Nominal Ledger
85%Invoice
85%Invoice
85%Invoice
85%Unknown
80%Invoice
85%Invoice
85%Unknown
80%Invoice
85%Unknown
80%Invoice
80%Invoice
90%Invoice
85%Invoice
70%Invoice
85%Unknown
70%Invoice
85%Unknown
80%Invoice
85%Invoice
85%Invoice
80%Invoice
85%Invoice
85%Unknown
70%Invoice
90%Invoice
70%Invoice
80%Invoice
80%Invoice
95%Invoice
95%Invoice
95%Unknown
70%Unknown
70%Unknown
70%Unknown
70%| Document Type | Pages | Confidence | Processing Status | Created | Actions |
|---|---|---|---|---|---|
| Nominal Ledger | 1 (1 page) | 85% | Processed | 2026-04-21 09:36 | No view available |
| Invoice | 2 (1 page) | 85% | Processed | 2026-04-21 09:36 | View |
| Invoice | 3 (1 page) | 85% | Processed | 2026-04-21 09:36 | View |
| Invoice | 4 (1 page) | 85% | Processed | 2026-04-21 09:36 | View |
| Invoice | 6 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 7 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 9 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 11 (1 page) | 80% | Processed | 2026-04-21 09:37 | View |
| Invoice | 12 (1 page) | 90% | Processed | 2026-04-21 09:37 | View |
| Invoice | 13 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 14 (1 page) | 70% | Processed | 2026-04-21 09:37 | View |
| Invoice | 15 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 17 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 19 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 20 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 21 (1 page) | 80% | Processed | 2026-04-21 09:37 | View |
| Invoice | 22 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 23 (1 page) | 85% | Processed | 2026-04-21 09:37 | View |
| Invoice | 25 (1 page) | 90% | Processed | 2026-04-21 09:37 | View |
| Invoice | 26 (1 page) | 95% | Processed | 2026-04-21 09:37 | View |
| Invoice | 27 (1 page) | 95% | Processed | 2026-04-21 09:37 | View |
| Invoice | 28 (1 page) | 95% | Processed | 2026-04-21 09:37 | View |
| Invoice | 29 (1 page) | 95% | Processed | 2026-04-21 09:37 | View |
| Invoice | 30 (1 page) | 95% | Processed | 2026-04-21 09:37 | View |
| Invoice | 31 (1 page) | 95% | Processed | 2026-04-21 09:37 | View |
{
"document_groups": [
{
"avg_confidence": 0.85,
"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": 1,
"pages": [
{
"confidence_score": 0.85,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document lists various expense categories (e.g., entertainment, travel, equipment) along with their corresponding amounts, which is indicative of a nominal ledger or petty cash expenditure report. There are no indicators of invoices, agreements, or statements specific to loans, mortgages, or taxes.\",\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-DX1npbtykpuk52Rkpk3t2728mQoHQ\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.85,\\n \"reasoning\": \"The document lists various expense categories (e.g., entertainment, travel, equipment) along with their corresponding amounts, which is indicative of a nominal ledger or petty cash expenditure report. There are no indicators of invoices, agreements, or statements specific to loans, mortgages, or taxes.\",\\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=1776764125, 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=1090, total_tokens=1310, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), 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 lists various expense categories (e.g., entertainment, travel, equipment) along with their corresponding amounts, which is indicative of a nominal ledger or petty cash expenditure report. There are no indicators of invoices, agreements, or statements specific to loans, mortgages, or taxes.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document lists various expense categories (e.g., entertainment, travel, equipment) along with their corresponding amounts, which is indicative of a nominal ledger or petty cash expenditure report. There are no indicators of invoices, agreements, or statements specific to loans, mortgages, or taxes.\",\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.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": 212
}
],
"start_page": 1
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "22.11.25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "26.39"
},
"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 key indicators of an invoice, such as a list of purchased items, quantities, prices, VAT details, a total amount, and a seller name (ALDI STORES). However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"22.11.25\",\n \"total_amount\": \"26.39\",\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-DX1nq2crpUsCOlaMAApRYYu8sMZtr\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 a list of purchased items, quantities, prices, VAT details, a total amount, and a seller name (ALDI STORES). However, it lacks a clear invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"22.11.25\",\\n \"total_amount\": \"26.39\",\\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=1776764126, 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=1236, total_tokens=1461, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "22.11.25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "26.39"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a list of purchased items, quantities, prices, VAT details, a total amount, and a seller name (ALDI STORES). However, it lacks a clear invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a list of purchased items, quantities, prices, VAT details, a total amount, and a seller name (ALDI STORES). However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"22.11.25\",\n \"total_amount\": \"26.39\",\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.08333333333333334,
"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.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 2,
"text_length": 570
}
],
"start_page": 2
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "21.11.25",
"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": "Aldi",
"statement_period": null,
"total_amount": "39.48"
},
"document_type": "invoice",
"end_page": 3,
"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 a list of purchased items, quantities, prices, a total amount, and a seller name (\u0027Aldi\u0027). However, it lacks a clear invoice number and detailed invoice date, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi\",\n \"invoice_date\": \"21.11.25\",\n \"total_amount\": \"39.48\",\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-DX1nsy8kCRROhhndBRBgPFj9N6lra\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 a list of purchased items, quantities, prices, a total amount, and a seller name (\\\u0027Aldi\\\u0027). However, it lacks a clear invoice number and detailed invoice date, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Aldi\",\\n \"invoice_date\": \"21.11.25\",\\n \"total_amount\": \"39.48\",\\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=1776764128, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=222, prompt_tokens=1276, total_tokens=1498, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "21.11.25",
"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": "Aldi",
"statement_period": null,
"total_amount": "39.48"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a list of purchased items, quantities, prices, a total amount, and a seller name (\u0027Aldi\u0027). However, it lacks a clear invoice number and detailed invoice date, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a list of purchased items, quantities, prices, a total amount, and a seller name (\u0027Aldi\u0027). However, it lacks a clear invoice number and detailed invoice date, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi\",\n \"invoice_date\": \"21.11.25\",\n \"total_amount\": \"39.48\",\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.08333333333333334,
"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.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 3,
"text_length": 622
}
],
"start_page": 3
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "14.11.25",
"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": "SI STORES",
"statement_period": null,
"total_amount": "63.59"
},
"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 a list of items with descriptions, quantities, and prices, as well as a subtotal and total amount. These are key indicators of an invoice. However, there is no explicit mention of an invoice number or seller name, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"SI STORES\",\n \"invoice_date\": \"14.11.25\",\n \"total_amount\": \"63.59\",\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-DX1ntFZicMttxgqzf4gNi9dBxFtZd\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 a list of items with descriptions, quantities, and prices, as well as a subtotal and total amount. These are key indicators of an invoice. However, there is no explicit mention of an invoice number or seller name, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"SI STORES\",\\n \"invoice_date\": \"14.11.25\",\\n \"total_amount\": \"63.59\",\\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=1776764129, 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=1736, total_tokens=1960, 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": "14.11.25",
"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": "SI STORES",
"statement_period": null,
"total_amount": "63.59"
},
"llm_reasoning": "The document contains a list of items with descriptions, quantities, and prices, as well as a subtotal and total amount. These are key indicators of an invoice. However, there is no explicit mention of an invoice number or seller name, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains a list of items with descriptions, quantities, and prices, as well as a subtotal and total amount. These are key indicators of an invoice. However, there is no explicit mention of an invoice number or seller name, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"SI STORES\",\n \"invoice_date\": \"14.11.25\",\n \"total_amount\": \"63.59\",\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.16666666666666669,
"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.25,
"total_score": 0.16666666666666669
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 4,
"text_length": 1640
}
],
"start_page": 4
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "18/11/2025",
"invoice_number": "1625097",
"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": "KAKA SUPERMARKET",
"statement_period": null,
"total_amount": "4.26"
},
"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 key indicators of an invoice, such as a seller name (\u0027KAKA SUPERMARKET\u0027), a transaction date (\u002718/11/2025\u0027), and a total amount (\u0027GBP4.26\u0027). Additionally, it includes transaction details like \u0027TRANS ID\u0027, \u0027POS\u0027, and \u0027Staff ID\u0027, which are commonly found in receipts or invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"1625097\",\n \"seller_name\": \"KAKA SUPERMARKET\",\n \"invoice_date\": \"18/11/2025\",\n \"total_amount\": \"4.26\",\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-DX1nwjQJeo5uJGiaAgkL8MJVds0LT\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 a seller name (\\\u0027KAKA SUPERMARKET\\\u0027), a transaction date (\\\u002718/11/2025\\\u0027), and a total amount (\\\u0027GBP4.26\\\u0027). Additionally, it includes transaction details like \\\u0027TRANS ID\\\u0027, \\\u0027POS\\\u0027, and \\\u0027Staff ID\\\u0027, which are commonly found in receipts or invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"1625097\",\\n \"seller_name\": \"KAKA SUPERMARKET\",\\n \"invoice_date\": \"18/11/2025\",\\n \"total_amount\": \"4.26\",\\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=1776764132, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=250, prompt_tokens=1240, total_tokens=1490, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, reje"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "18/11/2025",
"invoice_number": "1625097",
"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": "KAKA SUPERMARKET",
"statement_period": null,
"total_amount": "4.26"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027KAKA SUPERMARKET\u0027), a transaction date (\u002718/11/2025\u0027), and a total amount (\u0027GBP4.26\u0027). Additionally, it includes transaction details like \u0027TRANS ID\u0027, \u0027POS\u0027, and \u0027Staff ID\u0027, which are commonly found in receipts or 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 a seller name (\u0027KAKA SUPERMARKET\u0027), a transaction date (\u002718/11/2025\u0027), and a total amount (\u0027GBP4.26\u0027). Additionally, it includes transaction details like \u0027TRANS ID\u0027, \u0027POS\u0027, and \u0027Staff ID\u0027, which are commonly found in receipts or invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"1625097\",\n \"seller_name\": \"KAKA SUPERMARKET\",\n \"invoice_date\": \"18/11/2025\",\n \"total_amount\": \"4.26\",\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.1392857142857143,
"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.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.125,
"total_score": 0.08333333333333334
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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": 6,
"text_length": 571
}
],
"start_page": 6
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "18/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "52.95"
},
"document_type": "invoice",
"end_page": 7,
"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 itemized purchases with quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002718/11/25\u0027). However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"18/11/25\",\n \"total_amount\": \"52.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-DX1nxbxXah5fd2JadWrVaMT074KYD\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 itemized purchases with quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\\\u0027ALDI STORES\\\u0027) and a transaction date (\\\u002718/11/25\\\u0027). However, it lacks a clear invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"18/11/25\",\\n \"total_amount\": \"52.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=1776764133, 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=1341, total_tokens=1576, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "18/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "52.95"
},
"llm_reasoning": "The document contains itemized purchases with quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002718/11/25\u0027). However, it lacks a clear invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains itemized purchases with quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002718/11/25\u0027). However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"18/11/25\",\n \"total_amount\": \"52.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.08333333333333334,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 7,
"text_length": 830
}
],
"start_page": 7
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "16/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "4.63"
},
"document_type": "invoice",
"end_page": 9,
"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 details of a purchase, including item descriptions, quantities, prices, a total amount, and a seller name (\u0027ALDI STORES\u0027). These are key indicators of an invoice. However, the document lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"16/11/25\",\n \"total_amount\": \"4.63\",\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-DX1o0xXzQuNgmIYbifuzu0wxhq9fr\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 details of a purchase, including item descriptions, quantities, prices, a total amount, and a seller name (\\\u0027ALDI STORES\\\u0027). These are key indicators of an invoice. However, the document lacks a formal invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"16/11/25\",\\n \"total_amount\": \"4.63\",\\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=1776764136, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=226, prompt_tokens=1265, total_tokens=1491, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "16/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "4.63"
},
"llm_reasoning": "The document contains details of a purchase, including item descriptions, quantities, prices, a total amount, and a seller name (\u0027ALDI STORES\u0027). These are key indicators of an invoice. However, the document lacks a formal invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains details of a purchase, including item descriptions, quantities, prices, a total amount, and a seller name (\u0027ALDI STORES\u0027). These are key indicators of an invoice. However, the document lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"16/11/25\",\n \"total_amount\": \"4.63\",\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.1392857142857143,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 9,
"text_length": 747
}
],
"start_page": 9
},
{
"avg_confidence": 0.8,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-11-20",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "7.17"
},
"document_type": "invoice",
"end_page": 11,
"pages": [
{
"confidence_score": 0.8,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027ALDI STORES\u0027), a total amount (\u00277.17 GBP\u0027), and a date (\u002720.11.25\u0027). However, the lack of a clear invoice number reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"2025-11-20\",\n \"total_amount\": \"7.17\",\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-DX1o3VosbXvQqZJFQ7zz4gsRinYZS\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\\\u0027ALDI STORES\\\u0027), a total amount (\\\u00277.17 GBP\\\u0027), and a date (\\\u002720.11.25\\\u0027). However, the lack of a clear invoice number reduces confidence slightly.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"2025-11-20\",\\n \"total_amount\": \"7.17\",\\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=1776764139, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=226, prompt_tokens=1136, total_tokens=1362, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-11-20",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "7.17"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027ALDI STORES\u0027), a total amount (\u00277.17 GBP\u0027), and a date (\u002720.11.25\u0027). However, the lack of a clear invoice number reduces confidence slightly.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027ALDI STORES\u0027), a total amount (\u00277.17 GBP\u0027), and a date (\u002720.11.25\u0027). However, the lack of a clear invoice number reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"2025-11-20\",\n \"total_amount\": \"7.17\",\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.08333333333333334,
"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.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 11,
"text_length": 355
}
],
"start_page": 11
},
{
"avg_confidence": 0.9,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "Nov 12, 2025",
"invoice_number": "#8-71247",
"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": "Abraxas Cookshop",
"statement_period": null,
"total_amount": "\u00a339.98"
},
"document_type": "invoice",
"end_page": 12,
"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 key indicators of an invoice, such as a receipt number (#8-71247), seller/company name (Abraxas Cookshop), a total amount (\u00a339.98), and an invoice date (Nov 12, 2025). Additionally, it includes itemized details with prices, VAT information, and a subtotal, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"#8-71247\",\n \"seller_name\": \"Abraxas Cookshop\",\n \"invoice_date\": \"Nov 12, 2025\",\n \"total_amount\": \"\u00a339.98\",\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-DX1o4iitPDkuSSBccGixIoMLrPhsX\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 key indicators of an invoice, such as a receipt number (#8-71247), seller/company name (Abraxas Cookshop), a total amount (\u00a339.98), and an invoice date (Nov 12, 2025). Additionally, it includes itemized details with prices, VAT information, and a subtotal, which are typical of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"#8-71247\",\\n \"seller_name\": \"Abraxas Cookshop\",\\n \"invoice_date\": \"Nov 12, 2025\",\\n \"total_amount\": \"\u00a339.98\",\\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=1776764140, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=255, prompt_tokens=1267, total_tokens=1522, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, r"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "Nov 12, 2025",
"invoice_number": "#8-71247",
"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": "Abraxas Cookshop",
"statement_period": null,
"total_amount": "\u00a339.98"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a receipt number (#8-71247), seller/company name (Abraxas Cookshop), a total amount (\u00a339.98), and an invoice date (Nov 12, 2025). Additionally, it includes itemized details with prices, VAT information, and a subtotal, which are typical of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a receipt number (#8-71247), seller/company name (Abraxas Cookshop), a total amount (\u00a339.98), and an invoice date (Nov 12, 2025). Additionally, it includes itemized details with prices, VAT information, and a subtotal, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"#8-71247\",\n \"seller_name\": \"Abraxas Cookshop\",\n \"invoice_date\": \"Nov 12, 2025\",\n \"total_amount\": \"\u00a339.98\",\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.06666666666666667,
"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.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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 12,
"text_length": 929
}
],
"start_page": 12
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "16/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "12.71"
},
"document_type": "invoice",
"end_page": 13,
"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 details of purchased items, quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002716/11/25\u0027), which are typical elements of an invoice. However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"16/11/25\",\n \"total_amount\": \"12.71\",\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-DX1o6MyioO98tZKGvbnVzdgBqL1Zs\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 details of purchased items, quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\\\u0027ALDI STORES\\\u0027) and a transaction date (\\\u002716/11/25\\\u0027), which are typical elements of an invoice. However, it lacks a formal invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"16/11/25\",\\n \"total_amount\": \"12.71\",\\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=1776764142, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=244, prompt_tokens=1278, total_tokens=1522, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "16/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "12.71"
},
"llm_reasoning": "The document contains details of purchased items, quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002716/11/25\u0027), which are typical elements of an invoice. However, it lacks a formal invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains details of purchased items, quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002716/11/25\u0027), which are typical elements of an invoice. However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"16/11/25\",\n \"total_amount\": \"12.71\",\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.1392857142857143,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 711
}
],
"start_page": 13
},
{
"avg_confidence": 0.7,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "19/11/25",
"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": "Aldi Stores",
"statement_period": null,
"total_amount": "4.76"
},
"document_type": "invoice",
"end_page": 14,
"pages": [
{
"confidence_score": 0.7,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 4.76), and a transaction date (19/11/25). However, it lacks a clear invoice number and other typical invoice identifiers, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi Stores\",\n \"invoice_date\": \"19/11/25\",\n \"total_amount\": \"4.76\",\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-DX1o74uuhps2HDBOpO59lcocYJ64u\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 4.76), and a transaction date (19/11/25). However, it lacks a clear invoice number and other typical invoice identifiers, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Aldi Stores\",\\n \"invoice_date\": \"19/11/25\",\\n \"total_amount\": \"4.76\",\\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=1776764143, 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=1266, total_tokens=1495, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptToken"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "19/11/25",
"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": "Aldi Stores",
"statement_period": null,
"total_amount": "4.76"
},
"llm_reasoning": "The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 4.76), and a transaction date (19/11/25). However, it lacks a clear invoice number and other typical invoice identifiers, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 4.76), and a transaction date (19/11/25). However, it lacks a clear invoice number and other typical invoice identifiers, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi Stores\",\n \"invoice_date\": \"19/11/25\",\n \"total_amount\": \"4.76\",\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.08333333333333334,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 14,
"text_length": 754
}
],
"start_page": 14
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "31/10/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": "Post Office Ltd.",
"statement_period": null,
"total_amount": "12.20"
},
"document_type": "invoice",
"end_page": 15,
"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 a seller name (Post Office Ltd.), a date of issue, itemized prices, VAT details, and a total amount due. These are typical elements of an invoice or receipt.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Post Office Ltd.\",\n \"invoice_date\": \"31/10/2025\",\n \"total_amount\": \"12.20\",\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-DX1o98f9O6ow1XYRER0blI4gdUAOl\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 a seller name (Post Office Ltd.), a date of issue, itemized prices, VAT details, and a total amount due. These are typical elements of an invoice or receipt.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Post Office Ltd.\",\\n \"invoice_date\": \"31/10/2025\",\\n \"total_amount\": \"12.20\",\\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=1776764145, 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=1380, total_tokens=1600, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_token"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "31/10/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": "Post Office Ltd.",
"statement_period": null,
"total_amount": "12.20"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (Post Office Ltd.), a date of issue, itemized prices, VAT details, and a total amount due. These are typical elements of an invoice or receipt.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (Post Office Ltd.), a date of issue, itemized prices, VAT details, and a total amount due. These are typical elements of an invoice or receipt.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Post Office Ltd.\",\n \"invoice_date\": \"31/10/2025\",\n \"total_amount\": \"12.20\",\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.16666666666666669,
"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.1111111111111111,
"pattern_score": 0.25,
"total_score": 0.16666666666666669
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 15,
"text_length": 910
}
],
"start_page": 15
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-10-02",
"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": "Holland \u0026 Barrett",
"statement_period": null,
"total_amount": "2.98"
},
"document_type": "invoice",
"end_page": 17,
"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 a receipt or invoice, such as a seller name (\u0027Holland \u0026 Barrett\u0027), a transaction date (\u002702-10-2025\u0027), and a total amount (\u0027\u00a32.98\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Holland \u0026 Barrett\",\n \"invoice_date\": \"2025-10-02\",\n \"total_amount\": \"2.98\",\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-DX1oCQPAhWRUO4WhgMOHgK5KmVLWZ\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 a receipt or invoice, such as a seller name (\\\u0027Holland \u0026 Barrett\\\u0027), a transaction date (\\\u002702-10-2025\\\u0027), and a total amount (\\\u0027\u00a32.98\\\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Holland \u0026 Barrett\",\\n \"invoice_date\": \"2025-10-02\",\\n \"total_amount\": \"2.98\",\\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=1776764148, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=231, prompt_tokens=1374, total_tokens=1605, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptToke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-10-02",
"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": "Holland \u0026 Barrett",
"statement_period": null,
"total_amount": "2.98"
},
"llm_reasoning": "The document contains key indicators of a receipt or invoice, such as a seller name (\u0027Holland \u0026 Barrett\u0027), a transaction date (\u002702-10-2025\u0027), and a total amount (\u0027\u00a32.98\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of a receipt or invoice, such as a seller name (\u0027Holland \u0026 Barrett\u0027), a transaction date (\u002702-10-2025\u0027), and a total amount (\u0027\u00a32.98\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Holland \u0026 Barrett\",\n \"invoice_date\": \"2025-10-02\",\n \"total_amount\": \"2.98\",\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.1392857142857143,
"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.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.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.14285714285714285,
"total_score": 0.1392857142857143
},
"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": 17,
"text_length": 961
}
],
"start_page": 17
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "23 October 2025",
"invoice_number": "54",
"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": "Magee Street Bakery",
"statement_period": null,
"total_amount": "\u00a317.99"
},
"document_type": "invoice",
"end_page": 19,
"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 a seller name (\u0027Magee Street Bakery\u0027), an order number (\u0027Order No: 54\u0027), a date (\u0027Thursday 23 October 2025\u0027), and a total amount (\u0027\u00a317.99\u0027). The presence of itemized purchases with prices further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"54\",\n \"seller_name\": \"Magee Street Bakery\",\n \"invoice_date\": \"23 October 2025\",\n \"total_amount\": \"\u00a317.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-DX1oELc1NcDJE1lqZBchAKlYwdvW4\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 a seller name (\\\u0027Magee Street Bakery\\\u0027), an order number (\\\u0027Order No: 54\\\u0027), a date (\\\u0027Thursday 23 October 2025\\\u0027), and a total amount (\\\u0027\u00a317.99\\\u0027). The presence of itemized purchases with prices further supports the classification as an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"54\",\\n \"seller_name\": \"Magee Street Bakery\",\\n \"invoice_date\": \"23 October 2025\",\\n \"total_amount\": \"\u00a317.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=1776764150, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=242, prompt_tokens=1180, total_tokens=1422, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rej"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "23 October 2025",
"invoice_number": "54",
"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": "Magee Street Bakery",
"statement_period": null,
"total_amount": "\u00a317.99"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027Magee Street Bakery\u0027), an order number (\u0027Order No: 54\u0027), a date (\u0027Thursday 23 October 2025\u0027), and a total amount (\u0027\u00a317.99\u0027). The presence of itemized purchases with prices further supports the classification as an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027Magee Street Bakery\u0027), an order number (\u0027Order No: 54\u0027), a date (\u0027Thursday 23 October 2025\u0027), and a total amount (\u0027\u00a317.99\u0027). The presence of itemized purchases with prices further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"54\",\n \"seller_name\": \"Magee Street Bakery\",\n \"invoice_date\": \"23 October 2025\",\n \"total_amount\": \"\u00a317.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.04,
"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.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.0,
"total_score": 0.0
}
},
"type": "credit_card"
}
},
"page_number": 19,
"text_length": 376
}
],
"start_page": 19
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "18/10/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": "TESCO Hove Superstore",
"statement_period": null,
"total_amount": "\u00a37.70"
},
"document_type": "invoice",
"end_page": 20,
"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 a seller name (\u0027TESCO Hove Superstore\u0027), a VAT number, a subtotal, savings, promotions, and a total amount. Additionally, it includes a transaction date (\u002718/10/2025\u0027) and payment details (\u0027Mastercard Debit\u0027). These elements are consistent with a receipt or invoice format.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"TESCO Hove Superstore\",\n \"invoice_date\": \"18/10/2025\",\n \"total_amount\": \"\u00a37.70\",\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-DX1oGmuhSonOruNPEAAmepSzS5kOM\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 a seller name (\\\u0027TESCO Hove Superstore\\\u0027), a VAT number, a subtotal, savings, promotions, and a total amount. Additionally, it includes a transaction date (\\\u002718/10/2025\\\u0027) and payment details (\\\u0027Mastercard Debit\\\u0027). These elements are consistent with a receipt or invoice format.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"TESCO Hove Superstore\",\\n \"invoice_date\": \"18/10/2025\",\\n \"total_amount\": \"\u00a37.70\",\\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=1776764152, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=249, prompt_tokens=1199, total_tokens=1448, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "18/10/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": "TESCO Hove Superstore",
"statement_period": null,
"total_amount": "\u00a37.70"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027TESCO Hove Superstore\u0027), a VAT number, a subtotal, savings, promotions, and a total amount. Additionally, it includes a transaction date (\u002718/10/2025\u0027) and payment details (\u0027Mastercard Debit\u0027). These elements are consistent with a receipt or invoice format.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027TESCO Hove Superstore\u0027), a VAT number, a subtotal, savings, promotions, and a total amount. Additionally, it includes a transaction date (\u002718/10/2025\u0027) and payment details (\u0027Mastercard Debit\u0027). These elements are consistent with a receipt or invoice format.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"TESCO Hove Superstore\",\n \"invoice_date\": \"18/10/2025\",\n \"total_amount\": \"\u00a37.70\",\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.2042857142857143,
"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.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.16666666666666666,
"pattern_score": 0.14285714285714285,
"total_score": 0.2042857142857143
},
"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": 20,
"text_length": 534
}
],
"start_page": 20
},
{
"avg_confidence": 0.8,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "12-11-2025",
"invoice_number": "000078",
"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": "CLASH RANSOMS",
"statement_period": null,
"total_amount": "6.28"
},
"document_type": "invoice",
"end_page": 21,
"pages": [
{
"confidence_score": 0.8,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains indicators of an invoice, such as a seller name (\u0027CLASH RANSOMS\u0027), a VAT number, a date (\u002712-11-2025\u0027), and a total amount (\u00276.28\u0027). However, the formatting is somewhat unclear, and some details are ambiguous, which slightly lowers the confidence level.\",\n \"document_identifiers\": {\n \"invoice_number\": \"000078\",\n \"seller_name\": \"CLASH RANSOMS\",\n \"invoice_date\": \"12-11-2025\",\n \"total_amount\": \"6.28\",\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-DX1oHJA7NY3rwuWlE8rnDbq7bn3Fe\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains indicators of an invoice, such as a seller name (\\\u0027CLASH RANSOMS\\\u0027), a VAT number, a date (\\\u002712-11-2025\\\u0027), and a total amount (\\\u00276.28\\\u0027). However, the formatting is somewhat unclear, and some details are ambiguous, which slightly lowers the confidence level.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"000078\",\\n \"seller_name\": \"CLASH RANSOMS\",\\n \"invoice_date\": \"12-11-2025\",\\n \"total_amount\": \"6.28\",\\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=1776764153, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=241, prompt_tokens=1107, total_tokens=1348, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "12-11-2025",
"invoice_number": "000078",
"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": "CLASH RANSOMS",
"statement_period": null,
"total_amount": "6.28"
},
"llm_reasoning": "The document contains indicators of an invoice, such as a seller name (\u0027CLASH RANSOMS\u0027), a VAT number, a date (\u002712-11-2025\u0027), and a total amount (\u00276.28\u0027). However, the formatting is somewhat unclear, and some details are ambiguous, which slightly lowers the confidence level.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains indicators of an invoice, such as a seller name (\u0027CLASH RANSOMS\u0027), a VAT number, a date (\u002712-11-2025\u0027), and a total amount (\u00276.28\u0027). However, the formatting is somewhat unclear, and some details are ambiguous, which slightly lowers the confidence level.\",\n \"document_identifiers\": {\n \"invoice_number\": \"000078\",\n \"seller_name\": \"CLASH RANSOMS\",\n \"invoice_date\": \"12-11-2025\",\n \"total_amount\": \"6.28\",\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.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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 21,
"text_length": 201
}
],
"start_page": 21
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "17/11/2025",
"invoice_number": "03-3887",
"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": "Wickes",
"statement_period": null,
"total_amount": null
},
"document_type": "invoice",
"end_page": 22,
"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 a seller name (\u0027Wickes\u0027), a VAT number (\u0027336 7258 81\u0027), and a date (\u002717/11\u0027). Additionally, the presence of a till number (\u002780 Till Three\u0027) and a time (\u002710:54\u0027) further supports the classification as a receipt or invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"03-3887\",\n \"seller_name\": \"Wickes\",\n \"invoice_date\": \"17/11/2025\",\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-DX1oJjklcd2X6Zmv3ZT9KEcsogFDS\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 a seller name (\\\u0027Wickes\\\u0027), a VAT number (\\\u0027336 7258 81\\\u0027), and a date (\\\u002717/11\\\u0027). Additionally, the presence of a till number (\\\u002780 Till Three\\\u0027) and a time (\\\u002710:54\\\u0027) further supports the classification as a receipt or invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"03-3887\",\\n \"seller_name\": \"Wickes\",\\n \"invoice_date\": \"17/11/2025\",\\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=1776764155, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=243, prompt_tokens=1081, total_tokens=1324, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prom"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "17/11/2025",
"invoice_number": "03-3887",
"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": "Wickes",
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027Wickes\u0027), a VAT number (\u0027336 7258 81\u0027), and a date (\u002717/11\u0027). Additionally, the presence of a till number (\u002780 Till Three\u0027) and a time (\u002710:54\u0027) further supports the classification as a receipt or invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027Wickes\u0027), a VAT number (\u0027336 7258 81\u0027), and a date (\u002717/11\u0027). Additionally, the presence of a till number (\u002780 Till Three\u0027) and a time (\u002710:54\u0027) further supports the classification as a receipt or invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"03-3887\",\n \"seller_name\": \"Wickes\",\n \"invoice_date\": \"17/11/2025\",\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": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.02564102564102564,
"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.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": "property_statement"
}
},
"page_number": 22,
"text_length": 206
}
],
"start_page": 22
},
{
"avg_confidence": 0.85,
"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": "M\u0026S",
"statement_period": null,
"total_amount": "\u00a352.50"
},
"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 key indicators of an invoice, such as a seller name (\u0027M\u0026S\u0027), item descriptions with prices, a total amount (\u0027Balance to Pay: \u00a352.50\u0027), and a payment confirmation (\u0027Payment Approved\u0027). However, it lacks a clear \u0027Invoice Number\u0027 or explicit \u0027Invoice Date,\u0027 which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"M\u0026S\",\n \"invoice_date\": null,\n \"total_amount\": \"\u00a352.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-DX1oKbn53zu7htU4P1fkDa8302aS0\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 a seller name (\\\u0027M\u0026S\\\u0027), item descriptions with prices, a total amount (\\\u0027Balance to Pay: \u00a352.50\\\u0027), and a payment confirmation (\\\u0027Payment Approved\\\u0027). However, it lacks a clear \\\u0027Invoice Number\\\u0027 or explicit \\\u0027Invoice Date,\\\u0027 which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"M\u0026S\",\\n \"invoice_date\": null,\\n \"total_amount\": \"\u00a352.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=1776764156, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=232, prompt_tokens=1346, total_tokens=1578, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predicti"
},
"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": "M\u0026S",
"statement_period": null,
"total_amount": "\u00a352.50"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027M\u0026S\u0027), item descriptions with prices, a total amount (\u0027Balance to Pay: \u00a352.50\u0027), and a payment confirmation (\u0027Payment Approved\u0027). However, it lacks a clear \u0027Invoice Number\u0027 or explicit \u0027Invoice Date,\u0027 which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027M\u0026S\u0027), item descriptions with prices, a total amount (\u0027Balance to Pay: \u00a352.50\u0027), and a payment confirmation (\u0027Payment Approved\u0027). However, it lacks a clear \u0027Invoice Number\u0027 or explicit \u0027Invoice Date,\u0027 which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"M\u0026S\",\n \"invoice_date\": null,\n \"total_amount\": \"\u00a352.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.07058823529411765,
"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.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": "bank_statement"
}
},
"page_number": 23,
"text_length": 1170
}
],
"start_page": 23
},
{
"avg_confidence": 0.9,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "02.10.25",
"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": "HOVE CAR WASH",
"statement_period": null,
"total_amount": "\u20b9 18.00"
},
"document_type": "invoice",
"end_page": 25,
"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 key indicators of an invoice, such as the presence of the word \u0027INVOICE,\u0027 a seller name (\u0027HOVE CAR WASH\u0027), a date (\u002702.10.25\u0027), and a total amount (\u0027\u20b9 18.00\u0027). These elements are consistent with the structure of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"HOVE CAR WASH\",\n \"invoice_date\": \"02.10.25\",\n \"total_amount\": \"\u20b9 18.00\",\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-DX1oNwDdtYuHl0onBeseN3KRILDHC\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 key indicators of an invoice, such as the presence of the word \\\u0027INVOICE,\\\u0027 a seller name (\\\u0027HOVE CAR WASH\\\u0027), a date (\\\u002702.10.25\\\u0027), and a total amount (\\\u0027\u20b9 18.00\\\u0027). These elements are consistent with the structure of an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"HOVE CAR WASH\",\\n \"invoice_date\": \"02.10.25\",\\n \"total_amount\": \"\u20b9 18.00\",\\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=1776764159, 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=1039, total_tokens=1276, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDeta"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "02.10.25",
"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": "HOVE CAR WASH",
"statement_period": null,
"total_amount": "\u20b9 18.00"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as the presence of the word \u0027INVOICE,\u0027 a seller name (\u0027HOVE CAR WASH\u0027), a date (\u002702.10.25\u0027), and a total amount (\u0027\u20b9 18.00\u0027). These elements are consistent with the structure of an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains key indicators of an invoice, such as the presence of the word \u0027INVOICE,\u0027 a seller name (\u0027HOVE CAR WASH\u0027), a date (\u002702.10.25\u0027), and a total amount (\u0027\u20b9 18.00\u0027). These elements are consistent with the structure of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"HOVE CAR WASH\",\n \"invoice_date\": \"02.10.25\",\n \"total_amount\": \"\u20b9 18.00\",\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.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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 25,
"text_length": 101
}
],
"start_page": 25
},
{
"avg_confidence": 0.7666666666666666,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-09-14",
"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": "Uber",
"statement_period": null,
"total_amount": "7.51"
},
"document_type": "invoice",
"end_page": 28,
"pages": [
{
"confidence_score": 0.7,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.51), a date (September 14, 2025), and a seller/service provider (Uber). However, it explicitly states \u0027This is not a Tax invoice,\u0027 which lowers confidence slightly. Despite this, the structure and content align most closely with an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"2025-09-14\",\n \"total_amount\": \"7.51\",\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-DX1oPvPQRpycXRlOSePELH5f5AUsC\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.51), a date (September 14, 2025), and a seller/service provider (Uber). However, it explicitly states \\\u0027This is not a Tax invoice,\\\u0027 which lowers confidence slightly. Despite this, the structure and content align most closely with an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Uber\",\\n \"invoice_date\": \"2025-09-14\",\\n \"total_amount\": \"7.51\",\\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=1776764161, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=239, prompt_tokens=1369, total_tokens=1608, 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": "2025-09-14",
"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": "Uber",
"statement_period": null,
"total_amount": "7.51"
},
"llm_reasoning": "The document contains details of a transaction, including a total amount (\u00a37.51), a date (September 14, 2025), and a seller/service provider (Uber). However, it explicitly states \u0027This is not a Tax invoice,\u0027 which lowers confidence slightly. Despite this, the structure and content align most closely with an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.51), a date (September 14, 2025), and a seller/service provider (Uber). However, it explicitly states \u0027This is not a Tax invoice,\u0027 which lowers confidence slightly. Despite this, the structure and content align most closely with an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"2025-09-14\",\n \"total_amount\": \"7.51\",\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.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.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.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": 26,
"text_length": 1200
},
{
"confidence_score": 0.8,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.23), a date (September 18, 2025), and a seller/service provider (Uber). While it explicitly states \u0027This is not a Tax invoice,\u0027 the structure and content closely resemble an invoice or receipt, which is why it is classified as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"2025-09-18\",\n \"total_amount\": \"\u00a37.23\",\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-DX1oQbzjpmghRdy5GDf7FGNy7dvMg\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.23), a date (September 18, 2025), and a seller/service provider (Uber). While it explicitly states \\\u0027This is not a Tax invoice,\\\u0027 the structure and content closely resemble an invoice or receipt, which is why it is classified as an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Uber\",\\n \"invoice_date\": \"2025-09-18\",\\n \"total_amount\": \"\u00a37.23\",\\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=1776764162, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=241, prompt_tokens=1380, total_tokens=1621, 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": "2025-09-18",
"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": "Uber",
"statement_period": null,
"total_amount": "\u00a37.23"
},
"llm_reasoning": "The document contains details of a transaction, including a total amount (\u00a37.23), a date (September 18, 2025), and a seller/service provider (Uber). While it explicitly states \u0027This is not a Tax invoice,\u0027 the structure and content closely resemble an invoice or receipt, which is why it is classified as an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.23), a date (September 18, 2025), and a seller/service provider (Uber). While it explicitly states \u0027This is not a Tax invoice,\u0027 the structure and content closely resemble an invoice or receipt, which is why it is classified as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"2025-09-18\",\n \"total_amount\": \"\u00a37.23\",\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.18333333333333335,
"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.2222222222222222,
"pattern_score": 0.125,
"total_score": 0.18333333333333335
},
"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.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 27,
"text_length": 1222
},
{
"confidence_score": 0.8,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a36.99), a payment method (Visa **** 9969), and a date (September 6, 2025). It also mentions \u0027This is not a Tax invoice,\u0027 which suggests it is a receipt or invoice-like document. However, it lacks a formal invoice number and seller details, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"September 6, 2025\",\n \"total_amount\": \"\u00a36.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-DX1oSLvAdiEL6Chew0RIftGuMm9mp\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a36.99), a payment method (Visa **** 9969), and a date (September 6, 2025). It also mentions \\\u0027This is not a Tax invoice,\\\u0027 which suggests it is a receipt or invoice-like document. However, it lacks a formal invoice number and seller details, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Uber\",\\n \"invoice_date\": \"September 6, 2025\",\\n \"total_amount\": \"\u00a36.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=1776764164, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=251, prompt_tokens=1387, total_tokens=1638, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "September 6, 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": "Uber",
"statement_period": null,
"total_amount": "\u00a36.99"
},
"llm_reasoning": "The document contains details of a transaction, including a total amount (\u00a36.99), a payment method (Visa **** 9969), and a date (September 6, 2025). It also mentions \u0027This is not a Tax invoice,\u0027 which suggests it is a receipt or invoice-like document. However, it lacks a formal invoice number and seller details, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a36.99), a payment method (Visa **** 9969), and a date (September 6, 2025). It also mentions \u0027This is not a Tax invoice,\u0027 which suggests it is a receipt or invoice-like document. However, it lacks a formal invoice number and seller details, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"September 6, 2025\",\n \"total_amount\": \"\u00a36.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": "both_agree",
"pattern_based": {
"confidence": 0.13333333333333333,
"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.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.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.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 28,
"text_length": 1277
}
],
"start_page": 26
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "14 November 2025",
"invoice_number": "GB50313PY1ZG51",
"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": "DG MULTIBAO LIMITED",
"statement_period": null,
"total_amount": "\u00a321.99"
},
"document_type": "invoice",
"end_page": 29,
"pages": [
{
"confidence_score": 0.95,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of \u0027Invoice\u0027 in the title, \u0027Invoice #\u0027 (GB50313PY1ZG51), \u0027Invoice date\u0027 (14 November 2025), \u0027Total payable\u0027 (\u00a321.99), and itemized details including description, quantity, unit price, VAT rate, and totals. Additionally, it includes billing and delivery addresses, as well as seller information, which are typical components of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"GB50313PY1ZG51\",\n \"seller_name\": \"DG MULTIBAO LIMITED\",\n \"invoice_date\": \"14 November 2025\",\n \"total_amount\": \"\u00a321.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-DX1oTVeBAFxteBvl59SizyRWr1RtN\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of \\\u0027Invoice\\\u0027 in the title, \\\u0027Invoice #\\\u0027 (GB50313PY1ZG51), \\\u0027Invoice date\\\u0027 (14 November 2025), \\\u0027Total payable\\\u0027 (\u00a321.99), and itemized details including description, quantity, unit price, VAT rate, and totals. Additionally, it includes billing and delivery addresses, as well as seller information, which are typical components of an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"GB50313PY1ZG51\",\\n \"seller_name\": \"DG MULTIBAO LIMITED\",\\n \"invoice_date\": \"14 November 2025\",\\n \"total_amount\": \"\u00a321.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=1776764165, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=276, prompt_tokens=1433, total_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "14 November 2025",
"invoice_number": "GB50313PY1ZG51",
"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": "DG MULTIBAO LIMITED",
"statement_period": null,
"total_amount": "\u00a321.99"
},
"llm_reasoning": "The document contains clear indicators of an invoice, such as the presence of \u0027Invoice\u0027 in the title, \u0027Invoice #\u0027 (GB50313PY1ZG51), \u0027Invoice date\u0027 (14 November 2025), \u0027Total payable\u0027 (\u00a321.99), and itemized details including description, quantity, unit price, VAT rate, and totals. Additionally, it includes billing and delivery addresses, as well as seller information, which are typical components of an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of \u0027Invoice\u0027 in the title, \u0027Invoice #\u0027 (GB50313PY1ZG51), \u0027Invoice date\u0027 (14 November 2025), \u0027Total payable\u0027 (\u00a321.99), and itemized details including description, quantity, unit price, VAT rate, and totals. Additionally, it includes billing and delivery addresses, as well as seller information, which are typical components of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"GB50313PY1ZG51\",\n \"seller_name\": \"DG MULTIBAO LIMITED\",\n \"invoice_date\": \"14 November 2025\",\n \"total_amount\": \"\u00a321.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": "both_agree",
"pattern_based": {
"confidence": 0.23333333333333334,
"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.3888888888888889,
"pattern_score": 0.0,
"total_score": 0.23333333333333334
},
"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.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 29,
"text_length": 1213
}
],
"start_page": 29
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "13.11.2025",
"invoice_number": "DS-AEU-INV-GB-2025-637044487",
"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": "wenzhouxinyedianzishangwuyouxiangongsi",
"statement_period": null,
"total_amount": "\u00a310.36"
},
"document_type": "invoice",
"end_page": 30,
"pages": [
{
"confidence_score": 0.95,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of an \u0027Invoice #\u0027 (DS-AEU-INV-GB-2025-637044487), \u0027Invoice date\u0027 (13.11.2025), \u0027Total payable\u0027 (\u00a310.36), and details about the seller and buyer. Additionally, it includes itemized descriptions, quantities, unit prices, VAT rates, and totals, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"DS-AEU-INV-GB-2025-637044487\",\n \"seller_name\": \"wenzhouxinyedianzishangwuyouxiangongsi\",\n \"invoice_date\": \"13.11.2025\",\n \"total_amount\": \"\u00a310.36\",\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-DX1oVMvHVMieyENL6Qj5X3k9bvWMx\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of an \\\u0027Invoice #\\\u0027 (DS-AEU-INV-GB-2025-637044487), \\\u0027Invoice date\\\u0027 (13.11.2025), \\\u0027Total payable\\\u0027 (\u00a310.36), and details about the seller and buyer. Additionally, it includes itemized descriptions, quantities, unit prices, VAT rates, and totals, which are typical of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"DS-AEU-INV-GB-2025-637044487\",\\n \"seller_name\": \"wenzhouxinyedianzishangwuyouxiangongsi\",\\n \"invoice_date\": \"13.11.2025\",\\n \"total_amount\": \"\u00a310.36\",\\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=1776764167, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=288, prompt_tokens=1540, total_tokens=1828, completion_tokens_details=Comple"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "13.11.2025",
"invoice_number": "DS-AEU-INV-GB-2025-637044487",
"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": "wenzhouxinyedianzishangwuyouxiangongsi",
"statement_period": null,
"total_amount": "\u00a310.36"
},
"llm_reasoning": "The document contains clear indicators of an invoice, such as the presence of an \u0027Invoice #\u0027 (DS-AEU-INV-GB-2025-637044487), \u0027Invoice date\u0027 (13.11.2025), \u0027Total payable\u0027 (\u00a310.36), and details about the seller and buyer. Additionally, it includes itemized descriptions, quantities, unit prices, VAT rates, and totals, which are typical of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of an \u0027Invoice #\u0027 (DS-AEU-INV-GB-2025-637044487), \u0027Invoice date\u0027 (13.11.2025), \u0027Total payable\u0027 (\u00a310.36), and details about the seller and buyer. Additionally, it includes itemized descriptions, quantities, unit prices, VAT rates, and totals, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"DS-AEU-INV-GB-2025-637044487\",\n \"seller_name\": \"wenzhouxinyedianzishangwuyouxiangongsi\",\n \"invoice_date\": \"13.11.2025\",\n \"total_amount\": \"\u00a310.36\",\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.23333333333333334,
"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.3888888888888889,
"pattern_score": 0.0,
"total_score": 0.23333333333333334
},
"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": 30,
"text_length": 1552
}
],
"start_page": 30
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "13 November 2025",
"invoice_number": "GB5005RMS3XOBI",
"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": "Giving Back Groups Ltd",
"statement_period": null,
"total_amount": "\u00a311.89"
},
"document_type": "invoice",
"end_page": 31,
"pages": [
{
"confidence_score": 0.95,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of an invoice, such as \u0027Invoice\u0027, \u0027Invoice #\u0027, \u0027Invoice date\u0027, \u0027Total payable\u0027, \u0027Sold by\u0027, and itemized details including description, quantity, unit price, VAT rate, and totals. These are all characteristic features of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"GB5005RMS3XOBI\",\n \"seller_name\": \"Giving Back Groups Ltd\",\n \"invoice_date\": \"13 November 2025\",\n \"total_amount\": \"\u00a311.89\",\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-DX1oXsVePPat2gAzmbGDBVi4sF0jo\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as \\\u0027Invoice\\\u0027, \\\u0027Invoice #\\\u0027, \\\u0027Invoice date\\\u0027, \\\u0027Total payable\\\u0027, \\\u0027Sold by\\\u0027, and itemized details including description, quantity, unit price, VAT rate, and totals. These are all characteristic features of an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"GB5005RMS3XOBI\",\\n \"seller_name\": \"Giving Back Groups Ltd\",\\n \"invoice_date\": \"13 November 2025\",\\n \"total_amount\": \"\u00a311.89\",\\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=1776764169, 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=1420, total_tokens=1660, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predic"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "13 November 2025",
"invoice_number": "GB5005RMS3XOBI",
"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": "Giving Back Groups Ltd",
"statement_period": null,
"total_amount": "\u00a311.89"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as \u0027Invoice\u0027, \u0027Invoice #\u0027, \u0027Invoice date\u0027, \u0027Total payable\u0027, \u0027Sold by\u0027, and itemized details including description, quantity, unit price, VAT rate, and totals. These are all characteristic features of an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of an invoice, such as \u0027Invoice\u0027, \u0027Invoice #\u0027, \u0027Invoice date\u0027, \u0027Total payable\u0027, \u0027Sold by\u0027, and itemized details including description, quantity, unit price, VAT rate, and totals. These are all characteristic features of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"GB5005RMS3XOBI\",\n \"seller_name\": \"Giving Back Groups Ltd\",\n \"invoice_date\": \"13 November 2025\",\n \"total_amount\": \"\u00a311.89\",\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.23333333333333334,
"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.3888888888888889,
"pattern_score": 0.0,
"total_score": 0.23333333333333334
},
"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.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 31,
"text_length": 1164
}
],
"start_page": 31
}
],
"page_classifications": [
{
"confidence_score": 0.85,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document lists various expense categories (e.g., entertainment, travel, equipment) along with their corresponding amounts, which is indicative of a nominal ledger or petty cash expenditure report. There are no indicators of invoices, agreements, or statements specific to loans, mortgages, or taxes.\",\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-DX1npbtykpuk52Rkpk3t2728mQoHQ\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.85,\\n \"reasoning\": \"The document lists various expense categories (e.g., entertainment, travel, equipment) along with their corresponding amounts, which is indicative of a nominal ledger or petty cash expenditure report. There are no indicators of invoices, agreements, or statements specific to loans, mortgages, or taxes.\",\\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=1776764125, 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=1090, total_tokens=1310, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), 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 lists various expense categories (e.g., entertainment, travel, equipment) along with their corresponding amounts, which is indicative of a nominal ledger or petty cash expenditure report. There are no indicators of invoices, agreements, or statements specific to loans, mortgages, or taxes.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document lists various expense categories (e.g., entertainment, travel, equipment) along with their corresponding amounts, which is indicative of a nominal ledger or petty cash expenditure report. There are no indicators of invoices, agreements, or statements specific to loans, mortgages, or taxes.\",\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.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": 212
},
{
"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 a list of purchased items, quantities, prices, VAT details, a total amount, and a seller name (ALDI STORES). However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"22.11.25\",\n \"total_amount\": \"26.39\",\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-DX1nq2crpUsCOlaMAApRYYu8sMZtr\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 a list of purchased items, quantities, prices, VAT details, a total amount, and a seller name (ALDI STORES). However, it lacks a clear invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"22.11.25\",\\n \"total_amount\": \"26.39\",\\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=1776764126, 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=1236, total_tokens=1461, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "22.11.25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "26.39"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a list of purchased items, quantities, prices, VAT details, a total amount, and a seller name (ALDI STORES). However, it lacks a clear invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a list of purchased items, quantities, prices, VAT details, a total amount, and a seller name (ALDI STORES). However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"22.11.25\",\n \"total_amount\": \"26.39\",\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.08333333333333334,
"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.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 2,
"text_length": 570
},
{
"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 a list of purchased items, quantities, prices, a total amount, and a seller name (\u0027Aldi\u0027). However, it lacks a clear invoice number and detailed invoice date, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi\",\n \"invoice_date\": \"21.11.25\",\n \"total_amount\": \"39.48\",\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-DX1nsy8kCRROhhndBRBgPFj9N6lra\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 a list of purchased items, quantities, prices, a total amount, and a seller name (\\\u0027Aldi\\\u0027). However, it lacks a clear invoice number and detailed invoice date, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Aldi\",\\n \"invoice_date\": \"21.11.25\",\\n \"total_amount\": \"39.48\",\\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=1776764128, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=222, prompt_tokens=1276, total_tokens=1498, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "21.11.25",
"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": "Aldi",
"statement_period": null,
"total_amount": "39.48"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a list of purchased items, quantities, prices, a total amount, and a seller name (\u0027Aldi\u0027). However, it lacks a clear invoice number and detailed invoice date, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a list of purchased items, quantities, prices, a total amount, and a seller name (\u0027Aldi\u0027). However, it lacks a clear invoice number and detailed invoice date, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi\",\n \"invoice_date\": \"21.11.25\",\n \"total_amount\": \"39.48\",\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.08333333333333334,
"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.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 3,
"text_length": 622
},
{
"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 a list of items with descriptions, quantities, and prices, as well as a subtotal and total amount. These are key indicators of an invoice. However, there is no explicit mention of an invoice number or seller name, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"SI STORES\",\n \"invoice_date\": \"14.11.25\",\n \"total_amount\": \"63.59\",\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-DX1ntFZicMttxgqzf4gNi9dBxFtZd\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 a list of items with descriptions, quantities, and prices, as well as a subtotal and total amount. These are key indicators of an invoice. However, there is no explicit mention of an invoice number or seller name, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"SI STORES\",\\n \"invoice_date\": \"14.11.25\",\\n \"total_amount\": \"63.59\",\\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=1776764129, 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=1736, total_tokens=1960, 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": "14.11.25",
"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": "SI STORES",
"statement_period": null,
"total_amount": "63.59"
},
"llm_reasoning": "The document contains a list of items with descriptions, quantities, and prices, as well as a subtotal and total amount. These are key indicators of an invoice. However, there is no explicit mention of an invoice number or seller name, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains a list of items with descriptions, quantities, and prices, as well as a subtotal and total amount. These are key indicators of an invoice. However, there is no explicit mention of an invoice number or seller name, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"SI STORES\",\n \"invoice_date\": \"14.11.25\",\n \"total_amount\": \"63.59\",\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.16666666666666669,
"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.25,
"total_score": 0.16666666666666669
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 4,
"text_length": 1640
},
{
"confidence_score": 0.8,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027TESCOLARA\u0027), a subtotal, savings, promotions, and a total amount. Additionally, it includes a VAT number and a transaction date (\u002720/11/2025\u0027), which are common in invoices. However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"TESCOLARA\",\n \"invoice_date\": \"20/11/2025\",\n \"total_amount\": \"\u00a34.00\",\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-DX1nuz25ZcIX6QtOqWfnXY1OY2FtY\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\\\u0027TESCOLARA\\\u0027), a subtotal, savings, promotions, and a total amount. Additionally, it includes a VAT number and a transaction date (\\\u002720/11/2025\\\u0027), which are common in invoices. However, it lacks a clear invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"TESCOLARA\",\\n \"invoice_date\": \"20/11/2025\",\\n \"total_amount\": \"\u00a34.00\",\\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=1776764130, 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=1199, total_tokens=1445, 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": "20/11/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": "TESCOLARA",
"statement_period": null,
"total_amount": "\u00a34.00"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027TESCOLARA\u0027), a subtotal, savings, promotions, and a total amount. Additionally, it includes a VAT number and a transaction date (\u002720/11/2025\u0027), which are common in invoices. However, it lacks a clear invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027TESCOLARA\u0027), a subtotal, savings, promotions, and a total amount. Additionally, it includes a VAT number and a transaction date (\u002720/11/2025\u0027), which are common in invoices. However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"TESCOLARA\",\n \"invoice_date\": \"20/11/2025\",\n \"total_amount\": \"\u00a34.00\",\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": "uncertain",
"pattern_based": {
"confidence": 0.1392857142857143,
"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.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.14285714285714285,
"total_score": 0.1392857142857143
},
"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": 5,
"text_length": 520
},
{
"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 a seller name (\u0027KAKA SUPERMARKET\u0027), a transaction date (\u002718/11/2025\u0027), and a total amount (\u0027GBP4.26\u0027). Additionally, it includes transaction details like \u0027TRANS ID\u0027, \u0027POS\u0027, and \u0027Staff ID\u0027, which are commonly found in receipts or invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"1625097\",\n \"seller_name\": \"KAKA SUPERMARKET\",\n \"invoice_date\": \"18/11/2025\",\n \"total_amount\": \"4.26\",\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-DX1nwjQJeo5uJGiaAgkL8MJVds0LT\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 a seller name (\\\u0027KAKA SUPERMARKET\\\u0027), a transaction date (\\\u002718/11/2025\\\u0027), and a total amount (\\\u0027GBP4.26\\\u0027). Additionally, it includes transaction details like \\\u0027TRANS ID\\\u0027, \\\u0027POS\\\u0027, and \\\u0027Staff ID\\\u0027, which are commonly found in receipts or invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"1625097\",\\n \"seller_name\": \"KAKA SUPERMARKET\",\\n \"invoice_date\": \"18/11/2025\",\\n \"total_amount\": \"4.26\",\\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=1776764132, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=250, prompt_tokens=1240, total_tokens=1490, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, reje"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "18/11/2025",
"invoice_number": "1625097",
"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": "KAKA SUPERMARKET",
"statement_period": null,
"total_amount": "4.26"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027KAKA SUPERMARKET\u0027), a transaction date (\u002718/11/2025\u0027), and a total amount (\u0027GBP4.26\u0027). Additionally, it includes transaction details like \u0027TRANS ID\u0027, \u0027POS\u0027, and \u0027Staff ID\u0027, which are commonly found in receipts or 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 a seller name (\u0027KAKA SUPERMARKET\u0027), a transaction date (\u002718/11/2025\u0027), and a total amount (\u0027GBP4.26\u0027). Additionally, it includes transaction details like \u0027TRANS ID\u0027, \u0027POS\u0027, and \u0027Staff ID\u0027, which are commonly found in receipts or invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"1625097\",\n \"seller_name\": \"KAKA SUPERMARKET\",\n \"invoice_date\": \"18/11/2025\",\n \"total_amount\": \"4.26\",\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.1392857142857143,
"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.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.125,
"total_score": 0.08333333333333334
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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": 6,
"text_length": 571
},
{
"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 itemized purchases with quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002718/11/25\u0027). However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"18/11/25\",\n \"total_amount\": \"52.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-DX1nxbxXah5fd2JadWrVaMT074KYD\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 itemized purchases with quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\\\u0027ALDI STORES\\\u0027) and a transaction date (\\\u002718/11/25\\\u0027). However, it lacks a clear invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"18/11/25\",\\n \"total_amount\": \"52.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=1776764133, 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=1341, total_tokens=1576, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "18/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "52.95"
},
"llm_reasoning": "The document contains itemized purchases with quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002718/11/25\u0027). However, it lacks a clear invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains itemized purchases with quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002718/11/25\u0027). However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"18/11/25\",\n \"total_amount\": \"52.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.08333333333333334,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 7,
"text_length": 830
},
{
"confidence_score": 0.8,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 17.20), and a transaction date (12/11/25). These are key indicators of an invoice or receipt. However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi Stores\",\n \"invoice_date\": \"12/11/25\",\n \"total_amount\": \"17.20\",\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-DX1nziTu6YDVi4CjQFKBR2mKD2c17\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 17.20), and a transaction date (12/11/25). These are key indicators of an invoice or receipt. However, it lacks a clear invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Aldi Stores\",\\n \"invoice_date\": \"12/11/25\",\\n \"total_amount\": \"17.20\",\\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=1776764135, 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=1231, total_tokens=1465, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_deta"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "12/11/25",
"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": "Aldi Stores",
"statement_period": null,
"total_amount": "17.20"
},
"llm_reasoning": "The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 17.20), and a transaction date (12/11/25). These are key indicators of an invoice or receipt. However, it lacks a clear invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 17.20), and a transaction date (12/11/25). These are key indicators of an invoice or receipt. However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi Stores\",\n \"invoice_date\": \"12/11/25\",\n \"total_amount\": \"17.20\",\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": "uncertain",
"pattern_based": {
"confidence": 0.1392857142857143,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 8,
"text_length": 640
},
{
"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 details of a purchase, including item descriptions, quantities, prices, a total amount, and a seller name (\u0027ALDI STORES\u0027). These are key indicators of an invoice. However, the document lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"16/11/25\",\n \"total_amount\": \"4.63\",\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-DX1o0xXzQuNgmIYbifuzu0wxhq9fr\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 details of a purchase, including item descriptions, quantities, prices, a total amount, and a seller name (\\\u0027ALDI STORES\\\u0027). These are key indicators of an invoice. However, the document lacks a formal invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"16/11/25\",\\n \"total_amount\": \"4.63\",\\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=1776764136, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=226, prompt_tokens=1265, total_tokens=1491, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "16/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "4.63"
},
"llm_reasoning": "The document contains details of a purchase, including item descriptions, quantities, prices, a total amount, and a seller name (\u0027ALDI STORES\u0027). These are key indicators of an invoice. However, the document lacks a formal invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains details of a purchase, including item descriptions, quantities, prices, a total amount, and a seller name (\u0027ALDI STORES\u0027). These are key indicators of an invoice. However, the document lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"16/11/25\",\n \"total_amount\": \"4.63\",\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.1392857142857143,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 9,
"text_length": 747
},
{
"confidence_score": 0.8,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of purchased items, their prices, a total amount, and a seller name (Aldi Stores). These are key indicators of an invoice. However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"15/11/25\",\n \"total_amount\": \"9.86\",\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-DX1o1vtdwsoIoogomuAGfxQgKsNsn\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains details of purchased items, their prices, a total amount, and a seller name (Aldi Stores). These are key indicators of an invoice. However, it lacks a clear invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"15/11/25\",\\n \"total_amount\": \"9.86\",\\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=1776764137, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=219, prompt_tokens=1281, total_tokens=1500, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_to"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "15/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "9.86"
},
"llm_reasoning": "The document contains details of purchased items, their prices, a total amount, and a seller name (Aldi Stores). These are key indicators of an invoice. However, it lacks a clear invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of purchased items, their prices, a total amount, and a seller name (Aldi Stores). These are key indicators of an invoice. However, it lacks a clear invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"15/11/25\",\n \"total_amount\": \"9.86\",\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": "uncertain",
"pattern_based": {
"confidence": 0.1392857142857143,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 10,
"text_length": 772
},
{
"confidence_score": 0.8,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027ALDI STORES\u0027), a total amount (\u00277.17 GBP\u0027), and a date (\u002720.11.25\u0027). However, the lack of a clear invoice number reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"2025-11-20\",\n \"total_amount\": \"7.17\",\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-DX1o3VosbXvQqZJFQ7zz4gsRinYZS\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\\\u0027ALDI STORES\\\u0027), a total amount (\\\u00277.17 GBP\\\u0027), and a date (\\\u002720.11.25\\\u0027). However, the lack of a clear invoice number reduces confidence slightly.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"2025-11-20\",\\n \"total_amount\": \"7.17\",\\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=1776764139, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=226, prompt_tokens=1136, total_tokens=1362, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-11-20",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "7.17"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027ALDI STORES\u0027), a total amount (\u00277.17 GBP\u0027), and a date (\u002720.11.25\u0027). However, the lack of a clear invoice number reduces confidence slightly.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027ALDI STORES\u0027), a total amount (\u00277.17 GBP\u0027), and a date (\u002720.11.25\u0027). However, the lack of a clear invoice number reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"2025-11-20\",\n \"total_amount\": \"7.17\",\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.08333333333333334,
"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.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 11,
"text_length": 355
},
{
"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 key indicators of an invoice, such as a receipt number (#8-71247), seller/company name (Abraxas Cookshop), a total amount (\u00a339.98), and an invoice date (Nov 12, 2025). Additionally, it includes itemized details with prices, VAT information, and a subtotal, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"#8-71247\",\n \"seller_name\": \"Abraxas Cookshop\",\n \"invoice_date\": \"Nov 12, 2025\",\n \"total_amount\": \"\u00a339.98\",\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-DX1o4iitPDkuSSBccGixIoMLrPhsX\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 key indicators of an invoice, such as a receipt number (#8-71247), seller/company name (Abraxas Cookshop), a total amount (\u00a339.98), and an invoice date (Nov 12, 2025). Additionally, it includes itemized details with prices, VAT information, and a subtotal, which are typical of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"#8-71247\",\\n \"seller_name\": \"Abraxas Cookshop\",\\n \"invoice_date\": \"Nov 12, 2025\",\\n \"total_amount\": \"\u00a339.98\",\\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=1776764140, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=255, prompt_tokens=1267, total_tokens=1522, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, r"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "Nov 12, 2025",
"invoice_number": "#8-71247",
"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": "Abraxas Cookshop",
"statement_period": null,
"total_amount": "\u00a339.98"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a receipt number (#8-71247), seller/company name (Abraxas Cookshop), a total amount (\u00a339.98), and an invoice date (Nov 12, 2025). Additionally, it includes itemized details with prices, VAT information, and a subtotal, which are typical of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a receipt number (#8-71247), seller/company name (Abraxas Cookshop), a total amount (\u00a339.98), and an invoice date (Nov 12, 2025). Additionally, it includes itemized details with prices, VAT information, and a subtotal, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"#8-71247\",\n \"seller_name\": \"Abraxas Cookshop\",\n \"invoice_date\": \"Nov 12, 2025\",\n \"total_amount\": \"\u00a339.98\",\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.06666666666666667,
"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.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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 12,
"text_length": 929
},
{
"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 details of purchased items, quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002716/11/25\u0027), which are typical elements of an invoice. However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"16/11/25\",\n \"total_amount\": \"12.71\",\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-DX1o6MyioO98tZKGvbnVzdgBqL1Zs\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 details of purchased items, quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\\\u0027ALDI STORES\\\u0027) and a transaction date (\\\u002716/11/25\\\u0027), which are typical elements of an invoice. However, it lacks a formal invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"ALDI STORES\",\\n \"invoice_date\": \"16/11/25\",\\n \"total_amount\": \"12.71\",\\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=1776764142, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=244, prompt_tokens=1278, total_tokens=1522, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "16/11/25",
"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": "ALDI STORES",
"statement_period": null,
"total_amount": "12.71"
},
"llm_reasoning": "The document contains details of purchased items, quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002716/11/25\u0027), which are typical elements of an invoice. However, it lacks a formal invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains details of purchased items, quantities, prices, and a total amount, which are key indicators of an invoice. Additionally, it includes a seller name (\u0027ALDI STORES\u0027) and a transaction date (\u002716/11/25\u0027), which are typical elements of an invoice. However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"ALDI STORES\",\n \"invoice_date\": \"16/11/25\",\n \"total_amount\": \"12.71\",\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.1392857142857143,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 711
},
{
"confidence_score": 0.7,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 4.76), and a transaction date (19/11/25). However, it lacks a clear invoice number and other typical invoice identifiers, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi Stores\",\n \"invoice_date\": \"19/11/25\",\n \"total_amount\": \"4.76\",\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-DX1o74uuhps2HDBOpO59lcocYJ64u\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 4.76), and a transaction date (19/11/25). However, it lacks a clear invoice number and other typical invoice identifiers, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Aldi Stores\",\\n \"invoice_date\": \"19/11/25\",\\n \"total_amount\": \"4.76\",\\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=1776764143, 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=1266, total_tokens=1495, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptToken"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "19/11/25",
"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": "Aldi Stores",
"statement_period": null,
"total_amount": "4.76"
},
"llm_reasoning": "The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 4.76), and a transaction date (19/11/25). However, it lacks a clear invoice number and other typical invoice identifiers, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 4.76), and a transaction date (19/11/25). However, it lacks a clear invoice number and other typical invoice identifiers, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi Stores\",\n \"invoice_date\": \"19/11/25\",\n \"total_amount\": \"4.76\",\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.08333333333333334,
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 14,
"text_length": 754
},
{
"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 a seller name (Post Office Ltd.), a date of issue, itemized prices, VAT details, and a total amount due. These are typical elements of an invoice or receipt.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Post Office Ltd.\",\n \"invoice_date\": \"31/10/2025\",\n \"total_amount\": \"12.20\",\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-DX1o98f9O6ow1XYRER0blI4gdUAOl\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 a seller name (Post Office Ltd.), a date of issue, itemized prices, VAT details, and a total amount due. These are typical elements of an invoice or receipt.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Post Office Ltd.\",\\n \"invoice_date\": \"31/10/2025\",\\n \"total_amount\": \"12.20\",\\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=1776764145, 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=1380, total_tokens=1600, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_token"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "31/10/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": "Post Office Ltd.",
"statement_period": null,
"total_amount": "12.20"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (Post Office Ltd.), a date of issue, itemized prices, VAT details, and a total amount due. These are typical elements of an invoice or receipt.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (Post Office Ltd.), a date of issue, itemized prices, VAT details, and a total amount due. These are typical elements of an invoice or receipt.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Post Office Ltd.\",\n \"invoice_date\": \"31/10/2025\",\n \"total_amount\": \"12.20\",\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.16666666666666669,
"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.1111111111111111,
"pattern_score": 0.25,
"total_score": 0.16666666666666669
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "invoice"
}
},
"page_number": 15,
"text_length": 910
},
{
"confidence_score": 0.7,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 1.15), and a date (04/10/25). These are key indicators of an invoice or receipt. However, the lack of a formal invoice number and structured invoice format reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi Stores\",\n \"invoice_date\": \"04/10/25\",\n \"total_amount\": \"GBP 1.15\",\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-DX1oAyOe00gFFDYbuFVSVFMWWCWgd\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 1.15), and a date (04/10/25). These are key indicators of an invoice or receipt. However, the lack of a formal invoice number and structured invoice format reduces confidence slightly.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Aldi Stores\",\\n \"invoice_date\": \"04/10/25\",\\n \"total_amount\": \"GBP 1.15\",\\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=1776764146, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=238, prompt_tokens=1254, total_tokens=1492, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), p"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "04/10/25",
"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": "Aldi Stores",
"statement_period": null,
"total_amount": "GBP 1.15"
},
"llm_reasoning": "The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 1.15), and a date (04/10/25). These are key indicators of an invoice or receipt. However, the lack of a formal invoice number and structured invoice format reduces confidence slightly.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a seller name (Aldi Stores), a total amount (GBP 1.15), and a date (04/10/25). These are key indicators of an invoice or receipt. However, the lack of a formal invoice number and structured invoice format reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Aldi Stores\",\n \"invoice_date\": \"04/10/25\",\n \"total_amount\": \"GBP 1.15\",\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": "uncertain",
"pattern_based": {
"confidence": 0.1392857142857143,
"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.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.14285714285714285,
"total_score": 0.1392857142857143
},
"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.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 16,
"text_length": 722
},
{
"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 a receipt or invoice, such as a seller name (\u0027Holland \u0026 Barrett\u0027), a transaction date (\u002702-10-2025\u0027), and a total amount (\u0027\u00a32.98\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Holland \u0026 Barrett\",\n \"invoice_date\": \"2025-10-02\",\n \"total_amount\": \"2.98\",\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-DX1oCQPAhWRUO4WhgMOHgK5KmVLWZ\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 a receipt or invoice, such as a seller name (\\\u0027Holland \u0026 Barrett\\\u0027), a transaction date (\\\u002702-10-2025\\\u0027), and a total amount (\\\u0027\u00a32.98\\\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Holland \u0026 Barrett\",\\n \"invoice_date\": \"2025-10-02\",\\n \"total_amount\": \"2.98\",\\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=1776764148, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=231, prompt_tokens=1374, total_tokens=1605, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptToke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-10-02",
"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": "Holland \u0026 Barrett",
"statement_period": null,
"total_amount": "2.98"
},
"llm_reasoning": "The document contains key indicators of a receipt or invoice, such as a seller name (\u0027Holland \u0026 Barrett\u0027), a transaction date (\u002702-10-2025\u0027), and a total amount (\u0027\u00a32.98\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of a receipt or invoice, such as a seller name (\u0027Holland \u0026 Barrett\u0027), a transaction date (\u002702-10-2025\u0027), and a total amount (\u0027\u00a32.98\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Holland \u0026 Barrett\",\n \"invoice_date\": \"2025-10-02\",\n \"total_amount\": \"2.98\",\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.1392857142857143,
"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.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.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.14285714285714285,
"total_score": 0.1392857142857143
},
"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": 17,
"text_length": 961
},
{
"confidence_score": 0.8,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of a receipt or invoice, such as a seller name (\u0027Holland\u0026Barrett\u0027), a transaction date (\u00272025-10-15\u0027), and a total amount (\u0027\u00a32.98\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Holland\u0026Barrett\",\n \"invoice_date\": \"2025-10-15\",\n \"total_amount\": \"2.98\",\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-DX1oDTTQsYQcnO9vgNxl08BgiKHSw\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains key indicators of a receipt or invoice, such as a seller name (\\\u0027Holland\u0026Barrett\\\u0027), a transaction date (\\\u00272025-10-15\\\u0027), and a total amount (\\\u0027\u00a32.98\\\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Holland\u0026Barrett\",\\n \"invoice_date\": \"2025-10-15\",\\n \"total_amount\": \"2.98\",\\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=1776764149, 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=1352, total_tokens=1585, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDet"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "2025-10-15",
"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": "Holland\u0026Barrett",
"statement_period": null,
"total_amount": "2.98"
},
"llm_reasoning": "The document contains key indicators of a receipt or invoice, such as a seller name (\u0027Holland\u0026Barrett\u0027), a transaction date (\u00272025-10-15\u0027), and a total amount (\u0027\u00a32.98\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of a receipt or invoice, such as a seller name (\u0027Holland\u0026Barrett\u0027), a transaction date (\u00272025-10-15\u0027), and a total amount (\u0027\u00a32.98\u0027). However, it lacks a formal invoice number, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Holland\u0026Barrett\",\n \"invoice_date\": \"2025-10-15\",\n \"total_amount\": \"2.98\",\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": "uncertain",
"pattern_based": {
"confidence": 0.1392857142857143,
"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.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.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"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.14285714285714285,
"total_score": 0.1392857142857143
},
"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": 18,
"text_length": 928
},
{
"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 a seller name (\u0027Magee Street Bakery\u0027), an order number (\u0027Order No: 54\u0027), a date (\u0027Thursday 23 October 2025\u0027), and a total amount (\u0027\u00a317.99\u0027). The presence of itemized purchases with prices further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"54\",\n \"seller_name\": \"Magee Street Bakery\",\n \"invoice_date\": \"23 October 2025\",\n \"total_amount\": \"\u00a317.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-DX1oELc1NcDJE1lqZBchAKlYwdvW4\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 a seller name (\\\u0027Magee Street Bakery\\\u0027), an order number (\\\u0027Order No: 54\\\u0027), a date (\\\u0027Thursday 23 October 2025\\\u0027), and a total amount (\\\u0027\u00a317.99\\\u0027). The presence of itemized purchases with prices further supports the classification as an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"54\",\\n \"seller_name\": \"Magee Street Bakery\",\\n \"invoice_date\": \"23 October 2025\",\\n \"total_amount\": \"\u00a317.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=1776764150, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=242, prompt_tokens=1180, total_tokens=1422, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rej"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "23 October 2025",
"invoice_number": "54",
"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": "Magee Street Bakery",
"statement_period": null,
"total_amount": "\u00a317.99"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027Magee Street Bakery\u0027), an order number (\u0027Order No: 54\u0027), a date (\u0027Thursday 23 October 2025\u0027), and a total amount (\u0027\u00a317.99\u0027). The presence of itemized purchases with prices further supports the classification as an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027Magee Street Bakery\u0027), an order number (\u0027Order No: 54\u0027), a date (\u0027Thursday 23 October 2025\u0027), and a total amount (\u0027\u00a317.99\u0027). The presence of itemized purchases with prices further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"54\",\n \"seller_name\": \"Magee Street Bakery\",\n \"invoice_date\": \"23 October 2025\",\n \"total_amount\": \"\u00a317.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.04,
"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.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.0,
"total_score": 0.0
}
},
"type": "credit_card"
}
},
"page_number": 19,
"text_length": 376
},
{
"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 a seller name (\u0027TESCO Hove Superstore\u0027), a VAT number, a subtotal, savings, promotions, and a total amount. Additionally, it includes a transaction date (\u002718/10/2025\u0027) and payment details (\u0027Mastercard Debit\u0027). These elements are consistent with a receipt or invoice format.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"TESCO Hove Superstore\",\n \"invoice_date\": \"18/10/2025\",\n \"total_amount\": \"\u00a37.70\",\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-DX1oGmuhSonOruNPEAAmepSzS5kOM\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 a seller name (\\\u0027TESCO Hove Superstore\\\u0027), a VAT number, a subtotal, savings, promotions, and a total amount. Additionally, it includes a transaction date (\\\u002718/10/2025\\\u0027) and payment details (\\\u0027Mastercard Debit\\\u0027). These elements are consistent with a receipt or invoice format.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"TESCO Hove Superstore\",\\n \"invoice_date\": \"18/10/2025\",\\n \"total_amount\": \"\u00a37.70\",\\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=1776764152, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=249, prompt_tokens=1199, total_tokens=1448, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "18/10/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": "TESCO Hove Superstore",
"statement_period": null,
"total_amount": "\u00a37.70"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027TESCO Hove Superstore\u0027), a VAT number, a subtotal, savings, promotions, and a total amount. Additionally, it includes a transaction date (\u002718/10/2025\u0027) and payment details (\u0027Mastercard Debit\u0027). These elements are consistent with a receipt or invoice format.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027TESCO Hove Superstore\u0027), a VAT number, a subtotal, savings, promotions, and a total amount. Additionally, it includes a transaction date (\u002718/10/2025\u0027) and payment details (\u0027Mastercard Debit\u0027). These elements are consistent with a receipt or invoice format.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"TESCO Hove Superstore\",\n \"invoice_date\": \"18/10/2025\",\n \"total_amount\": \"\u00a37.70\",\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.2042857142857143,
"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.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.16666666666666666,
"pattern_score": 0.14285714285714285,
"total_score": 0.2042857142857143
},
"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": 20,
"text_length": 534
},
{
"confidence_score": 0.8,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains indicators of an invoice, such as a seller name (\u0027CLASH RANSOMS\u0027), a VAT number, a date (\u002712-11-2025\u0027), and a total amount (\u00276.28\u0027). However, the formatting is somewhat unclear, and some details are ambiguous, which slightly lowers the confidence level.\",\n \"document_identifiers\": {\n \"invoice_number\": \"000078\",\n \"seller_name\": \"CLASH RANSOMS\",\n \"invoice_date\": \"12-11-2025\",\n \"total_amount\": \"6.28\",\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-DX1oHJA7NY3rwuWlE8rnDbq7bn3Fe\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains indicators of an invoice, such as a seller name (\\\u0027CLASH RANSOMS\\\u0027), a VAT number, a date (\\\u002712-11-2025\\\u0027), and a total amount (\\\u00276.28\\\u0027). However, the formatting is somewhat unclear, and some details are ambiguous, which slightly lowers the confidence level.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"000078\",\\n \"seller_name\": \"CLASH RANSOMS\",\\n \"invoice_date\": \"12-11-2025\",\\n \"total_amount\": \"6.28\",\\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=1776764153, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=241, prompt_tokens=1107, total_tokens=1348, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "12-11-2025",
"invoice_number": "000078",
"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": "CLASH RANSOMS",
"statement_period": null,
"total_amount": "6.28"
},
"llm_reasoning": "The document contains indicators of an invoice, such as a seller name (\u0027CLASH RANSOMS\u0027), a VAT number, a date (\u002712-11-2025\u0027), and a total amount (\u00276.28\u0027). However, the formatting is somewhat unclear, and some details are ambiguous, which slightly lowers the confidence level.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains indicators of an invoice, such as a seller name (\u0027CLASH RANSOMS\u0027), a VAT number, a date (\u002712-11-2025\u0027), and a total amount (\u00276.28\u0027). However, the formatting is somewhat unclear, and some details are ambiguous, which slightly lowers the confidence level.\",\n \"document_identifiers\": {\n \"invoice_number\": \"000078\",\n \"seller_name\": \"CLASH RANSOMS\",\n \"invoice_date\": \"12-11-2025\",\n \"total_amount\": \"6.28\",\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.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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 21,
"text_length": 201
},
{
"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 a seller name (\u0027Wickes\u0027), a VAT number (\u0027336 7258 81\u0027), and a date (\u002717/11\u0027). Additionally, the presence of a till number (\u002780 Till Three\u0027) and a time (\u002710:54\u0027) further supports the classification as a receipt or invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"03-3887\",\n \"seller_name\": \"Wickes\",\n \"invoice_date\": \"17/11/2025\",\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-DX1oJjklcd2X6Zmv3ZT9KEcsogFDS\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 a seller name (\\\u0027Wickes\\\u0027), a VAT number (\\\u0027336 7258 81\\\u0027), and a date (\\\u002717/11\\\u0027). Additionally, the presence of a till number (\\\u002780 Till Three\\\u0027) and a time (\\\u002710:54\\\u0027) further supports the classification as a receipt or invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"03-3887\",\\n \"seller_name\": \"Wickes\",\\n \"invoice_date\": \"17/11/2025\",\\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=1776764155, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=243, prompt_tokens=1081, total_tokens=1324, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prom"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "17/11/2025",
"invoice_number": "03-3887",
"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": "Wickes",
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027Wickes\u0027), a VAT number (\u0027336 7258 81\u0027), and a date (\u002717/11\u0027). Additionally, the presence of a till number (\u002780 Till Three\u0027) and a time (\u002710:54\u0027) further supports the classification as a receipt or invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027Wickes\u0027), a VAT number (\u0027336 7258 81\u0027), and a date (\u002717/11\u0027). Additionally, the presence of a till number (\u002780 Till Three\u0027) and a time (\u002710:54\u0027) further supports the classification as a receipt or invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"03-3887\",\n \"seller_name\": \"Wickes\",\n \"invoice_date\": \"17/11/2025\",\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": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.02564102564102564,
"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.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": "property_statement"
}
},
"page_number": 22,
"text_length": 206
},
{
"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 a seller name (\u0027M\u0026S\u0027), item descriptions with prices, a total amount (\u0027Balance to Pay: \u00a352.50\u0027), and a payment confirmation (\u0027Payment Approved\u0027). However, it lacks a clear \u0027Invoice Number\u0027 or explicit \u0027Invoice Date,\u0027 which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"M\u0026S\",\n \"invoice_date\": null,\n \"total_amount\": \"\u00a352.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-DX1oKbn53zu7htU4P1fkDa8302aS0\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 a seller name (\\\u0027M\u0026S\\\u0027), item descriptions with prices, a total amount (\\\u0027Balance to Pay: \u00a352.50\\\u0027), and a payment confirmation (\\\u0027Payment Approved\\\u0027). However, it lacks a clear \\\u0027Invoice Number\\\u0027 or explicit \\\u0027Invoice Date,\\\u0027 which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"M\u0026S\",\\n \"invoice_date\": null,\\n \"total_amount\": \"\u00a352.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=1776764156, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=232, prompt_tokens=1346, total_tokens=1578, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predicti"
},
"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": "M\u0026S",
"statement_period": null,
"total_amount": "\u00a352.50"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a seller name (\u0027M\u0026S\u0027), item descriptions with prices, a total amount (\u0027Balance to Pay: \u00a352.50\u0027), and a payment confirmation (\u0027Payment Approved\u0027). However, it lacks a clear \u0027Invoice Number\u0027 or explicit \u0027Invoice Date,\u0027 which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a seller name (\u0027M\u0026S\u0027), item descriptions with prices, a total amount (\u0027Balance to Pay: \u00a352.50\u0027), and a payment confirmation (\u0027Payment Approved\u0027). However, it lacks a clear \u0027Invoice Number\u0027 or explicit \u0027Invoice Date,\u0027 which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"M\u0026S\",\n \"invoice_date\": null,\n \"total_amount\": \"\u00a352.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.07058823529411765,
"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.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": "bank_statement"
}
},
"page_number": 23,
"text_length": 1170
},
{
"confidence_score": 0.7,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains terms such as \u0027Date of Sale\u0027, \u0027Value\u0027, and \u0027Issuing Office\u0027, which are indicative of an invoice. However, the lack of explicit terms like \u0027Invoice Number\u0027 or \u0027Total Amount\u0027 reduces confidence slightly. The presence of a monetary value (\u00a343.10) and a date (29-SEP-25) further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"BRIGHTON\",\n \"invoice_date\": \"29-SEP-25\",\n \"total_amount\": \"43.10\",\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-DX1oMdnmnOdrxUg6ExqksJaYBvpK4\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document contains terms such as \\\u0027Date of Sale\\\u0027, \\\u0027Value\\\u0027, and \\\u0027Issuing Office\\\u0027, which are indicative of an invoice. However, the lack of explicit terms like \\\u0027Invoice Number\\\u0027 or \\\u0027Total Amount\\\u0027 reduces confidence slightly. The presence of a monetary value (\u00a343.10) and a date (29-SEP-25) further supports the classification as an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"BRIGHTON\",\\n \"invoice_date\": \"29-SEP-25\",\\n \"total_amount\": \"43.10\",\\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=1776764158, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=249, prompt_tokens=1080, total_tokens=1329, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "29-SEP-25",
"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": "BRIGHTON",
"statement_period": null,
"total_amount": "43.10"
},
"llm_reasoning": "The document contains terms such as \u0027Date of Sale\u0027, \u0027Value\u0027, and \u0027Issuing Office\u0027, which are indicative of an invoice. However, the lack of explicit terms like \u0027Invoice Number\u0027 or \u0027Total Amount\u0027 reduces confidence slightly. The presence of a monetary value (\u00a343.10) and a date (29-SEP-25) further supports the classification as an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains terms such as \u0027Date of Sale\u0027, \u0027Value\u0027, and \u0027Issuing Office\u0027, which are indicative of an invoice. However, the lack of explicit terms like \u0027Invoice Number\u0027 or \u0027Total Amount\u0027 reduces confidence slightly. The presence of a monetary value (\u00a343.10) and a date (29-SEP-25) further supports the classification as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"BRIGHTON\",\n \"invoice_date\": \"29-SEP-25\",\n \"total_amount\": \"43.10\",\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": "uncertain",
"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.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 24,
"text_length": 242
},
{
"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 key indicators of an invoice, such as the presence of the word \u0027INVOICE,\u0027 a seller name (\u0027HOVE CAR WASH\u0027), a date (\u002702.10.25\u0027), and a total amount (\u0027\u20b9 18.00\u0027). These elements are consistent with the structure of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"HOVE CAR WASH\",\n \"invoice_date\": \"02.10.25\",\n \"total_amount\": \"\u20b9 18.00\",\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-DX1oNwDdtYuHl0onBeseN3KRILDHC\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 key indicators of an invoice, such as the presence of the word \\\u0027INVOICE,\\\u0027 a seller name (\\\u0027HOVE CAR WASH\\\u0027), a date (\\\u002702.10.25\\\u0027), and a total amount (\\\u0027\u20b9 18.00\\\u0027). These elements are consistent with the structure of an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"HOVE CAR WASH\",\\n \"invoice_date\": \"02.10.25\",\\n \"total_amount\": \"\u20b9 18.00\",\\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=1776764159, 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=1039, total_tokens=1276, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDeta"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "02.10.25",
"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": "HOVE CAR WASH",
"statement_period": null,
"total_amount": "\u20b9 18.00"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as the presence of the word \u0027INVOICE,\u0027 a seller name (\u0027HOVE CAR WASH\u0027), a date (\u002702.10.25\u0027), and a total amount (\u0027\u20b9 18.00\u0027). These elements are consistent with the structure of an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains key indicators of an invoice, such as the presence of the word \u0027INVOICE,\u0027 a seller name (\u0027HOVE CAR WASH\u0027), a date (\u002702.10.25\u0027), and a total amount (\u0027\u20b9 18.00\u0027). These elements are consistent with the structure of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"HOVE CAR WASH\",\n \"invoice_date\": \"02.10.25\",\n \"total_amount\": \"\u20b9 18.00\",\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.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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 25,
"text_length": 101
},
{
"confidence_score": 0.7,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.51), a date (September 14, 2025), and a seller/service provider (Uber). However, it explicitly states \u0027This is not a Tax invoice,\u0027 which lowers confidence slightly. Despite this, the structure and content align most closely with an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"2025-09-14\",\n \"total_amount\": \"7.51\",\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-DX1oPvPQRpycXRlOSePELH5f5AUsC\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.51), a date (September 14, 2025), and a seller/service provider (Uber). However, it explicitly states \\\u0027This is not a Tax invoice,\\\u0027 which lowers confidence slightly. Despite this, the structure and content align most closely with an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Uber\",\\n \"invoice_date\": \"2025-09-14\",\\n \"total_amount\": \"7.51\",\\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=1776764161, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=239, prompt_tokens=1369, total_tokens=1608, 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": "2025-09-14",
"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": "Uber",
"statement_period": null,
"total_amount": "7.51"
},
"llm_reasoning": "The document contains details of a transaction, including a total amount (\u00a37.51), a date (September 14, 2025), and a seller/service provider (Uber). However, it explicitly states \u0027This is not a Tax invoice,\u0027 which lowers confidence slightly. Despite this, the structure and content align most closely with an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.51), a date (September 14, 2025), and a seller/service provider (Uber). However, it explicitly states \u0027This is not a Tax invoice,\u0027 which lowers confidence slightly. Despite this, the structure and content align most closely with an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"2025-09-14\",\n \"total_amount\": \"7.51\",\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.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.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.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": 26,
"text_length": 1200
},
{
"confidence_score": 0.8,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.23), a date (September 18, 2025), and a seller/service provider (Uber). While it explicitly states \u0027This is not a Tax invoice,\u0027 the structure and content closely resemble an invoice or receipt, which is why it is classified as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"2025-09-18\",\n \"total_amount\": \"\u00a37.23\",\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-DX1oQbzjpmghRdy5GDf7FGNy7dvMg\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.23), a date (September 18, 2025), and a seller/service provider (Uber). While it explicitly states \\\u0027This is not a Tax invoice,\\\u0027 the structure and content closely resemble an invoice or receipt, which is why it is classified as an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Uber\",\\n \"invoice_date\": \"2025-09-18\",\\n \"total_amount\": \"\u00a37.23\",\\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=1776764162, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=241, prompt_tokens=1380, total_tokens=1621, 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": "2025-09-18",
"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": "Uber",
"statement_period": null,
"total_amount": "\u00a37.23"
},
"llm_reasoning": "The document contains details of a transaction, including a total amount (\u00a37.23), a date (September 18, 2025), and a seller/service provider (Uber). While it explicitly states \u0027This is not a Tax invoice,\u0027 the structure and content closely resemble an invoice or receipt, which is why it is classified as an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a37.23), a date (September 18, 2025), and a seller/service provider (Uber). While it explicitly states \u0027This is not a Tax invoice,\u0027 the structure and content closely resemble an invoice or receipt, which is why it is classified as an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"2025-09-18\",\n \"total_amount\": \"\u00a37.23\",\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.18333333333333335,
"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.2222222222222222,
"pattern_score": 0.125,
"total_score": 0.18333333333333335
},
"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.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 27,
"text_length": 1222
},
{
"confidence_score": 0.8,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a36.99), a payment method (Visa **** 9969), and a date (September 6, 2025). It also mentions \u0027This is not a Tax invoice,\u0027 which suggests it is a receipt or invoice-like document. However, it lacks a formal invoice number and seller details, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"September 6, 2025\",\n \"total_amount\": \"\u00a36.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-DX1oSLvAdiEL6Chew0RIftGuMm9mp\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a36.99), a payment method (Visa **** 9969), and a date (September 6, 2025). It also mentions \\\u0027This is not a Tax invoice,\\\u0027 which suggests it is a receipt or invoice-like document. However, it lacks a formal invoice number and seller details, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Uber\",\\n \"invoice_date\": \"September 6, 2025\",\\n \"total_amount\": \"\u00a36.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=1776764164, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=251, prompt_tokens=1387, total_tokens=1638, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "September 6, 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": "Uber",
"statement_period": null,
"total_amount": "\u00a36.99"
},
"llm_reasoning": "The document contains details of a transaction, including a total amount (\u00a36.99), a payment method (Visa **** 9969), and a date (September 6, 2025). It also mentions \u0027This is not a Tax invoice,\u0027 which suggests it is a receipt or invoice-like document. However, it lacks a formal invoice number and seller details, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains details of a transaction, including a total amount (\u00a36.99), a payment method (Visa **** 9969), and a date (September 6, 2025). It also mentions \u0027This is not a Tax invoice,\u0027 which suggests it is a receipt or invoice-like document. However, it lacks a formal invoice number and seller details, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Uber\",\n \"invoice_date\": \"September 6, 2025\",\n \"total_amount\": \"\u00a36.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": "both_agree",
"pattern_based": {
"confidence": 0.13333333333333333,
"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.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.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.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 28,
"text_length": 1277
},
{
"confidence_score": 0.95,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of \u0027Invoice\u0027 in the title, \u0027Invoice #\u0027 (GB50313PY1ZG51), \u0027Invoice date\u0027 (14 November 2025), \u0027Total payable\u0027 (\u00a321.99), and itemized details including description, quantity, unit price, VAT rate, and totals. Additionally, it includes billing and delivery addresses, as well as seller information, which are typical components of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"GB50313PY1ZG51\",\n \"seller_name\": \"DG MULTIBAO LIMITED\",\n \"invoice_date\": \"14 November 2025\",\n \"total_amount\": \"\u00a321.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-DX1oTVeBAFxteBvl59SizyRWr1RtN\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of \\\u0027Invoice\\\u0027 in the title, \\\u0027Invoice #\\\u0027 (GB50313PY1ZG51), \\\u0027Invoice date\\\u0027 (14 November 2025), \\\u0027Total payable\\\u0027 (\u00a321.99), and itemized details including description, quantity, unit price, VAT rate, and totals. Additionally, it includes billing and delivery addresses, as well as seller information, which are typical components of an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"GB50313PY1ZG51\",\\n \"seller_name\": \"DG MULTIBAO LIMITED\",\\n \"invoice_date\": \"14 November 2025\",\\n \"total_amount\": \"\u00a321.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=1776764165, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=276, prompt_tokens=1433, total_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "14 November 2025",
"invoice_number": "GB50313PY1ZG51",
"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": "DG MULTIBAO LIMITED",
"statement_period": null,
"total_amount": "\u00a321.99"
},
"llm_reasoning": "The document contains clear indicators of an invoice, such as the presence of \u0027Invoice\u0027 in the title, \u0027Invoice #\u0027 (GB50313PY1ZG51), \u0027Invoice date\u0027 (14 November 2025), \u0027Total payable\u0027 (\u00a321.99), and itemized details including description, quantity, unit price, VAT rate, and totals. Additionally, it includes billing and delivery addresses, as well as seller information, which are typical components of an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of \u0027Invoice\u0027 in the title, \u0027Invoice #\u0027 (GB50313PY1ZG51), \u0027Invoice date\u0027 (14 November 2025), \u0027Total payable\u0027 (\u00a321.99), and itemized details including description, quantity, unit price, VAT rate, and totals. Additionally, it includes billing and delivery addresses, as well as seller information, which are typical components of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"GB50313PY1ZG51\",\n \"seller_name\": \"DG MULTIBAO LIMITED\",\n \"invoice_date\": \"14 November 2025\",\n \"total_amount\": \"\u00a321.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": "both_agree",
"pattern_based": {
"confidence": 0.23333333333333334,
"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.3888888888888889,
"pattern_score": 0.0,
"total_score": 0.23333333333333334
},
"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.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 29,
"text_length": 1213
},
{
"confidence_score": 0.95,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of an \u0027Invoice #\u0027 (DS-AEU-INV-GB-2025-637044487), \u0027Invoice date\u0027 (13.11.2025), \u0027Total payable\u0027 (\u00a310.36), and details about the seller and buyer. Additionally, it includes itemized descriptions, quantities, unit prices, VAT rates, and totals, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"DS-AEU-INV-GB-2025-637044487\",\n \"seller_name\": \"wenzhouxinyedianzishangwuyouxiangongsi\",\n \"invoice_date\": \"13.11.2025\",\n \"total_amount\": \"\u00a310.36\",\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-DX1oVMvHVMieyENL6Qj5X3k9bvWMx\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of an \\\u0027Invoice #\\\u0027 (DS-AEU-INV-GB-2025-637044487), \\\u0027Invoice date\\\u0027 (13.11.2025), \\\u0027Total payable\\\u0027 (\u00a310.36), and details about the seller and buyer. Additionally, it includes itemized descriptions, quantities, unit prices, VAT rates, and totals, which are typical of invoices.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"DS-AEU-INV-GB-2025-637044487\",\\n \"seller_name\": \"wenzhouxinyedianzishangwuyouxiangongsi\",\\n \"invoice_date\": \"13.11.2025\",\\n \"total_amount\": \"\u00a310.36\",\\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=1776764167, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=288, prompt_tokens=1540, total_tokens=1828, completion_tokens_details=Comple"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "13.11.2025",
"invoice_number": "DS-AEU-INV-GB-2025-637044487",
"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": "wenzhouxinyedianzishangwuyouxiangongsi",
"statement_period": null,
"total_amount": "\u00a310.36"
},
"llm_reasoning": "The document contains clear indicators of an invoice, such as the presence of an \u0027Invoice #\u0027 (DS-AEU-INV-GB-2025-637044487), \u0027Invoice date\u0027 (13.11.2025), \u0027Total payable\u0027 (\u00a310.36), and details about the seller and buyer. Additionally, it includes itemized descriptions, quantities, unit prices, VAT rates, and totals, which are typical of invoices.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains clear indicators of an invoice, such as the presence of an \u0027Invoice #\u0027 (DS-AEU-INV-GB-2025-637044487), \u0027Invoice date\u0027 (13.11.2025), \u0027Total payable\u0027 (\u00a310.36), and details about the seller and buyer. Additionally, it includes itemized descriptions, quantities, unit prices, VAT rates, and totals, which are typical of invoices.\",\n \"document_identifiers\": {\n \"invoice_number\": \"DS-AEU-INV-GB-2025-637044487\",\n \"seller_name\": \"wenzhouxinyedianzishangwuyouxiangongsi\",\n \"invoice_date\": \"13.11.2025\",\n \"total_amount\": \"\u00a310.36\",\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.23333333333333334,
"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.3888888888888889,
"pattern_score": 0.0,
"total_score": 0.23333333333333334
},
"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": 30,
"text_length": 1552
},
{
"confidence_score": 0.95,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of an invoice, such as \u0027Invoice\u0027, \u0027Invoice #\u0027, \u0027Invoice date\u0027, \u0027Total payable\u0027, \u0027Sold by\u0027, and itemized details including description, quantity, unit price, VAT rate, and totals. These are all characteristic features of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"GB5005RMS3XOBI\",\n \"seller_name\": \"Giving Back Groups Ltd\",\n \"invoice_date\": \"13 November 2025\",\n \"total_amount\": \"\u00a311.89\",\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-DX1oXsVePPat2gAzmbGDBVi4sF0jo\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as \\\u0027Invoice\\\u0027, \\\u0027Invoice #\\\u0027, \\\u0027Invoice date\\\u0027, \\\u0027Total payable\\\u0027, \\\u0027Sold by\\\u0027, and itemized details including description, quantity, unit price, VAT rate, and totals. These are all characteristic features of an invoice.\",\\n \"document_identifiers\": {\\n \"invoice_number\": \"GB5005RMS3XOBI\",\\n \"seller_name\": \"Giving Back Groups Ltd\",\\n \"invoice_date\": \"13 November 2025\",\\n \"total_amount\": \"\u00a311.89\",\\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=1776764169, 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=1420, total_tokens=1660, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predic"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "13 November 2025",
"invoice_number": "GB5005RMS3XOBI",
"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": "Giving Back Groups Ltd",
"statement_period": null,
"total_amount": "\u00a311.89"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as \u0027Invoice\u0027, \u0027Invoice #\u0027, \u0027Invoice date\u0027, \u0027Total payable\u0027, \u0027Sold by\u0027, and itemized details including description, quantity, unit price, VAT rate, and totals. These are all characteristic features of an invoice.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of an invoice, such as \u0027Invoice\u0027, \u0027Invoice #\u0027, \u0027Invoice date\u0027, \u0027Total payable\u0027, \u0027Sold by\u0027, and itemized details including description, quantity, unit price, VAT rate, and totals. These are all characteristic features of an invoice.\",\n \"document_identifiers\": {\n \"invoice_number\": \"GB5005RMS3XOBI\",\n \"seller_name\": \"Giving Back Groups Ltd\",\n \"invoice_date\": \"13 November 2025\",\n \"total_amount\": \"\u00a311.89\",\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.23333333333333334,
"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.3888888888888889,
"pattern_score": 0.0,
"total_score": 0.23333333333333334
},
"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.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 31,
"text_length": 1164
},
{
"confidence_score": 0.7,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains references to a fee, payment, and a signature acknowledging receipt of payment, which are indicative of an invoice or payment receipt. However, it lacks explicit identifiers like \u0027invoice number\u0027 or \u0027seller name,\u0027 which reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": \"19/11/25\",\n \"total_amount\": \"50.00\",\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-DX1oYNE9BiuiQUAMe2XjCJBZ0LzHB\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document contains references to a fee, payment, and a signature acknowledging receipt of payment, which are indicative of an invoice or payment receipt. However, it lacks explicit identifiers like \\\u0027invoice number\\\u0027 or \\\u0027seller name,\\\u0027 which reduces confidence slightly.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": \"19/11/25\",\\n \"total_amount\": \"50.00\",\\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=1776764170, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=218, prompt_tokens=1112, total_tokens=1330, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTo"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "19/11/25",
"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": "50.00"
},
"llm_reasoning": "The document contains references to a fee, payment, and a signature acknowledging receipt of payment, which are indicative of an invoice or payment receipt. However, it lacks explicit identifiers like \u0027invoice number\u0027 or \u0027seller name,\u0027 which reduces confidence slightly.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains references to a fee, payment, and a signature acknowledging receipt of payment, which are indicative of an invoice or payment receipt. However, it lacks explicit identifiers like \u0027invoice number\u0027 or \u0027seller name,\u0027 which reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": \"19/11/25\",\n \"total_amount\": \"50.00\",\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": "uncertain",
"pattern_based": {
"confidence": 0.015,
"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.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": "payroll_statement"
}
},
"page_number": 32,
"text_length": 298
},
{
"confidence_score": 0.7,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a payment amount (\u00a360), a date (20/11/25), and a signature indicating receipt of payment for a performance. However, it lacks a formal invoice number and seller/company name, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": \"20/11/25\",\n \"total_amount\": \"\u00a360\",\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-DX1oa3co9jgcN7qyrRwsjgeggv11p\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as a payment amount (\u00a360), a date (20/11/25), and a signature indicating receipt of payment for a performance. However, it lacks a formal invoice number and seller/company name, which slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": \"20/11/25\",\\n \"total_amount\": \"\u00a360\",\\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=1776764172, 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=1099, total_tokens=1322, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDet"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "20/11/25",
"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": "\u00a360"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a payment amount (\u00a360), a date (20/11/25), and a signature indicating receipt of payment for a performance. However, it lacks a formal invoice number and seller/company name, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a payment amount (\u00a360), a date (20/11/25), and a signature indicating receipt of payment for a performance. However, it lacks a formal invoice number and seller/company name, which slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": \"20/11/25\",\n \"total_amount\": \"\u00a360\",\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": "uncertain",
"pattern_based": {
"confidence": 0.015,
"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.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": "payroll_statement"
}
},
"page_number": 33,
"text_length": 278
},
{
"confidence_score": 0.7,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document mentions a fee, payment received, and a performance date, which are indicative of an invoice or receipt for services rendered. However, it lacks explicit invoice identifiers like \u0027Invoice Number\u0027 or \u0027Seller Name,\u0027 reducing confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": \"21/11/25\",\n \"total_amount\": \"120\",\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-DX1ocl5PwRYUb9d45gq8EvOwWQJNZ\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document mentions a fee, payment received, and a performance date, which are indicative of an invoice or receipt for services rendered. However, it lacks explicit invoice identifiers like \\\u0027Invoice Number\\\u0027 or \\\u0027Seller Name,\\\u0027 reducing confidence slightly.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": \"21/11/25\",\\n \"total_amount\": \"120\",\\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=1776764174, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=214, prompt_tokens=1102, total_tokens=1316, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "21/11/25",
"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": "120"
},
"llm_reasoning": "The document mentions a fee, payment received, and a performance date, which are indicative of an invoice or receipt for services rendered. However, it lacks explicit invoice identifiers like \u0027Invoice Number\u0027 or \u0027Seller Name,\u0027 reducing confidence slightly.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document mentions a fee, payment received, and a performance date, which are indicative of an invoice or receipt for services rendered. However, it lacks explicit invoice identifiers like \u0027Invoice Number\u0027 or \u0027Seller Name,\u0027 reducing confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": \"21/11/25\",\n \"total_amount\": \"120\",\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": "uncertain",
"pattern_based": {
"confidence": 0.0,
"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.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": "bank_statement"
}
},
"page_number": 34,
"text_length": 298
},
{
"confidence_score": 0.7,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.7,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document mentions a fee, payment received, and a performance, which aligns with the structure of an invoice. However, it lacks explicit identifiers like \u0027invoice number\u0027 or \u0027seller name,\u0027 which reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": \"22nd NOV 25\",\n \"total_amount\": \"\u00a3200.00\",\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-DX1od0GW7PTSO6KBLi6IIgDWmLCYz\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.7,\\n \"reasoning\": \"The document mentions a fee, payment received, and a performance, which aligns with the structure of an invoice. However, it lacks explicit identifiers like \\\u0027invoice number\\\u0027 or \\\u0027seller name,\\\u0027 which reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": \"22nd NOV 25\",\\n \"total_amount\": \"\u00a3200.00\",\\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=1776764175, 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=1104, total_tokens=1316, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=1024))"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "22nd NOV 25",
"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": "\u00a3200.00"
},
"llm_reasoning": "The document mentions a fee, payment received, and a performance, which aligns with the structure of an invoice. However, it lacks explicit identifiers like \u0027invoice number\u0027 or \u0027seller name,\u0027 which reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.7,\n \"reasoning\": \"The document mentions a fee, payment received, and a performance, which aligns with the structure of an invoice. However, it lacks explicit identifiers like \u0027invoice number\u0027 or \u0027seller name,\u0027 which reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": \"22nd NOV 25\",\n \"total_amount\": \"\u00a3200.00\",\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": "uncertain",
"pattern_based": {
"confidence": 0.015,
"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.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": "payroll_statement"
}
},
"page_number": 35,
"text_length": 307
}
],
"processing_timestamp": "2026-04-21T09:36:17.404374"
}