| Original Filename: | ilovepdf_merged_8.pdf |
| Upload Date: | December 11, 2025 at 02:57 PM |
| Total Pages: | 33 |
| Processing Status: | Completed |
| Total Documents: | 9 |
| Bank Statements: | 1 |
| Credit Cards: | 1 |
| Hp Agreements: | 1 |
| Loan Statements: | 2 |
| Mortgage Statements: | 1 |
| Property Statements: | 1 |
| Financial Statements: | 1 |
| Corporation Taxs: | 1 |
Bank Statement
95%Bank Statement
95%Bank Statement
95%Bank Statement
95%Bank Statement
95%Bank Statement
95%Credit Card
95%Credit Card
95%Credit Card
95%Credit Card
95%Credit Card
95%Hp Agreement
95%Hp Agreement
95%Hp Agreement
95%Hp Agreement
95%Hp Agreement
95%Loan Statement
85%Mortgage Statement
95%Mortgage Statement
95%Mortgage Statement
95%Loan Statement
95%Loan Statement
95%Property Statement
95%Financial Statement
90%Financial Statement
95%Financial Statement
90%Financial Statement
95%Financial Statement
95%Financial Statement
95%Financial Statement
95%Financial Statement
95%Corporation Tax
95%Corporation Tax
95%| Document Type | Pages | Confidence | Processing Status | Created | Actions |
|---|---|---|---|---|---|
| Bank Statement | 1-6 (6 pages) | 95% | Processed | 2025-12-11 14:57 | View |
| Credit Card | 7-11 (5 pages) | 95% | Processed | 2025-12-11 14:58 | View |
| Hp Agreement | 12-16 (5 pages) | 95% | Processed | 2025-12-11 14:58 | View |
| Loan Statement | 17 (1 page) | 85% | Processed | 2025-12-11 14:58 | View |
| Mortgage Statement | 18-20 (3 pages) | 95% | Processed | 2025-12-11 14:58 | View |
| Loan Statement | 21-22 (2 pages) | 95% | Processed | 2025-12-11 14:58 | View |
| Property Statement | 23 (1 page) | 95% | Processed | 2025-12-11 14:58 | No view available |
| Financial Statement | 24-31 (8 pages) | 94% | Processed | 2025-12-11 14:58 | No view available |
| Corporation Tax | 32-33 (2 pages) | 95% | Processed | 2025-12-11 14:58 | No view available |
{
"document_groups": [
{
"avg_confidence": 0.9499999999999998,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01 JAN 2025 to 31 JAN 2025",
"total_amount": null
},
"document_type": "bank_statement",
"end_page": 6,
"pages": [
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, statement date, period covered, previous balance, new balance, and detailed transaction records with dates, descriptions, amounts paid in and withdrawn, and running balances. These are all characteristic features of a bank statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 JAN 2025 to 31 JAN 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcNjwmTJ3908YvAQONMzZNqK7rJv\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, statement date, period covered, previous balance, new balance, and detailed transaction records with dates, descriptions, amounts paid in and withdrawn, and running balances. These are all characteristic features of a bank statement.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01 JAN 2025 to 31 JAN 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464991, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=237, prompt_tokens=2056, total_tokens=2293, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01 JAN 2025 to 31 JAN 2025",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as account name, account number, sort code, statement date, period covered, previous balance, new balance, and detailed transaction records with dates, descriptions, amounts paid in and withdrawn, and running balances. These are all characteristic features of a bank statement.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, statement date, period covered, previous balance, new balance, and detailed transaction records with dates, descriptions, amounts paid in and withdrawn, and running balances. These are all characteristic features of a bank statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 JAN 2025 to 31 JAN 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.10588235294117647,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.13333333333333333,
"pattern_score": 0.0,
"total_score": 0.08
},
"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.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 1,
"text_length": 2962
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no mention of credit card details, invoices, payroll, loans, mortgages, or other financial documents.\",\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-ClcNkOohHzdcRQKKnncPSXmgc4Dnb\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no mention of credit card details, invoices, payroll, loans, mortgages, or other financial documents.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464992, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=217, prompt_tokens=2164, total_tokens=2381, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_detai"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no mention of credit card details, invoices, payroll, loans, mortgages, or other financial documents.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no mention of credit card details, invoices, payroll, loans, mortgages, or other financial documents.\",\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": "bank_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.10588235294117647,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"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": 2,
"text_length": 3154
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no evidence of credit card details, invoices, payroll information, or other financial document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcNmwGcC7zlqhSX03e47BCGvRYa6\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no evidence of credit card details, invoices, payroll information, or other financial document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464994, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=218, prompt_tokens=2148, total_tokens=2366, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no evidence of credit card details, invoices, payroll information, or other financial document types.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no evidence of credit card details, invoices, payroll information, or other financial document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.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.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 3,
"text_length": 3463
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There are no indicators of other document types like invoices, loan statements, or mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcNoOI6j7mw3IvpozhhPbdED7zdy\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There are no indicators of other document types like invoices, loan statements, or mortgage statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464996, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=218, prompt_tokens=2207, total_tokens=2425, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tok"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as an account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There are no indicators of other document types like invoices, loan statements, or mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There are no indicators of other document types like invoices, loan statements, or mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.10588235294117647,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 4,
"text_length": 3080
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction descriptions, dates, deposits, withdrawals, and balances. It also includes the name of the bank (NatWest) and references to automated credits and charges, which are typical of bank statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcNqDkl1HZbHI90Fd1bsUgVH52GX\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction descriptions, dates, deposits, withdrawals, and balances. It also includes the name of the bank (NatWest) and references to automated credits and charges, which are typical of bank statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464998, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=219, prompt_tokens=1394, total_tokens=1613, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction descriptions, dates, deposits, withdrawals, and balances. It also includes the name of the bank (NatWest) and references to automated credits and charges, which are typical of bank statements.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction descriptions, dates, deposits, withdrawals, and balances. It also includes the name of the bank (NatWest) and references to automated credits and charges, which are typical of bank statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0975,
"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.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 1219
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, and references to banking services like paperless statements and financial health checks. There are no mentions of transactions, but the overall structure and content align with a bank statement.\",\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-ClcNrT7SjJg0juvpcweyVh6kXVTlY\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, and references to banking services like paperless statements and financial health checks. There are no mentions of transactions, but the overall structure and content align with a bank statement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464999, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=217, prompt_tokens=1624, total_tokens=1841, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), promp"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as an account name, account number, sort code, and references to banking services like paperless statements and financial health checks. There are no mentions of transactions, but the overall structure and content align with a bank statement.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, and references to banking services like paperless statements and financial health checks. There are no mentions of transactions, but the overall structure and content align with a bank statement.\",\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": "bank_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.03529411764705882,
"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.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
},
"payroll": {
"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": 6,
"text_length": 4017
}
],
"start_page": 1
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "From 27 May to 26 June 2024",
"total_amount": null
},
"document_type": "credit_card",
"end_page": 11,
"pages": [
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, spending limit, payment due date, statement period, and transaction details. It also includes a closing balance and references to a card membership fee, which are typical of credit card statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"From 27 May to 26 June 2024\",\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-ClcNtSy70UKbevjJyoGv8K34BGex2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, spending limit, payment due date, statement period, and transaction details. It also includes a closing balance and references to a card membership fee, which are typical of credit card statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"From 27 May to 26 June 2024\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465001, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=227, prompt_tokens=1419, total_tokens=1646, 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": 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": "From 27 May to 26 June 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a credit card statement, such as a membership number, spending limit, payment due date, statement period, and transaction details. It also includes a closing balance and references to a card membership fee, which are typical of credit card statements.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, spending limit, payment due date, statement period, and transaction details. It also includes a closing balance and references to a card membership fee, which are typical of credit card statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"From 27 May to 26 June 2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.1411764705882353,
"features": {
"bank_statement": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.0,
"total_score": 0.1411764705882353
},
"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.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 7,
"text_length": 1691
},
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains details of a credit card statement, including cardholder name, card number, transaction dates, transaction details, and amounts. It also includes payment instructions specific to a credit card account, such as Direct Debit and Internet Banking options. These are key indicators of a credit card statement.\",\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-ClcNv72pYsWWkpvhuVSUGo1ch44p2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains details of a credit card statement, including cardholder name, card number, transaction dates, transaction details, and amounts. It also includes payment instructions specific to a credit card account, such as Direct Debit and Internet Banking options. These are key indicators of a credit card statement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465003, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=220, prompt_tokens=1832, total_tokens=2052, 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": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains details of a credit card statement, including cardholder name, card number, transaction dates, transaction details, and amounts. It also includes payment instructions specific to a credit card account, such as Direct Debit and Internet Banking options. These are key indicators of a credit card statement.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains details of a credit card statement, including cardholder name, card number, transaction dates, transaction details, and amounts. It also includes payment instructions specific to a credit card account, such as Direct Debit and Internet Banking options. These are key indicators of a credit card statement.\",\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": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.19831932773109243,
"features": {
"bank_statement": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.14285714285714285,
"total_score": 0.19831932773109243
},
"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.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 8,
"text_length": 3498
},
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, transaction details, a next statement date, and a breakdown of spend transactions. It does not include indicators of other document types like invoices, loan statements, or payroll.\",\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-ClcNxpCBilio3yeylfIArZ50tkkvL\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, transaction details, a next statement date, and a breakdown of spend transactions. It does not include indicators of other document types like invoices, loan statements, or payroll.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465005, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1072, total_tokens=1284, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a credit card statement, such as a membership number, transaction details, a next statement date, and a breakdown of spend transactions. It does not include indicators of other document types like invoices, loan statements, or payroll.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, transaction details, a next statement date, and a breakdown of spend transactions. It does not include indicators of other document types like invoices, loan statements, or payroll.\",\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": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03529411764705882,
"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.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
},
"payroll": {
"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": 9,
"text_length": 401
},
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a credit card account, including a card type (SBS Platinum Charge Card), card number (masked), membership rewards points, and a statement period. These are key indicators of a credit card statement.\",\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\": \"20/05/24 to 19/06/24\",\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-ClcNz5lge38acaWInstwrcFFiQSSf\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a credit card account, including a card type (SBS Platinum Charge Card), card number (masked), membership rewards points, and a statement period. These are key indicators of a credit card statement.\",\\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\": \"20/05/24 to 19/06/24\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465007, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=220, prompt_tokens=1474, total_tokens=1694, 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, ca"
},
"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": "20/05/24 to 19/06/24",
"total_amount": null
},
"llm_reasoning": "The document contains references to a credit card account, including a card type (SBS Platinum Charge Card), card number (masked), membership rewards points, and a statement period. These are key indicators of a credit card statement.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a credit card account, including a card type (SBS Platinum Charge Card), card number (masked), membership rewards points, and a statement period. These are key indicators of a credit card statement.\",\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\": \"20/05/24 to 19/06/24\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.10588235294117647,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.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
},
"payroll": {
"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": 10,
"text_length": 2145
},
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a statement for an American Express Business Platinum Card, which is a credit card. It includes details such as \u0027Statement of Account,\u0027 \u0027Membership Number,\u0027 and \u0027Next Statement Date,\u0027 which are typical indicators of a credit card statement. There is no mention of transactions, balances, or other details that would classify it as a bank statement or other document type.\",\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-ClcO1Z6WmBCe0TWXsx66GPnN9UPF8\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is a statement for an American Express Business Platinum Card, which is a credit card. It includes details such as \\\u0027Statement of Account,\\\u0027 \\\u0027Membership Number,\\\u0027 and \\\u0027Next Statement Date,\\\u0027 which are typical indicators of a credit card statement. There is no mention of transactions, balances, or other details that would classify it as a bank statement or other document type.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465009, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=236, prompt_tokens=1117, total_tokens=1353, completion_tokens_details=CompletionTokensDetails(accepted_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": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is a statement for an American Express Business Platinum Card, which is a credit card. It includes details such as \u0027Statement of Account,\u0027 \u0027Membership Number,\u0027 and \u0027Next Statement Date,\u0027 which are typical indicators of a credit card statement. There is no mention of transactions, balances, or other details that would classify it as a bank statement or other document type.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a statement for an American Express Business Platinum Card, which is a credit card. It includes details such as \u0027Statement of Account,\u0027 \u0027Membership Number,\u0027 and \u0027Next Statement Date,\u0027 which are typical indicators of a credit card statement. There is no mention of transactions, balances, or other details that would classify it as a bank statement or other document type.\",\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": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03529411764705882,
"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.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
},
"payroll": {
"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": 11,
"text_length": 682
}
],
"start_page": 7
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": "date it is signed by Aldermore",
"amount_financed": "54,256.58",
"annual_interest_rate": "5% per annum above Finance House Base Rate",
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": "36",
"monthly_payment": "1,760.08",
"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": "hp_agreement",
"end_page": 16,
"pages": [
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": \"54,256.58\",\n \"monthly_payment\": \"1,760.08\",\n \"loan_tenure\": \"36\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-ClcO30KuZtDSpE3QQRUMu1dmWJbYt\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Hire Purchase Agreement\\\u0027 and includes key indicators such as \\\u0027Agreement Number\\\u0027, \\\u0027Balance Financed\\\u0027, \\\u0027Monthly Payment\\\u0027, \\\u0027Hire Period\\\u0027, and \\\u0027Option to Purchase Fee\\\u0027. These are specific to hire purchase agreements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": \"54,256.58\",\\n \"monthly_payment\": \"1,760.08\",\\n \"loan_tenure\": \"36\",\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465011, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=221, prompt_tokens=1687, total_tokens=1908, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": "54,256.58",
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": "36",
"monthly_payment": "1,760.08",
"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 explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": \"54,256.58\",\n \"monthly_payment\": \"1,760.08\",\n \"loan_tenure\": \"36\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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": "hp_agreement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.18653846153846151,
"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.2692307692307692,
"pattern_score": 0.0625,
"total_score": 0.18653846153846151
},
"invoice": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"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.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "hp_agreement"
}
},
"page_number": 12,
"text_length": 2556
},
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027finance\u0027, \u0027Supplier\u0027, \u0027Equipment\u0027, and \u0027settlement amount\u0027. It also includes terms related to business finance and exemption declarations under financial regulations, which are typical in hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": 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-ClcO5P794PeFhINuvTE0SFzAqIJKT\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \\\u0027Agreement\\\u0027, \\\u0027finance\\\u0027, \\\u0027Supplier\\\u0027, \\\u0027Equipment\\\u0027, and \\\u0027settlement amount\\\u0027. It also includes terms related to business finance and exemption declarations under financial regulations, which are typical in hire purchase agreements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": 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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465013, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=219, prompt_tokens=1558, total_tokens=1777, 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": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027finance\u0027, \u0027Supplier\u0027, \u0027Equipment\u0027, and \u0027settlement amount\u0027. It also includes terms related to business finance and exemption declarations under financial regulations, which are typical in hire purchase agreements.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027finance\u0027, \u0027Supplier\u0027, \u0027Equipment\u0027, and \u0027settlement amount\u0027. It also includes terms related to business finance and exemption declarations under financial regulations, which are typical in hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0975,
"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.07692307692307693,
"pattern_score": 0.0,
"total_score": 0.046153846153846156
},
"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.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 4689
},
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types like invoices, bank statements, or loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": \"date it is signed by Aldermore\",\n \"amount_financed\": null,\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\n \"outstanding_balance\": null,\n \"statement_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-ClcO7Y3bGvzgoE5CTXUsnaZfIH0NN\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \\\u0027Agreement\\\u0027, \\\u0027Hire\\\u0027, \\\u0027Equipment\\\u0027, \\\u0027Payment of Rentals\\\u0027, \\\u0027Direct Debit\\\u0027, \\\u0027amount financed\\\u0027, and \\\u0027monthly payment\\\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types like invoices, bank statements, or loan statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": \"date it is signed by Aldermore\",\\n \"amount_financed\": null,\\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\\n \"outstanding_balance\": null,\\n \"statement_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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465015, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=263, p"
},
"document_identifiers": {
"agreement_date": "date it is signed by Aldermore",
"amount_financed": null,
"annual_interest_rate": "5% per annum above Finance House Base Rate",
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": "Rentals and any other payments specified on page 1",
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types like invoices, bank statements, or loan statements.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types like invoices, bank statements, or loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": \"date it is signed by Aldermore\",\n \"amount_financed\": null,\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\n \"outstanding_balance\": null,\n \"statement_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": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.2374736842105263,
"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.2631578947368421,
"pattern_score": 0.1,
"total_score": 0.2374736842105263
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 14,
"text_length": 12322
},
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to terms commonly associated with hire purchase agreements, such as \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, the document mentions clauses related to payments, insurance, and termination, which are typical in hire purchase agreements. The presence of the company name \u0027Aldermore\u0027 further supports this classification.\",\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-ClcO9Lt3vBMjufnhpE1QpWhF5p4qX\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to terms commonly associated with hire purchase agreements, such as \\\u0027Equipment\\\u0027, \\\u0027Insurance monies\\\u0027, \\\u0027Total Loss\\\u0027, \\\u0027Rentals\\\u0027, and \\\u0027Termination\\\u0027. Additionally, the document mentions clauses related to payments, insurance, and termination, which are typical in hire purchase agreements. The presence of the company name \\\u0027Aldermore\\\u0027 further supports this classification.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465017, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=239, prompt_tokens=1628, total_tokens=1867, completion_tokens_details=CompletionT"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to terms commonly associated with hire purchase agreements, such as \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, the document mentions clauses related to payments, insurance, and termination, which are typical in hire purchase agreements. The presence of the company name \u0027Aldermore\u0027 further supports this classification.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to terms commonly associated with hire purchase agreements, such as \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, the document mentions clauses related to payments, insurance, and termination, which are typical in hire purchase agreements. The presence of the company name \u0027Aldermore\u0027 further supports this classification.\",\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": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.042352941176470586
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.0,
"total_score": 0.0757894736842105
},
"hp_agreement": {
"keyword_score": 0.07692307692307693,
"pattern_score": 0.0625,
"total_score": 0.07115384615384615
},
"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.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.05,
"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": 15,
"text_length": 11405
},
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to \u0027Agreement,\u0027 \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 and \u0027Equipment,\u0027 which are key indicators of a hire purchase agreement. Additionally, terms like \u0027amounts payable,\u0027 \u0027option to purchase fee,\u0027 and \u0027termination of the hiring of the Equipment\u0027 strongly suggest this is a hire purchase agreement.\",\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-ClcOBNM990UDLbeElFqHHXaoGEuWD\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to \\\u0027Agreement,\\\u0027 \\\u0027Option to Purchase,\\\u0027 \\\u0027Rentals,\\\u0027 and \\\u0027Equipment,\\\u0027 which are key indicators of a hire purchase agreement. Additionally, terms like \\\u0027amounts payable,\\\u0027 \\\u0027option to purchase fee,\\\u0027 and \\\u0027termination of the hiring of the Equipment\\\u0027 strongly suggest this is a hire purchase agreement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465019, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=229, prompt_tokens=1583, total_tokens=1812, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to \u0027Agreement,\u0027 \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 and \u0027Equipment,\u0027 which are key indicators of a hire purchase agreement. Additionally, terms like \u0027amounts payable,\u0027 \u0027option to purchase fee,\u0027 and \u0027termination of the hiring of the Equipment\u0027 strongly suggest this is a hire purchase agreement.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to \u0027Agreement,\u0027 \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 and \u0027Equipment,\u0027 which are key indicators of a hire purchase agreement. Additionally, terms like \u0027amounts payable,\u0027 \u0027option to purchase fee,\u0027 and \u0027termination of the hiring of the Equipment\u0027 strongly suggest this is a hire purchase agreement.\",\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": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.10897435897435898,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.10526315789473684,
"pattern_score": 0.0,
"total_score": 0.0757894736842105
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.050526315789473676
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.02564102564102564,
"total_score": 0.10897435897435898
}
},
"type": "property_statement"
}
},
"page_number": 16,
"text_length": 10817
}
],
"start_page": 12
},
{
"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": "loan_statement",
"end_page": 17,
"pages": [
{
"confidence_score": 0.85,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical in loan account management. However, the document does not explicitly include specific loan details like loan reference or outstanding balance, which slightly reduces confidence.\",\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-ClcODkMmPpJe6KRMNYnb6aRl71eMS\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"loan_statement\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical in loan account management. However, the document does not explicitly include specific loan details like loan reference or outstanding balance, which slightly reduces confidence.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465021, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=241, prompt_tokens=153"
},
"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 discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical in loan account management. However, the document does not explicitly include specific loan details like loan reference or outstanding balance, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical in loan account management. However, the document does not explicitly include specific loan details like loan reference or outstanding balance, which slightly reduces confidence.\",\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": "loan_statement"
},
"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.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.041666666666666664
}
},
"type": "bank_statement"
}
},
"page_number": 17,
"text_length": 7424
}
],
"start_page": 17
},
{
"avg_confidence": 0.9499999999999998,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "3.59%",
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\u00a3804.94",
"mortgage_account_number": "71019693",
"outstanding_balance": "\u00a3268,999.95",
"property_address": "160, Humber Avenue, Coventry, CV1 2AR",
"remaining_term_months": 277,
"seller_name": null,
"statement_period": "1 October 2023 - 30 September 2024",
"total_amount": null
},
"document_type": "mortgage_statement",
"end_page": 20,
"pages": [
{
"confidence_score": 0.95,
"document_type": "mortgage_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as \u0027mortgage account number\u0027, \u0027property address\u0027, \u0027remaining term\u0027, \u0027monthly payment\u0027, \u0027account balance\u0027, and \u0027current interest rate\u0027. Additionally, it explicitly mentions \u0027annual mortgage statement\u0027 and provides details about the mortgage account and repayment terms.\",\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\": \"71019693\",\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\n \"remaining_term_months\": 277,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOEEO6qCPzrAu2Xr2p4RxdP75Tq\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"mortgage_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as \\\u0027mortgage account number\\\u0027, \\\u0027property address\\\u0027, \\\u0027remaining term\\\u0027, \\\u0027monthly payment\\\u0027, \\\u0027account balance\\\u0027, and \\\u0027current interest rate\\\u0027. Additionally, it explicitly mentions \\\u0027annual mortgage statement\\\u0027 and provides details about the mortgage account and repayment terms.\",\\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\": \"71019693\",\\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\\n \"remaining_term_months\": 277,\\n \"monthly_payment_amount\": \"\u00a3804.94\"\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465022, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=244, prompt_tokens=1480, total_tokens=1724, completion_tokens_details=CompletionTokensDetails(accepted_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\u00a3804.94",
"mortgage_account_number": "71019693",
"outstanding_balance": null,
"property_address": "160, Humber Avenue, Coventry, CV1 2AR",
"remaining_term_months": 277,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as \u0027mortgage account number\u0027, \u0027property address\u0027, \u0027remaining term\u0027, \u0027monthly payment\u0027, \u0027account balance\u0027, and \u0027current interest rate\u0027. Additionally, it explicitly mentions \u0027annual mortgage statement\u0027 and provides details about the mortgage account and repayment terms.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as \u0027mortgage account number\u0027, \u0027property address\u0027, \u0027remaining term\u0027, \u0027monthly payment\u0027, \u0027account balance\u0027, and \u0027current interest rate\u0027. Additionally, it explicitly mentions \u0027annual mortgage statement\u0027 and provides details about the mortgage account and repayment terms.\",\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\": \"71019693\",\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\n \"remaining_term_months\": 277,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.4912280701754386,
"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.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.2894736842105263,
"pattern_score": 0.3333333333333333,
"total_score": 0.4912280701754386
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": "mortgage_statement"
}
},
"page_number": 18,
"text_length": 2038
},
{
"confidence_score": 0.95,
"document_type": "mortgage_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Annual Statement\u0027 and includes key indicators such as \u0027Account holder(s)\u0027, \u0027Property address\u0027, \u0027Account number\u0027, \u0027Opening balance\u0027, \u0027Direct debit\u0027, \u0027Interest charge\u0027, and \u0027Instalment due\u0027. Additionally, it mentions a property address and a mortgage account number, which are specific to mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3268,999.95\",\n \"statement_period\": \"1 October 2023 - 30 September 2024\",\n \"mortgage_account_number\": \"71019693\",\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOGJiNsc0ZM5dcE0b3mh6svCoPn\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"mortgage_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Annual Statement\\\u0027 and includes key indicators such as \\\u0027Account holder(s)\\\u0027, \\\u0027Property address\\\u0027, \\\u0027Account number\\\u0027, \\\u0027Opening balance\\\u0027, \\\u0027Direct debit\\\u0027, \\\u0027Interest charge\\\u0027, and \\\u0027Instalment due\\\u0027. Additionally, it mentions a property address and a mortgage account number, which are specific to mortgage statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a3268,999.95\",\\n \"statement_period\": \"1 October 2023 - 30 September 2024\",\\n \"mortgage_account_number\": \"71019693\",\\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3804.94\"\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465024, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=266, prompt_tokens=1759, total_tokens=2025, completion_tokens_d"
},
"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": "\u00a3804.94",
"mortgage_account_number": "71019693",
"outstanding_balance": "\u00a3268,999.95",
"property_address": "160, Humber Avenue, Coventry, CV1 2AR",
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1 October 2023 - 30 September 2024",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Annual Statement\u0027 and includes key indicators such as \u0027Account holder(s)\u0027, \u0027Property address\u0027, \u0027Account number\u0027, \u0027Opening balance\u0027, \u0027Direct debit\u0027, \u0027Interest charge\u0027, and \u0027Instalment due\u0027. Additionally, it mentions a property address and a mortgage account number, which are specific to mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Annual Statement\u0027 and includes key indicators such as \u0027Account holder(s)\u0027, \u0027Property address\u0027, \u0027Account number\u0027, \u0027Opening balance\u0027, \u0027Direct debit\u0027, \u0027Interest charge\u0027, and \u0027Instalment due\u0027. Additionally, it mentions a property address and a mortgage account number, which are specific to mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3268,999.95\",\n \"statement_period\": \"1 October 2023 - 30 September 2024\",\n \"mortgage_account_number\": \"71019693\",\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.1411764705882353,
"features": {
"bank_statement": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.0,
"total_score": 0.1411764705882353
},
"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.07894736842105263,
"pattern_score": 0.09523809523809523,
"total_score": 0.13674185463659147
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 19,
"text_length": 2145
},
{
"confidence_score": 0.95,
"document_type": "mortgage_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as references to \u0027mortgage\u0027, \u0027property\u0027, \u0027interest rate\u0027, \u0027arrears balance\u0027, \u0027monthly instalment\u0027, and \u0027outstanding balance\u0027. It also includes a warning about property repossession, which is typical for mortgage documents.\",\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\": \"3.59%\",\n \"outstanding_balance\": \"\u00a3268,984.99\",\n \"statement_period\": \"1 October 2023 to 30 September 2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOIyTx7muFlaPlwBhVdTx6qEki5\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"mortgage_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as references to \\\u0027mortgage\\\u0027, \\\u0027property\\\u0027, \\\u0027interest rate\\\u0027, \\\u0027arrears balance\\\u0027, \\\u0027monthly instalment\\\u0027, and \\\u0027outstanding balance\\\u0027. It also includes a warning about property repossession, which is typical for mortgage documents.\",\\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\": \"3.59%\",\\n \"outstanding_balance\": \"\u00a3268,984.99\",\\n \"statement_period\": \"1 October 2023 to 30 September 2024\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3804.94\"\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465026, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1129, total_tokens=1375, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reason"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "3.59%",
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\u00a3804.94",
"mortgage_account_number": null,
"outstanding_balance": "\u00a3268,984.99",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1 October 2023 to 30 September 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as references to \u0027mortgage\u0027, \u0027property\u0027, \u0027interest rate\u0027, \u0027arrears balance\u0027, \u0027monthly instalment\u0027, and \u0027outstanding balance\u0027. It also includes a warning about property repossession, which is typical for mortgage documents.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as references to \u0027mortgage\u0027, \u0027property\u0027, \u0027interest rate\u0027, \u0027arrears balance\u0027, \u0027monthly instalment\u0027, and \u0027outstanding balance\u0027. It also includes a warning about property repossession, which is typical for mortgage documents.\",\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\": \"3.59%\",\n \"outstanding_balance\": \"\u00a3268,984.99\",\n \"statement_period\": \"1 October 2023 to 30 September 2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.10626566416040101,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.07894736842105263,
"pattern_score": 0.047619047619047616,
"total_score": 0.10626566416040101
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"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": "mortgage_statement"
}
},
"page_number": 20,
"text_length": 615
}
],
"start_page": 18
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "2.500%",
"invoice_date": null,
"invoice_number": null,
"loan_reference": "23653883476995",
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": "14966.52",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "10 August 2024 to 11 August 2025",
"total_amount": null
},
"document_type": "loan_statement",
"end_page": 22,
"pages": [
{
"confidence_score": 0.95,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Account Statement\u0027 and includes key indicators such as \u0027Barclayloan for Business\u0027, \u0027Annual Interest Rates\u0027, \u0027Loan Account Statement\u0027, \u0027Direct Debit Payment\u0027, and \u0027Interest\u0027. It also contains a loan account reference number, a list of transactions, and an outstanding balance, which are typical of loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": \"23653883476995\",\n \"annual_interest_rate\": \"2.500%\",\n \"outstanding_balance\": \"14966.52\",\n \"statement_period\": \"10 August 2024 to 11 August 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOK0NEhcTWDIZijqAhtk0XLt9xM\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"loan_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Loan Account Statement\\\u0027 and includes key indicators such as \\\u0027Barclayloan for Business\\\u0027, \\\u0027Annual Interest Rates\\\u0027, \\\u0027Loan Account Statement\\\u0027, \\\u0027Direct Debit Payment\\\u0027, and \\\u0027Interest\\\u0027. It also contains a loan account reference number, a list of transactions, and an outstanding balance, which are typical of loan statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": \"23653883476995\",\\n \"annual_interest_rate\": \"2.500%\",\\n \"outstanding_balance\": \"14966.52\",\\n \"statement_period\": \"10 August 2024 to 11 August 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465028, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=255, prompt_tokens=1435, total_tokens=1690, completion_tokens_details=CompletionTokensDetails("
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "2.500%",
"invoice_date": null,
"invoice_number": null,
"loan_reference": "23653883476995",
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": "14966.52",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "10 August 2024 to 11 August 2025",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Account Statement\u0027 and includes key indicators such as \u0027Barclayloan for Business\u0027, \u0027Annual Interest Rates\u0027, \u0027Loan Account Statement\u0027, \u0027Direct Debit Payment\u0027, and \u0027Interest\u0027. It also contains a loan account reference number, a list of transactions, and an outstanding balance, which are typical of loan statements.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Account Statement\u0027 and includes key indicators such as \u0027Barclayloan for Business\u0027, \u0027Annual Interest Rates\u0027, \u0027Loan Account Statement\u0027, \u0027Direct Debit Payment\u0027, and \u0027Interest\u0027. It also contains a loan account reference number, a list of transactions, and an outstanding balance, which are typical of loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": \"23653883476995\",\n \"annual_interest_rate\": \"2.500%\",\n \"outstanding_balance\": \"14966.52\",\n \"statement_period\": \"10 August 2024 to 11 August 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.9272727272727272,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.3333333333333333,
"pattern_score": 0.2727272727272727,
"strong_indicators": true,
"total_score": 0.9272727272727272
},
"mortgage_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.050526315789473676
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": "loan_statement"
}
},
"page_number": 21,
"text_length": 1272
},
{
"confidence_score": 0.95,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a loan statement, such as references to \u0027Direct Debit Payment,\u0027 \u0027Interest,\u0027 \u0027Closing Balance,\u0027 and \u0027The balance shown is not a settlement figure.\u0027 Additionally, the document mentions Barclays Bank, which is a financial institution, and includes a running balance with debits and credits, typical of loan repayment tracking.\",\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\": \"10833.49\",\n \"statement_period\": \"17 Feb 2025 - 11 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOMexYNjpSw5KEicTAsY3WofmMY\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"loan_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a loan statement, such as references to \\\u0027Direct Debit Payment,\\\u0027 \\\u0027Interest,\\\u0027 \\\u0027Closing Balance,\\\u0027 and \\\u0027The balance shown is not a settlement figure.\\\u0027 Additionally, the document mentions Barclays Bank, which is a financial institution, and includes a running balance with debits and credits, typical of loan repayment tracking.\",\\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\": \"10833.49\",\\n \"statement_period\": \"17 Feb 2025 - 11 Aug 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465030, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1409, total_tokens=1655, completion_tokens_details=CompletionTokensDetails(accepte"
},
"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": "10833.49",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "17 Feb 2025 - 11 Aug 2025",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a loan statement, such as references to \u0027Direct Debit Payment,\u0027 \u0027Interest,\u0027 \u0027Closing Balance,\u0027 and \u0027The balance shown is not a settlement figure.\u0027 Additionally, the document mentions Barclays Bank, which is a financial institution, and includes a running balance with debits and credits, typical of loan repayment tracking.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a loan statement, such as references to \u0027Direct Debit Payment,\u0027 \u0027Interest,\u0027 \u0027Closing Balance,\u0027 and \u0027The balance shown is not a settlement figure.\u0027 Additionally, the document mentions Barclays Bank, which is a financial institution, and includes a running balance with debits and credits, typical of loan repayment tracking.\",\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\": \"10833.49\",\n \"statement_period\": \"17 Feb 2025 - 11 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0975,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"strong_indicators": true,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 22,
"text_length": 1598
}
],
"start_page": 21
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"completion_date": "15th July 2022",
"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": "36 Noreen Avenue, Prestwich, Manchester, Greater Manchester, M25 ILT",
"purchase_sale_price": "\u00a3192,600.00",
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "property_statement",
"end_page": 23,
"pages": [
{
"confidence_score": 0.95,
"document_type": "property_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"property_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Completion Statement\u0027 and includes key indicators such as \u0027Completion Date,\u0027 \u0027Sale price of the property,\u0027 and \u0027Property address.\u0027 It also lists payments received, charges, and disbursements related to the sale of a property, which are characteristic of a property completion statement.\",\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\": \"36 Noreen Avenue, Prestwich, Manchester, Greater Manchester, M25 ILT\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null,\n \"completion_date\": \"15th July 2022\",\n \"purchase_sale_price\": \"\u00a3192,600.00\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOOjVPfOcvoQRyIwT8XPLmZE8Ud\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"property_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Completion Statement\\\u0027 and includes key indicators such as \\\u0027Completion Date,\\\u0027 \\\u0027Sale price of the property,\\\u0027 and \\\u0027Property address.\\\u0027 It also lists payments received, charges, and disbursements related to the sale of a property, which are characteristic of a property completion statement.\",\\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\": \"36 Noreen Avenue, Prestwich, Manchester, Greater Manchester, M25 ILT\",\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null,\\n \"completion_date\": \"15th July 2022\",\\n \"purchase_sale_price\": \"\u00a3192,600.00\"\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465032, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=267, prompt_tokens="
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"completion_date": "15th July 2022",
"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": "36 Noreen Avenue, Prestwich, Manchester, Greater Manchester, M25 ILT",
"purchase_sale_price": "\u00a3192,600.00",
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Completion Statement\u0027 and includes key indicators such as \u0027Completion Date,\u0027 \u0027Sale price of the property,\u0027 and \u0027Property address.\u0027 It also lists payments received, charges, and disbursements related to the sale of a property, which are characteristic of a property completion statement.",
"raw_response": "```json\n{\n \"document_type\": \"property_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Completion Statement\u0027 and includes key indicators such as \u0027Completion Date,\u0027 \u0027Sale price of the property,\u0027 and \u0027Property address.\u0027 It also lists payments received, charges, and disbursements related to the sale of a property, which are characteristic of a property completion statement.\",\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\": \"36 Noreen Avenue, Prestwich, Manchester, Greater Manchester, M25 ILT\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null,\n \"completion_date\": \"15th July 2022\",\n \"purchase_sale_price\": \"\u00a3192,600.00\"\n }\n}\n```"
},
"type": "property_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.2532051282051282,
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.1282051282051282,
"total_score": 0.2532051282051282
}
},
"type": "property_statement"
}
},
"page_number": 23,
"text_length": 853
}
],
"start_page": 23
},
{
"avg_confidence": 0.9375,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "financial_statement",
"end_page": 31,
"pages": [
{
"confidence_score": 0.9,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document mentions \u0027UNAUDITED ACCOUNTS\u0027 and \u0027FOR THE YEAR ENDED\u0027, which are key indicators of financial statements such as balance sheets or income statements. Additionally, it is prepared by an accountancy firm, further supporting this classification.\",\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-ClcOQRWWDlqLFMw6gPcYS2LoGXNXI\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document mentions \\\u0027UNAUDITED ACCOUNTS\\\u0027 and \\\u0027FOR THE YEAR ENDED\\\u0027, which are key indicators of financial statements such as balance sheets or income statements. Additionally, it is prepared by an accountancy firm, further supporting this classification.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465034, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=993, total_tokens=1205, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_"
},
"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 mentions \u0027UNAUDITED ACCOUNTS\u0027 and \u0027FOR THE YEAR ENDED\u0027, which are key indicators of financial statements such as balance sheets or income statements. Additionally, it is prepared by an accountancy firm, further supporting this classification.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document mentions \u0027UNAUDITED ACCOUNTS\u0027 and \u0027FOR THE YEAR ENDED\u0027, which are key indicators of financial statements such as balance sheets or income statements. Additionally, it is prepared by an accountancy firm, further supporting this classification.\",\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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0757894736842105,
"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.10526315789473684,
"pattern_score": 0.0,
"total_score": 0.0757894736842105
},
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 24,
"text_length": 139
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to unaudited accounts, profit and loss account, balance sheet, and notes to the accounts, which are key components of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcORqHkiuU1kzfzfRMwVC3ImR8A8\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to unaudited accounts, profit and loss account, balance sheet, and notes to the accounts, which are key components of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465035, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=215, prompt_tokens=1017, total_tokens=1232, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=Prompt"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to unaudited accounts, profit and loss account, balance sheet, and notes to the accounts, which are key components of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other document types.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to unaudited accounts, profit and loss account, balance sheet, and notes to the accounts, which are key components of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.24757894736842104,
"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.21052631578947367,
"pattern_score": 0.2,
"total_score": 0.24757894736842104
},
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 25,
"text_length": 257
},
{
"confidence_score": 0.9,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains details about a business for a specific financial year, including the proprietor\u0027s name and the accountants involved. The mention of \u0027For The Year Ended 5 April 2023\u0027 strongly suggests it is a financial statement, likely part of a broader set of financial documents such as a balance sheet or income statement.\",\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-ClcOTTrvZhHfPQZ2hCPGpOHNavq7E\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains details about a business for a specific financial year, including the proprietor\\\u0027s name and the accountants involved. The mention of \\\u0027For The Year Ended 5 April 2023\\\u0027 strongly suggests it is a financial statement, likely part of a broader set of financial documents such as a balance sheet or income statement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465037, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=228, prompt_tokens=1013, total_tokens=1241, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains details about a business for a specific financial year, including the proprietor\u0027s name and the accountants involved. The mention of \u0027For The Year Ended 5 April 2023\u0027 strongly suggests it is a financial statement, likely part of a broader set of financial documents such as a balance sheet or income statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains details about a business for a specific financial year, including the proprietor\u0027s name and the accountants involved. The mention of \u0027For The Year Ended 5 April 2023\u0027 strongly suggests it is a financial statement, likely part of a broader set of financial documents such as a balance sheet or income statement.\",\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": "financial_statement"
},
"method_used": "llm_preferred",
"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
},
"payroll": {
"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": 26,
"text_length": 243
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document mentions \u0027Accounts Approval Statement\u0027, \u0027Profit and Loss Account\u0027, \u0027Balance Sheet\u0027, and \u0027related notes\u0027, which are key indicators of a financial statement. Additionally, it refers to the responsibility for accounts and their approval, which aligns with financial statements rather than other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOVHVRFfk0BRDCvqu2QP44BpsWG\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document mentions \\\u0027Accounts Approval Statement\\\u0027, \\\u0027Profit and Loss Account\\\u0027, \\\u0027Balance Sheet\\\u0027, and \\\u0027related notes\\\u0027, which are key indicators of a financial statement. Additionally, it refers to the responsibility for accounts and their approval, which aligns with financial statements rather than other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465039, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=218, prompt_tokens=1027, total_tokens=1245, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected"
},
"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 mentions \u0027Accounts Approval Statement\u0027, \u0027Profit and Loss Account\u0027, \u0027Balance Sheet\u0027, and \u0027related notes\u0027, which are key indicators of a financial statement. Additionally, it refers to the responsibility for accounts and their approval, which aligns with financial statements rather than other document types.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document mentions \u0027Accounts Approval Statement\u0027, \u0027Profit and Loss Account\u0027, \u0027Balance Sheet\u0027, and \u0027related notes\u0027, which are key indicators of a financial statement. Additionally, it refers to the responsibility for accounts and their approval, which aligns with financial statements rather than other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.24757894736842104,
"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.21052631578947367,
"pattern_score": 0.2,
"total_score": 0.24757894736842104
},
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 27,
"text_length": 406
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Profit and Loss account, Balance Sheet, and related notes, which are key components of financial statements. Additionally, it is an accountant\u0027s report for the preparation of accounts, further indicating it is a financial statement.\",\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-ClcOWYb8I3bY5NuVdtsaPghz2mYlS\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a Profit and Loss account, Balance Sheet, and related notes, which are key components of financial statements. Additionally, it is an accountant\\\u0027s report for the preparation of accounts, further indicating it is a financial statement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465040, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=210, prompt_tokens=1175, total_tokens=1385, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to a Profit and Loss account, Balance Sheet, and related notes, which are key components of financial statements. Additionally, it is an accountant\u0027s report for the preparation of accounts, further indicating it is a financial statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Profit and Loss account, Balance Sheet, and related notes, which are key components of financial statements. Additionally, it is an accountant\u0027s report for the preparation of accounts, further indicating it is a financial statement.\",\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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.17178947368421052,
"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.10526315789473684,
"pattern_score": 0.2,
"total_score": 0.17178947368421052
},
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 28,
"text_length": 1069
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a profit and loss account for a business, which is a key component of financial statements. It includes details such as turnover, cost of sales, gross profit, expenditure, depreciation, and net profit, which are typical elements of an income statement. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific identifiers, payroll details, or property-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOY7ldjyHDqerXm2oNRmfrRPhYb\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is a profit and loss account for a business, which is a key component of financial statements. It includes details such as turnover, cost of sales, gross profit, expenditure, depreciation, and net profit, which are typical elements of an income statement. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific identifiers, payroll details, or property-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465042, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=255, 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 is a profit and loss account for a business, which is a key component of financial statements. It includes details such as turnover, cost of sales, gross profit, expenditure, depreciation, and net profit, which are typical elements of an income statement. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific identifiers, payroll details, or property-related information.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a profit and loss account for a business, which is a key component of financial statements. It includes details such as turnover, cost of sales, gross profit, expenditure, depreciation, and net profit, which are typical elements of an income statement. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific identifiers, payroll details, or property-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.12378947368421052,
"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.10526315789473684,
"pattern_score": 0.1,
"total_score": 0.12378947368421052
},
"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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 29,
"text_length": 976
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains key financial statement elements such as fixed assets, current assets, liabilities, net assets, and capital account. These are typical components of a financial statement, specifically a balance sheet.\",\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-ClcOa067OHMZJrN9xnVYoYOS4Fvm0\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Balance Sheet\\\u0027 and contains key financial statement elements such as fixed assets, current assets, liabilities, net assets, and capital account. These are typical components of a financial statement, specifically a balance sheet.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465044, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=208, prompt_tokens=1262, total_tokens=1470, 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": 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 is titled \u0027Balance Sheet\u0027 and contains key financial statement elements such as fixed assets, current assets, liabilities, net assets, and capital account. These are typical components of a financial statement, specifically a balance sheet.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains key financial statement elements such as fixed assets, current assets, liabilities, net assets, and capital account. These are typical components of a financial statement, specifically a balance sheet.\",\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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.2854736842105263,
"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.2631578947368421,
"pattern_score": 0.2,
"total_score": 0.2854736842105263
},
"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.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.06
},
"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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.125,
"total_score": 0.08
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "financial_statement"
}
},
"page_number": 30,
"text_length": 869
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a financial statement, such as notes to the accounts, accounting policies, tangible assets, depreciation, and net book value. These are typical components of a balance sheet or income statement, which are part of financial statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOcg1WOGST0sslXme1gUyy5ZAWu\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a financial statement, such as notes to the accounts, accounting policies, tangible assets, depreciation, and net book value. These are typical components of a balance sheet or income statement, which are part of financial statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465046, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1224, total_tokens=1436, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a financial statement, such as notes to the accounts, accounting policies, tangible assets, depreciation, and net book value. These are typical components of a balance sheet or income statement, which are part of financial statements.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a financial statement, such as notes to the accounts, accounting policies, tangible assets, depreciation, and net book value. These are typical components of a balance sheet or income statement, which are part of financial statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.11368421052631578,
"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.15789473684210525,
"pattern_score": 0.0,
"total_score": 0.11368421052631578
},
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 31,
"text_length": 793
}
],
"start_page": 24
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "corporation_tax",
"end_page": 33,
"pages": [
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and includes details such as \u0027Profits Chargeable to Corporation Tax\u0027, \u0027Corporation Tax Chargeable\u0027, and \u0027Corporation Tax Outstanding\u0027. These are clear indicators of a corporation tax document.\",\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-ClcOhacEMRQ7Bv91FVHeGMqyPEzcz\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Corporation Tax Computation\\\u0027, \\\u0027Corporation Tax Accounting Period\\\u0027, and includes details such as \\\u0027Profits Chargeable to Corporation Tax\\\u0027, \\\u0027Corporation Tax Chargeable\\\u0027, and \\\u0027Corporation Tax Outstanding\\\u0027. These are clear indicators of a corporation tax document.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465051, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=220, prompt_tokens=1311, total_tokens=1531, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), promp"
},
"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 explicitly mentions \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and includes details such as \u0027Profits Chargeable to Corporation Tax\u0027, \u0027Corporation Tax Chargeable\u0027, and \u0027Corporation Tax Outstanding\u0027. These are clear indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and includes details such as \u0027Profits Chargeable to Corporation Tax\u0027, \u0027Corporation Tax Chargeable\u0027, and \u0027Corporation Tax Outstanding\u0027. These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.21741176470588236,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.1,
"total_score": 0.21741176470588236
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.0,
"total_score": 0.0757894736842105
},
"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
},
"payroll": {
"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": "corporation_tax"
}
},
"page_number": 32,
"text_length": 1023
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and detailed tax-related calculations such as capital allowances, super deduction allowance, and full expensing. These are key indicators of a corporation tax document.\",\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-ClcOjl7fQuvCabBS6FAqc0VE4nAsO\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to \\\u0027Corporation Tax Computation\\\u0027, \\\u0027Corporation Tax Accounting Period\\\u0027, and detailed tax-related calculations such as capital allowances, super deduction allowance, and full expensing. These are key indicators of a corporation tax document.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465053, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1400, total_tokens=1612, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and detailed tax-related calculations such as capital allowances, super deduction allowance, and full expensing. These are key indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and detailed tax-related calculations such as capital allowances, super deduction allowance, and full expensing. These are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.21741176470588236,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.1,
"total_score": 0.21741176470588236
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"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": "corporation_tax"
}
},
"page_number": 33,
"text_length": 1230
}
],
"start_page": 32
}
],
"page_classifications": [
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, statement date, period covered, previous balance, new balance, and detailed transaction records with dates, descriptions, amounts paid in and withdrawn, and running balances. These are all characteristic features of a bank statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 JAN 2025 to 31 JAN 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcNjwmTJ3908YvAQONMzZNqK7rJv\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, statement date, period covered, previous balance, new balance, and detailed transaction records with dates, descriptions, amounts paid in and withdrawn, and running balances. These are all characteristic features of a bank statement.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01 JAN 2025 to 31 JAN 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464991, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=237, prompt_tokens=2056, total_tokens=2293, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01 JAN 2025 to 31 JAN 2025",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as account name, account number, sort code, statement date, period covered, previous balance, new balance, and detailed transaction records with dates, descriptions, amounts paid in and withdrawn, and running balances. These are all characteristic features of a bank statement.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, statement date, period covered, previous balance, new balance, and detailed transaction records with dates, descriptions, amounts paid in and withdrawn, and running balances. These are all characteristic features of a bank statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01 JAN 2025 to 31 JAN 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.10588235294117647,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.13333333333333333,
"pattern_score": 0.0,
"total_score": 0.08
},
"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.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 1,
"text_length": 2962
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no mention of credit card details, invoices, payroll, loans, mortgages, or other financial documents.\",\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-ClcNkOohHzdcRQKKnncPSXmgc4Dnb\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no mention of credit card details, invoices, payroll, loans, mortgages, or other financial documents.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464992, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=217, prompt_tokens=2164, total_tokens=2381, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_detai"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no mention of credit card details, invoices, payroll, loans, mortgages, or other financial documents.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no mention of credit card details, invoices, payroll, loans, mortgages, or other financial documents.\",\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": "bank_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.10588235294117647,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"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": 2,
"text_length": 3154
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no evidence of credit card details, invoices, payroll information, or other financial document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcNmwGcC7zlqhSX03e47BCGvRYa6\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no evidence of credit card details, invoices, payroll information, or other financial document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464994, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=218, prompt_tokens=2148, total_tokens=2366, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no evidence of credit card details, invoices, payroll information, or other financial document types.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There is no evidence of credit card details, invoices, payroll information, or other financial document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.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.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 3,
"text_length": 3463
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There are no indicators of other document types like invoices, loan statements, or mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcNoOI6j7mw3IvpozhhPbdED7zdy\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There are no indicators of other document types like invoices, loan statements, or mortgage statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464996, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=218, prompt_tokens=2207, total_tokens=2425, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tok"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as an account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There are no indicators of other document types like invoices, loan statements, or mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, transaction dates, descriptions, amounts paid in and withdrawn, and running balances. There are no indicators of other document types like invoices, loan statements, or mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.10588235294117647,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 4,
"text_length": 3080
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction descriptions, dates, deposits, withdrawals, and balances. It also includes the name of the bank (NatWest) and references to automated credits and charges, which are typical of bank statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcNqDkl1HZbHI90Fd1bsUgVH52GX\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction descriptions, dates, deposits, withdrawals, and balances. It also includes the name of the bank (NatWest) and references to automated credits and charges, which are typical of bank statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464998, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=219, prompt_tokens=1394, total_tokens=1613, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction descriptions, dates, deposits, withdrawals, and balances. It also includes the name of the bank (NatWest) and references to automated credits and charges, which are typical of bank statements.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as account numbers, sort codes, transaction descriptions, dates, deposits, withdrawals, and balances. It also includes the name of the bank (NatWest) and references to automated credits and charges, which are typical of bank statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "bank_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0975,
"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.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 1219
},
{
"confidence_score": 0.95,
"document_type": "bank_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, and references to banking services like paperless statements and financial health checks. There are no mentions of transactions, but the overall structure and content align with a bank statement.\",\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-ClcNrT7SjJg0juvpcweyVh6kXVTlY\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"bank_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, and references to banking services like paperless statements and financial health checks. There are no mentions of transactions, but the overall structure and content align with a bank statement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765464999, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=217, prompt_tokens=1624, total_tokens=1841, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), promp"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a bank statement, such as an account name, account number, sort code, and references to banking services like paperless statements and financial health checks. There are no mentions of transactions, but the overall structure and content align with a bank statement.",
"raw_response": "```json\n{\n \"document_type\": \"bank_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a bank statement, such as an account name, account number, sort code, and references to banking services like paperless statements and financial health checks. There are no mentions of transactions, but the overall structure and content align with a bank statement.\",\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": "bank_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.03529411764705882,
"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.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
},
"payroll": {
"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": 6,
"text_length": 4017
},
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, spending limit, payment due date, statement period, and transaction details. It also includes a closing balance and references to a card membership fee, which are typical of credit card statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"From 27 May to 26 June 2024\",\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-ClcNtSy70UKbevjJyoGv8K34BGex2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, spending limit, payment due date, statement period, and transaction details. It also includes a closing balance and references to a card membership fee, which are typical of credit card statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"From 27 May to 26 June 2024\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465001, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=227, prompt_tokens=1419, total_tokens=1646, 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": 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": "From 27 May to 26 June 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a credit card statement, such as a membership number, spending limit, payment due date, statement period, and transaction details. It also includes a closing balance and references to a card membership fee, which are typical of credit card statements.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, spending limit, payment due date, statement period, and transaction details. It also includes a closing balance and references to a card membership fee, which are typical of credit card statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"From 27 May to 26 June 2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.1411764705882353,
"features": {
"bank_statement": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.0,
"total_score": 0.1411764705882353
},
"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.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 7,
"text_length": 1691
},
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains details of a credit card statement, including cardholder name, card number, transaction dates, transaction details, and amounts. It also includes payment instructions specific to a credit card account, such as Direct Debit and Internet Banking options. These are key indicators of a credit card statement.\",\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-ClcNv72pYsWWkpvhuVSUGo1ch44p2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains details of a credit card statement, including cardholder name, card number, transaction dates, transaction details, and amounts. It also includes payment instructions specific to a credit card account, such as Direct Debit and Internet Banking options. These are key indicators of a credit card statement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465003, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=220, prompt_tokens=1832, total_tokens=2052, 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": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains details of a credit card statement, including cardholder name, card number, transaction dates, transaction details, and amounts. It also includes payment instructions specific to a credit card account, such as Direct Debit and Internet Banking options. These are key indicators of a credit card statement.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains details of a credit card statement, including cardholder name, card number, transaction dates, transaction details, and amounts. It also includes payment instructions specific to a credit card account, such as Direct Debit and Internet Banking options. These are key indicators of a credit card statement.\",\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": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.19831932773109243,
"features": {
"bank_statement": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.14285714285714285,
"total_score": 0.19831932773109243
},
"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.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 8,
"text_length": 3498
},
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, transaction details, a next statement date, and a breakdown of spend transactions. It does not include indicators of other document types like invoices, loan statements, or payroll.\",\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-ClcNxpCBilio3yeylfIArZ50tkkvL\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, transaction details, a next statement date, and a breakdown of spend transactions. It does not include indicators of other document types like invoices, loan statements, or payroll.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465005, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1072, total_tokens=1284, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a credit card statement, such as a membership number, transaction details, a next statement date, and a breakdown of spend transactions. It does not include indicators of other document types like invoices, loan statements, or payroll.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a credit card statement, such as a membership number, transaction details, a next statement date, and a breakdown of spend transactions. It does not include indicators of other document types like invoices, loan statements, or payroll.\",\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": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03529411764705882,
"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.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
},
"payroll": {
"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": 9,
"text_length": 401
},
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a credit card account, including a card type (SBS Platinum Charge Card), card number (masked), membership rewards points, and a statement period. These are key indicators of a credit card statement.\",\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\": \"20/05/24 to 19/06/24\",\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-ClcNz5lge38acaWInstwrcFFiQSSf\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a credit card account, including a card type (SBS Platinum Charge Card), card number (masked), membership rewards points, and a statement period. These are key indicators of a credit card statement.\",\\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\": \"20/05/24 to 19/06/24\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465007, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=220, prompt_tokens=1474, total_tokens=1694, 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, ca"
},
"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": "20/05/24 to 19/06/24",
"total_amount": null
},
"llm_reasoning": "The document contains references to a credit card account, including a card type (SBS Platinum Charge Card), card number (masked), membership rewards points, and a statement period. These are key indicators of a credit card statement.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a credit card account, including a card type (SBS Platinum Charge Card), card number (masked), membership rewards points, and a statement period. These are key indicators of a credit card statement.\",\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\": \"20/05/24 to 19/06/24\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.10588235294117647,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.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
},
"payroll": {
"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": 10,
"text_length": 2145
},
{
"confidence_score": 0.95,
"document_type": "credit_card",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a statement for an American Express Business Platinum Card, which is a credit card. It includes details such as \u0027Statement of Account,\u0027 \u0027Membership Number,\u0027 and \u0027Next Statement Date,\u0027 which are typical indicators of a credit card statement. There is no mention of transactions, balances, or other details that would classify it as a bank statement or other document type.\",\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-ClcO1Z6WmBCe0TWXsx66GPnN9UPF8\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"credit_card\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is a statement for an American Express Business Platinum Card, which is a credit card. It includes details such as \\\u0027Statement of Account,\\\u0027 \\\u0027Membership Number,\\\u0027 and \\\u0027Next Statement Date,\\\u0027 which are typical indicators of a credit card statement. There is no mention of transactions, balances, or other details that would classify it as a bank statement or other document type.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465009, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=236, prompt_tokens=1117, total_tokens=1353, completion_tokens_details=CompletionTokensDetails(accepted_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": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is a statement for an American Express Business Platinum Card, which is a credit card. It includes details such as \u0027Statement of Account,\u0027 \u0027Membership Number,\u0027 and \u0027Next Statement Date,\u0027 which are typical indicators of a credit card statement. There is no mention of transactions, balances, or other details that would classify it as a bank statement or other document type.",
"raw_response": "```json\n{\n \"document_type\": \"credit_card\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a statement for an American Express Business Platinum Card, which is a credit card. It includes details such as \u0027Statement of Account,\u0027 \u0027Membership Number,\u0027 and \u0027Next Statement Date,\u0027 which are typical indicators of a credit card statement. There is no mention of transactions, balances, or other details that would classify it as a bank statement or other document type.\",\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": "credit_card"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03529411764705882,
"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.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
},
"payroll": {
"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": 11,
"text_length": 682
},
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": \"54,256.58\",\n \"monthly_payment\": \"1,760.08\",\n \"loan_tenure\": \"36\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-ClcO30KuZtDSpE3QQRUMu1dmWJbYt\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Hire Purchase Agreement\\\u0027 and includes key indicators such as \\\u0027Agreement Number\\\u0027, \\\u0027Balance Financed\\\u0027, \\\u0027Monthly Payment\\\u0027, \\\u0027Hire Period\\\u0027, and \\\u0027Option to Purchase Fee\\\u0027. These are specific to hire purchase agreements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": \"54,256.58\",\\n \"monthly_payment\": \"1,760.08\",\\n \"loan_tenure\": \"36\",\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465011, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=221, prompt_tokens=1687, total_tokens=1908, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": "54,256.58",
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": "36",
"monthly_payment": "1,760.08",
"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 explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": \"54,256.58\",\n \"monthly_payment\": \"1,760.08\",\n \"loan_tenure\": \"36\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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": "hp_agreement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.18653846153846151,
"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.2692307692307692,
"pattern_score": 0.0625,
"total_score": 0.18653846153846151
},
"invoice": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"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.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "hp_agreement"
}
},
"page_number": 12,
"text_length": 2556
},
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027finance\u0027, \u0027Supplier\u0027, \u0027Equipment\u0027, and \u0027settlement amount\u0027. It also includes terms related to business finance and exemption declarations under financial regulations, which are typical in hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": 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-ClcO5P794PeFhINuvTE0SFzAqIJKT\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \\\u0027Agreement\\\u0027, \\\u0027finance\\\u0027, \\\u0027Supplier\\\u0027, \\\u0027Equipment\\\u0027, and \\\u0027settlement amount\\\u0027. It also includes terms related to business finance and exemption declarations under financial regulations, which are typical in hire purchase agreements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": 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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465013, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=219, prompt_tokens=1558, total_tokens=1777, 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": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027finance\u0027, \u0027Supplier\u0027, \u0027Equipment\u0027, and \u0027settlement amount\u0027. It also includes terms related to business finance and exemption declarations under financial regulations, which are typical in hire purchase agreements.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027finance\u0027, \u0027Supplier\u0027, \u0027Equipment\u0027, and \u0027settlement amount\u0027. It also includes terms related to business finance and exemption declarations under financial regulations, which are typical in hire purchase agreements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0975,
"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.07692307692307693,
"pattern_score": 0.0,
"total_score": 0.046153846153846156
},
"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.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 4689
},
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types like invoices, bank statements, or loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": \"date it is signed by Aldermore\",\n \"amount_financed\": null,\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\n \"outstanding_balance\": null,\n \"statement_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-ClcO7Y3bGvzgoE5CTXUsnaZfIH0NN\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \\\u0027Agreement\\\u0027, \\\u0027Hire\\\u0027, \\\u0027Equipment\\\u0027, \\\u0027Payment of Rentals\\\u0027, \\\u0027Direct Debit\\\u0027, \\\u0027amount financed\\\u0027, and \\\u0027monthly payment\\\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types like invoices, bank statements, or loan statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": \"date it is signed by Aldermore\",\\n \"amount_financed\": null,\\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\\n \"outstanding_balance\": null,\\n \"statement_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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465015, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=263, p"
},
"document_identifiers": {
"agreement_date": "date it is signed by Aldermore",
"amount_financed": null,
"annual_interest_rate": "5% per annum above Finance House Base Rate",
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": "Rentals and any other payments specified on page 1",
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types like invoices, bank statements, or loan statements.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types like invoices, bank statements, or loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": \"date it is signed by Aldermore\",\n \"amount_financed\": null,\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\n \"outstanding_balance\": null,\n \"statement_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": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.2374736842105263,
"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.2631578947368421,
"pattern_score": 0.1,
"total_score": 0.2374736842105263
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 14,
"text_length": 12322
},
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to terms commonly associated with hire purchase agreements, such as \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, the document mentions clauses related to payments, insurance, and termination, which are typical in hire purchase agreements. The presence of the company name \u0027Aldermore\u0027 further supports this classification.\",\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-ClcO9Lt3vBMjufnhpE1QpWhF5p4qX\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to terms commonly associated with hire purchase agreements, such as \\\u0027Equipment\\\u0027, \\\u0027Insurance monies\\\u0027, \\\u0027Total Loss\\\u0027, \\\u0027Rentals\\\u0027, and \\\u0027Termination\\\u0027. Additionally, the document mentions clauses related to payments, insurance, and termination, which are typical in hire purchase agreements. The presence of the company name \\\u0027Aldermore\\\u0027 further supports this classification.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465017, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=239, prompt_tokens=1628, total_tokens=1867, completion_tokens_details=CompletionT"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to terms commonly associated with hire purchase agreements, such as \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, the document mentions clauses related to payments, insurance, and termination, which are typical in hire purchase agreements. The presence of the company name \u0027Aldermore\u0027 further supports this classification.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to terms commonly associated with hire purchase agreements, such as \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, the document mentions clauses related to payments, insurance, and termination, which are typical in hire purchase agreements. The presence of the company name \u0027Aldermore\u0027 further supports this classification.\",\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": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.13333333333333333,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.042352941176470586
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.0,
"total_score": 0.0757894736842105
},
"hp_agreement": {
"keyword_score": 0.07692307692307693,
"pattern_score": 0.0625,
"total_score": 0.07115384615384615
},
"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.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.05,
"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": 15,
"text_length": 11405
},
{
"confidence_score": 0.95,
"document_type": "hp_agreement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to \u0027Agreement,\u0027 \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 and \u0027Equipment,\u0027 which are key indicators of a hire purchase agreement. Additionally, terms like \u0027amounts payable,\u0027 \u0027option to purchase fee,\u0027 and \u0027termination of the hiring of the Equipment\u0027 strongly suggest this is a hire purchase agreement.\",\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-ClcOBNM990UDLbeElFqHHXaoGEuWD\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to \\\u0027Agreement,\\\u0027 \\\u0027Option to Purchase,\\\u0027 \\\u0027Rentals,\\\u0027 and \\\u0027Equipment,\\\u0027 which are key indicators of a hire purchase agreement. Additionally, terms like \\\u0027amounts payable,\\\u0027 \\\u0027option to purchase fee,\\\u0027 and \\\u0027termination of the hiring of the Equipment\\\u0027 strongly suggest this is a hire purchase agreement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465019, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=229, prompt_tokens=1583, total_tokens=1812, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to \u0027Agreement,\u0027 \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 and \u0027Equipment,\u0027 which are key indicators of a hire purchase agreement. Additionally, terms like \u0027amounts payable,\u0027 \u0027option to purchase fee,\u0027 and \u0027termination of the hiring of the Equipment\u0027 strongly suggest this is a hire purchase agreement.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to \u0027Agreement,\u0027 \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 and \u0027Equipment,\u0027 which are key indicators of a hire purchase agreement. Additionally, terms like \u0027amounts payable,\u0027 \u0027option to purchase fee,\u0027 and \u0027termination of the hiring of the Equipment\u0027 strongly suggest this is a hire purchase agreement.\",\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": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.10897435897435898,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.10526315789473684,
"pattern_score": 0.0,
"total_score": 0.0757894736842105
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.050526315789473676
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.02564102564102564,
"total_score": 0.10897435897435898
}
},
"type": "property_statement"
}
},
"page_number": 16,
"text_length": 10817
},
{
"confidence_score": 0.85,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical in loan account management. However, the document does not explicitly include specific loan details like loan reference or outstanding balance, which slightly reduces confidence.\",\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-ClcODkMmPpJe6KRMNYnb6aRl71eMS\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"loan_statement\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical in loan account management. However, the document does not explicitly include specific loan details like loan reference or outstanding balance, which slightly reduces confidence.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465021, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=241, prompt_tokens=153"
},
"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 discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical in loan account management. However, the document does not explicitly include specific loan details like loan reference or outstanding balance, which slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical in loan account management. However, the document does not explicitly include specific loan details like loan reference or outstanding balance, which slightly reduces confidence.\",\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": "loan_statement"
},
"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.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.041666666666666664
}
},
"type": "bank_statement"
}
},
"page_number": 17,
"text_length": 7424
},
{
"confidence_score": 0.95,
"document_type": "mortgage_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as \u0027mortgage account number\u0027, \u0027property address\u0027, \u0027remaining term\u0027, \u0027monthly payment\u0027, \u0027account balance\u0027, and \u0027current interest rate\u0027. Additionally, it explicitly mentions \u0027annual mortgage statement\u0027 and provides details about the mortgage account and repayment terms.\",\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\": \"71019693\",\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\n \"remaining_term_months\": 277,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOEEO6qCPzrAu2Xr2p4RxdP75Tq\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"mortgage_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as \\\u0027mortgage account number\\\u0027, \\\u0027property address\\\u0027, \\\u0027remaining term\\\u0027, \\\u0027monthly payment\\\u0027, \\\u0027account balance\\\u0027, and \\\u0027current interest rate\\\u0027. Additionally, it explicitly mentions \\\u0027annual mortgage statement\\\u0027 and provides details about the mortgage account and repayment terms.\",\\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\": \"71019693\",\\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\\n \"remaining_term_months\": 277,\\n \"monthly_payment_amount\": \"\u00a3804.94\"\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465022, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=244, prompt_tokens=1480, total_tokens=1724, completion_tokens_details=CompletionTokensDetails(accepted_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\u00a3804.94",
"mortgage_account_number": "71019693",
"outstanding_balance": null,
"property_address": "160, Humber Avenue, Coventry, CV1 2AR",
"remaining_term_months": 277,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as \u0027mortgage account number\u0027, \u0027property address\u0027, \u0027remaining term\u0027, \u0027monthly payment\u0027, \u0027account balance\u0027, and \u0027current interest rate\u0027. Additionally, it explicitly mentions \u0027annual mortgage statement\u0027 and provides details about the mortgage account and repayment terms.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as \u0027mortgage account number\u0027, \u0027property address\u0027, \u0027remaining term\u0027, \u0027monthly payment\u0027, \u0027account balance\u0027, and \u0027current interest rate\u0027. Additionally, it explicitly mentions \u0027annual mortgage statement\u0027 and provides details about the mortgage account and repayment terms.\",\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\": \"71019693\",\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\n \"remaining_term_months\": 277,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.4912280701754386,
"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.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.2894736842105263,
"pattern_score": 0.3333333333333333,
"total_score": 0.4912280701754386
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": "mortgage_statement"
}
},
"page_number": 18,
"text_length": 2038
},
{
"confidence_score": 0.95,
"document_type": "mortgage_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Annual Statement\u0027 and includes key indicators such as \u0027Account holder(s)\u0027, \u0027Property address\u0027, \u0027Account number\u0027, \u0027Opening balance\u0027, \u0027Direct debit\u0027, \u0027Interest charge\u0027, and \u0027Instalment due\u0027. Additionally, it mentions a property address and a mortgage account number, which are specific to mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3268,999.95\",\n \"statement_period\": \"1 October 2023 - 30 September 2024\",\n \"mortgage_account_number\": \"71019693\",\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOGJiNsc0ZM5dcE0b3mh6svCoPn\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"mortgage_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Annual Statement\\\u0027 and includes key indicators such as \\\u0027Account holder(s)\\\u0027, \\\u0027Property address\\\u0027, \\\u0027Account number\\\u0027, \\\u0027Opening balance\\\u0027, \\\u0027Direct debit\\\u0027, \\\u0027Interest charge\\\u0027, and \\\u0027Instalment due\\\u0027. Additionally, it mentions a property address and a mortgage account number, which are specific to mortgage statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a3268,999.95\",\\n \"statement_period\": \"1 October 2023 - 30 September 2024\",\\n \"mortgage_account_number\": \"71019693\",\\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3804.94\"\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465024, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=266, prompt_tokens=1759, total_tokens=2025, completion_tokens_d"
},
"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": "\u00a3804.94",
"mortgage_account_number": "71019693",
"outstanding_balance": "\u00a3268,999.95",
"property_address": "160, Humber Avenue, Coventry, CV1 2AR",
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1 October 2023 - 30 September 2024",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Annual Statement\u0027 and includes key indicators such as \u0027Account holder(s)\u0027, \u0027Property address\u0027, \u0027Account number\u0027, \u0027Opening balance\u0027, \u0027Direct debit\u0027, \u0027Interest charge\u0027, and \u0027Instalment due\u0027. Additionally, it mentions a property address and a mortgage account number, which are specific to mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Annual Statement\u0027 and includes key indicators such as \u0027Account holder(s)\u0027, \u0027Property address\u0027, \u0027Account number\u0027, \u0027Opening balance\u0027, \u0027Direct debit\u0027, \u0027Interest charge\u0027, and \u0027Instalment due\u0027. Additionally, it mentions a property address and a mortgage account number, which are specific to mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3268,999.95\",\n \"statement_period\": \"1 October 2023 - 30 September 2024\",\n \"mortgage_account_number\": \"71019693\",\n \"property_address\": \"160, Humber Avenue, Coventry, CV1 2AR\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.1411764705882353,
"features": {
"bank_statement": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.0,
"total_score": 0.1411764705882353
},
"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.07894736842105263,
"pattern_score": 0.09523809523809523,
"total_score": 0.13674185463659147
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 19,
"text_length": 2145
},
{
"confidence_score": 0.95,
"document_type": "mortgage_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as references to \u0027mortgage\u0027, \u0027property\u0027, \u0027interest rate\u0027, \u0027arrears balance\u0027, \u0027monthly instalment\u0027, and \u0027outstanding balance\u0027. It also includes a warning about property repossession, which is typical for mortgage documents.\",\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\": \"3.59%\",\n \"outstanding_balance\": \"\u00a3268,984.99\",\n \"statement_period\": \"1 October 2023 to 30 September 2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOIyTx7muFlaPlwBhVdTx6qEki5\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"mortgage_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as references to \\\u0027mortgage\\\u0027, \\\u0027property\\\u0027, \\\u0027interest rate\\\u0027, \\\u0027arrears balance\\\u0027, \\\u0027monthly instalment\\\u0027, and \\\u0027outstanding balance\\\u0027. It also includes a warning about property repossession, which is typical for mortgage documents.\",\\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\": \"3.59%\",\\n \"outstanding_balance\": \"\u00a3268,984.99\",\\n \"statement_period\": \"1 October 2023 to 30 September 2024\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3804.94\"\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465026, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1129, total_tokens=1375, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reason"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "3.59%",
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\u00a3804.94",
"mortgage_account_number": null,
"outstanding_balance": "\u00a3268,984.99",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1 October 2023 to 30 September 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as references to \u0027mortgage\u0027, \u0027property\u0027, \u0027interest rate\u0027, \u0027arrears balance\u0027, \u0027monthly instalment\u0027, and \u0027outstanding balance\u0027. It also includes a warning about property repossession, which is typical for mortgage documents.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a mortgage statement, such as references to \u0027mortgage\u0027, \u0027property\u0027, \u0027interest rate\u0027, \u0027arrears balance\u0027, \u0027monthly instalment\u0027, and \u0027outstanding balance\u0027. It also includes a warning about property repossession, which is typical for mortgage documents.\",\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\": \"3.59%\",\n \"outstanding_balance\": \"\u00a3268,984.99\",\n \"statement_period\": \"1 October 2023 to 30 September 2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3804.94\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.10626566416040101,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.07894736842105263,
"pattern_score": 0.047619047619047616,
"total_score": 0.10626566416040101
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"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": "mortgage_statement"
}
},
"page_number": 20,
"text_length": 615
},
{
"confidence_score": 0.95,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Account Statement\u0027 and includes key indicators such as \u0027Barclayloan for Business\u0027, \u0027Annual Interest Rates\u0027, \u0027Loan Account Statement\u0027, \u0027Direct Debit Payment\u0027, and \u0027Interest\u0027. It also contains a loan account reference number, a list of transactions, and an outstanding balance, which are typical of loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": \"23653883476995\",\n \"annual_interest_rate\": \"2.500%\",\n \"outstanding_balance\": \"14966.52\",\n \"statement_period\": \"10 August 2024 to 11 August 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOK0NEhcTWDIZijqAhtk0XLt9xM\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"loan_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Loan Account Statement\\\u0027 and includes key indicators such as \\\u0027Barclayloan for Business\\\u0027, \\\u0027Annual Interest Rates\\\u0027, \\\u0027Loan Account Statement\\\u0027, \\\u0027Direct Debit Payment\\\u0027, and \\\u0027Interest\\\u0027. It also contains a loan account reference number, a list of transactions, and an outstanding balance, which are typical of loan statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": \"23653883476995\",\\n \"annual_interest_rate\": \"2.500%\",\\n \"outstanding_balance\": \"14966.52\",\\n \"statement_period\": \"10 August 2024 to 11 August 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465028, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=255, prompt_tokens=1435, total_tokens=1690, completion_tokens_details=CompletionTokensDetails("
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "2.500%",
"invoice_date": null,
"invoice_number": null,
"loan_reference": "23653883476995",
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": "14966.52",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "10 August 2024 to 11 August 2025",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Account Statement\u0027 and includes key indicators such as \u0027Barclayloan for Business\u0027, \u0027Annual Interest Rates\u0027, \u0027Loan Account Statement\u0027, \u0027Direct Debit Payment\u0027, and \u0027Interest\u0027. It also contains a loan account reference number, a list of transactions, and an outstanding balance, which are typical of loan statements.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Account Statement\u0027 and includes key indicators such as \u0027Barclayloan for Business\u0027, \u0027Annual Interest Rates\u0027, \u0027Loan Account Statement\u0027, \u0027Direct Debit Payment\u0027, and \u0027Interest\u0027. It also contains a loan account reference number, a list of transactions, and an outstanding balance, which are typical of loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": \"23653883476995\",\n \"annual_interest_rate\": \"2.500%\",\n \"outstanding_balance\": \"14966.52\",\n \"statement_period\": \"10 August 2024 to 11 August 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.9272727272727272,
"features": {
"bank_statement": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.0,
"total_score": 0.10588235294117647
},
"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.3333333333333333,
"pattern_score": 0.2727272727272727,
"strong_indicators": true,
"total_score": 0.9272727272727272
},
"mortgage_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.050526315789473676
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": "loan_statement"
}
},
"page_number": 21,
"text_length": 1272
},
{
"confidence_score": 0.95,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a loan statement, such as references to \u0027Direct Debit Payment,\u0027 \u0027Interest,\u0027 \u0027Closing Balance,\u0027 and \u0027The balance shown is not a settlement figure.\u0027 Additionally, the document mentions Barclays Bank, which is a financial institution, and includes a running balance with debits and credits, typical of loan repayment tracking.\",\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\": \"10833.49\",\n \"statement_period\": \"17 Feb 2025 - 11 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOMexYNjpSw5KEicTAsY3WofmMY\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"loan_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a loan statement, such as references to \\\u0027Direct Debit Payment,\\\u0027 \\\u0027Interest,\\\u0027 \\\u0027Closing Balance,\\\u0027 and \\\u0027The balance shown is not a settlement figure.\\\u0027 Additionally, the document mentions Barclays Bank, which is a financial institution, and includes a running balance with debits and credits, typical of loan repayment tracking.\",\\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\": \"10833.49\",\\n \"statement_period\": \"17 Feb 2025 - 11 Aug 2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465030, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1409, total_tokens=1655, completion_tokens_details=CompletionTokensDetails(accepte"
},
"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": "10833.49",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "17 Feb 2025 - 11 Aug 2025",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a loan statement, such as references to \u0027Direct Debit Payment,\u0027 \u0027Interest,\u0027 \u0027Closing Balance,\u0027 and \u0027The balance shown is not a settlement figure.\u0027 Additionally, the document mentions Barclays Bank, which is a financial institution, and includes a running balance with debits and credits, typical of loan repayment tracking.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a loan statement, such as references to \u0027Direct Debit Payment,\u0027 \u0027Interest,\u0027 \u0027Closing Balance,\u0027 and \u0027The balance shown is not a settlement figure.\u0027 Additionally, the document mentions Barclays Bank, which is a financial institution, and includes a running balance with debits and credits, typical of loan repayment tracking.\",\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\": \"10833.49\",\n \"statement_period\": \"17 Feb 2025 - 11 Aug 2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0975,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"strong_indicators": true,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.125,
"pattern_score": 0.0,
"total_score": 0.0975
},
"payroll": {
"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": 22,
"text_length": 1598
},
{
"confidence_score": 0.95,
"document_type": "property_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"property_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Completion Statement\u0027 and includes key indicators such as \u0027Completion Date,\u0027 \u0027Sale price of the property,\u0027 and \u0027Property address.\u0027 It also lists payments received, charges, and disbursements related to the sale of a property, which are characteristic of a property completion statement.\",\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\": \"36 Noreen Avenue, Prestwich, Manchester, Greater Manchester, M25 ILT\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null,\n \"completion_date\": \"15th July 2022\",\n \"purchase_sale_price\": \"\u00a3192,600.00\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOOjVPfOcvoQRyIwT8XPLmZE8Ud\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"property_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Completion Statement\\\u0027 and includes key indicators such as \\\u0027Completion Date,\\\u0027 \\\u0027Sale price of the property,\\\u0027 and \\\u0027Property address.\\\u0027 It also lists payments received, charges, and disbursements related to the sale of a property, which are characteristic of a property completion statement.\",\\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\": \"36 Noreen Avenue, Prestwich, Manchester, Greater Manchester, M25 ILT\",\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null,\\n \"completion_date\": \"15th July 2022\",\\n \"purchase_sale_price\": \"\u00a3192,600.00\"\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465032, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=267, prompt_tokens="
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"completion_date": "15th July 2022",
"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": "36 Noreen Avenue, Prestwich, Manchester, Greater Manchester, M25 ILT",
"purchase_sale_price": "\u00a3192,600.00",
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Completion Statement\u0027 and includes key indicators such as \u0027Completion Date,\u0027 \u0027Sale price of the property,\u0027 and \u0027Property address.\u0027 It also lists payments received, charges, and disbursements related to the sale of a property, which are characteristic of a property completion statement.",
"raw_response": "```json\n{\n \"document_type\": \"property_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Completion Statement\u0027 and includes key indicators such as \u0027Completion Date,\u0027 \u0027Sale price of the property,\u0027 and \u0027Property address.\u0027 It also lists payments received, charges, and disbursements related to the sale of a property, which are characteristic of a property completion statement.\",\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\": \"36 Noreen Avenue, Prestwich, Manchester, Greater Manchester, M25 ILT\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null,\n \"completion_date\": \"15th July 2022\",\n \"purchase_sale_price\": \"\u00a3192,600.00\"\n }\n}\n```"
},
"type": "property_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.2532051282051282,
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.1282051282051282,
"total_score": 0.2532051282051282
}
},
"type": "property_statement"
}
},
"page_number": 23,
"text_length": 853
},
{
"confidence_score": 0.9,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document mentions \u0027UNAUDITED ACCOUNTS\u0027 and \u0027FOR THE YEAR ENDED\u0027, which are key indicators of financial statements such as balance sheets or income statements. Additionally, it is prepared by an accountancy firm, further supporting this classification.\",\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-ClcOQRWWDlqLFMw6gPcYS2LoGXNXI\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document mentions \\\u0027UNAUDITED ACCOUNTS\\\u0027 and \\\u0027FOR THE YEAR ENDED\\\u0027, which are key indicators of financial statements such as balance sheets or income statements. Additionally, it is prepared by an accountancy firm, further supporting this classification.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465034, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=993, total_tokens=1205, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_"
},
"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 mentions \u0027UNAUDITED ACCOUNTS\u0027 and \u0027FOR THE YEAR ENDED\u0027, which are key indicators of financial statements such as balance sheets or income statements. Additionally, it is prepared by an accountancy firm, further supporting this classification.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document mentions \u0027UNAUDITED ACCOUNTS\u0027 and \u0027FOR THE YEAR ENDED\u0027, which are key indicators of financial statements such as balance sheets or income statements. Additionally, it is prepared by an accountancy firm, further supporting this classification.\",\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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0757894736842105,
"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.10526315789473684,
"pattern_score": 0.0,
"total_score": 0.0757894736842105
},
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 24,
"text_length": 139
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to unaudited accounts, profit and loss account, balance sheet, and notes to the accounts, which are key components of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcORqHkiuU1kzfzfRMwVC3ImR8A8\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to unaudited accounts, profit and loss account, balance sheet, and notes to the accounts, which are key components of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465035, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=215, prompt_tokens=1017, total_tokens=1232, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=Prompt"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to unaudited accounts, profit and loss account, balance sheet, and notes to the accounts, which are key components of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other document types.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to unaudited accounts, profit and loss account, balance sheet, and notes to the accounts, which are key components of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.24757894736842104,
"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.21052631578947367,
"pattern_score": 0.2,
"total_score": 0.24757894736842104
},
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 25,
"text_length": 257
},
{
"confidence_score": 0.9,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains details about a business for a specific financial year, including the proprietor\u0027s name and the accountants involved. The mention of \u0027For The Year Ended 5 April 2023\u0027 strongly suggests it is a financial statement, likely part of a broader set of financial documents such as a balance sheet or income statement.\",\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-ClcOTTrvZhHfPQZ2hCPGpOHNavq7E\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains details about a business for a specific financial year, including the proprietor\\\u0027s name and the accountants involved. The mention of \\\u0027For The Year Ended 5 April 2023\\\u0027 strongly suggests it is a financial statement, likely part of a broader set of financial documents such as a balance sheet or income statement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465037, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=228, prompt_tokens=1013, total_tokens=1241, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains details about a business for a specific financial year, including the proprietor\u0027s name and the accountants involved. The mention of \u0027For The Year Ended 5 April 2023\u0027 strongly suggests it is a financial statement, likely part of a broader set of financial documents such as a balance sheet or income statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains details about a business for a specific financial year, including the proprietor\u0027s name and the accountants involved. The mention of \u0027For The Year Ended 5 April 2023\u0027 strongly suggests it is a financial statement, likely part of a broader set of financial documents such as a balance sheet or income statement.\",\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": "financial_statement"
},
"method_used": "llm_preferred",
"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
},
"payroll": {
"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": 26,
"text_length": 243
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document mentions \u0027Accounts Approval Statement\u0027, \u0027Profit and Loss Account\u0027, \u0027Balance Sheet\u0027, and \u0027related notes\u0027, which are key indicators of a financial statement. Additionally, it refers to the responsibility for accounts and their approval, which aligns with financial statements rather than other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOVHVRFfk0BRDCvqu2QP44BpsWG\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document mentions \\\u0027Accounts Approval Statement\\\u0027, \\\u0027Profit and Loss Account\\\u0027, \\\u0027Balance Sheet\\\u0027, and \\\u0027related notes\\\u0027, which are key indicators of a financial statement. Additionally, it refers to the responsibility for accounts and their approval, which aligns with financial statements rather than other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465039, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=218, prompt_tokens=1027, total_tokens=1245, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected"
},
"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 mentions \u0027Accounts Approval Statement\u0027, \u0027Profit and Loss Account\u0027, \u0027Balance Sheet\u0027, and \u0027related notes\u0027, which are key indicators of a financial statement. Additionally, it refers to the responsibility for accounts and their approval, which aligns with financial statements rather than other document types.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document mentions \u0027Accounts Approval Statement\u0027, \u0027Profit and Loss Account\u0027, \u0027Balance Sheet\u0027, and \u0027related notes\u0027, which are key indicators of a financial statement. Additionally, it refers to the responsibility for accounts and their approval, which aligns with financial statements rather than other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.24757894736842104,
"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.21052631578947367,
"pattern_score": 0.2,
"total_score": 0.24757894736842104
},
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 27,
"text_length": 406
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Profit and Loss account, Balance Sheet, and related notes, which are key components of financial statements. Additionally, it is an accountant\u0027s report for the preparation of accounts, further indicating it is a financial statement.\",\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-ClcOWYb8I3bY5NuVdtsaPghz2mYlS\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a Profit and Loss account, Balance Sheet, and related notes, which are key components of financial statements. Additionally, it is an accountant\\\u0027s report for the preparation of accounts, further indicating it is a financial statement.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465040, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=210, prompt_tokens=1175, total_tokens=1385, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to a Profit and Loss account, Balance Sheet, and related notes, which are key components of financial statements. Additionally, it is an accountant\u0027s report for the preparation of accounts, further indicating it is a financial statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Profit and Loss account, Balance Sheet, and related notes, which are key components of financial statements. Additionally, it is an accountant\u0027s report for the preparation of accounts, further indicating it is a financial statement.\",\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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.17178947368421052,
"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.10526315789473684,
"pattern_score": 0.2,
"total_score": 0.17178947368421052
},
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 28,
"text_length": 1069
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a profit and loss account for a business, which is a key component of financial statements. It includes details such as turnover, cost of sales, gross profit, expenditure, depreciation, and net profit, which are typical elements of an income statement. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific identifiers, payroll details, or property-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOY7ldjyHDqerXm2oNRmfrRPhYb\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is a profit and loss account for a business, which is a key component of financial statements. It includes details such as turnover, cost of sales, gross profit, expenditure, depreciation, and net profit, which are typical elements of an income statement. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific identifiers, payroll details, or property-related information.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465042, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=255, 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 is a profit and loss account for a business, which is a key component of financial statements. It includes details such as turnover, cost of sales, gross profit, expenditure, depreciation, and net profit, which are typical elements of an income statement. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific identifiers, payroll details, or property-related information.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a profit and loss account for a business, which is a key component of financial statements. It includes details such as turnover, cost of sales, gross profit, expenditure, depreciation, and net profit, which are typical elements of an income statement. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific identifiers, payroll details, or property-related information.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.12378947368421052,
"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.10526315789473684,
"pattern_score": 0.1,
"total_score": 0.12378947368421052
},
"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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 29,
"text_length": 976
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains key financial statement elements such as fixed assets, current assets, liabilities, net assets, and capital account. These are typical components of a financial statement, specifically a balance sheet.\",\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-ClcOa067OHMZJrN9xnVYoYOS4Fvm0\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Balance Sheet\\\u0027 and contains key financial statement elements such as fixed assets, current assets, liabilities, net assets, and capital account. These are typical components of a financial statement, specifically a balance sheet.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465044, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=208, prompt_tokens=1262, total_tokens=1470, 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": 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 is titled \u0027Balance Sheet\u0027 and contains key financial statement elements such as fixed assets, current assets, liabilities, net assets, and capital account. These are typical components of a financial statement, specifically a balance sheet.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains key financial statement elements such as fixed assets, current assets, liabilities, net assets, and capital account. These are typical components of a financial statement, specifically a balance sheet.\",\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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.2854736842105263,
"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.2631578947368421,
"pattern_score": 0.2,
"total_score": 0.2854736842105263
},
"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.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.06
},
"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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.125,
"total_score": 0.08
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "financial_statement"
}
},
"page_number": 30,
"text_length": 869
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a financial statement, such as notes to the accounts, accounting policies, tangible assets, depreciation, and net book value. These are typical components of a balance sheet or income statement, which are part of financial statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-ClcOcg1WOGST0sslXme1gUyy5ZAWu\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a financial statement, such as notes to the accounts, accounting policies, tangible assets, depreciation, and net book value. These are typical components of a balance sheet or income statement, which are part of financial statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465046, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1224, total_tokens=1436, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a financial statement, such as notes to the accounts, accounting policies, tangible assets, depreciation, and net book value. These are typical components of a balance sheet or income statement, which are part of financial statements.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a financial statement, such as notes to the accounts, accounting policies, tangible assets, depreciation, and net book value. These are typical components of a balance sheet or income statement, which are part of financial statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.11368421052631578,
"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.15789473684210525,
"pattern_score": 0.0,
"total_score": 0.11368421052631578
},
"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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 31,
"text_length": 793
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and includes details such as \u0027Profits Chargeable to Corporation Tax\u0027, \u0027Corporation Tax Chargeable\u0027, and \u0027Corporation Tax Outstanding\u0027. These are clear indicators of a corporation tax document.\",\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-ClcOhacEMRQ7Bv91FVHeGMqyPEzcz\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Corporation Tax Computation\\\u0027, \\\u0027Corporation Tax Accounting Period\\\u0027, and includes details such as \\\u0027Profits Chargeable to Corporation Tax\\\u0027, \\\u0027Corporation Tax Chargeable\\\u0027, and \\\u0027Corporation Tax Outstanding\\\u0027. These are clear indicators of a corporation tax document.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465051, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=220, prompt_tokens=1311, total_tokens=1531, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), promp"
},
"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 explicitly mentions \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and includes details such as \u0027Profits Chargeable to Corporation Tax\u0027, \u0027Corporation Tax Chargeable\u0027, and \u0027Corporation Tax Outstanding\u0027. These are clear indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and includes details such as \u0027Profits Chargeable to Corporation Tax\u0027, \u0027Corporation Tax Chargeable\u0027, and \u0027Corporation Tax Outstanding\u0027. These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.21741176470588236,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.1,
"total_score": 0.21741176470588236
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.0,
"total_score": 0.0757894736842105
},
"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
},
"payroll": {
"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": "corporation_tax"
}
},
"page_number": 32,
"text_length": 1023
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and detailed tax-related calculations such as capital allowances, super deduction allowance, and full expensing. These are key indicators of a corporation tax document.\",\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-ClcOjl7fQuvCabBS6FAqc0VE4nAsO\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to \\\u0027Corporation Tax Computation\\\u0027, \\\u0027Corporation Tax Accounting Period\\\u0027, and detailed tax-related calculations such as capital allowances, super deduction allowance, and full expensing. These are key indicators of a corporation tax document.\",\\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: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\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=1765465053, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1400, total_tokens=1612, 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": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and detailed tax-related calculations such as capital allowances, super deduction allowance, and full expensing. These are key indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Computation\u0027, \u0027Corporation Tax Accounting Period\u0027, and detailed tax-related calculations such as capital allowances, super deduction allowance, and full expensing. These are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.21741176470588236,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.1,
"total_score": 0.21741176470588236
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"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": "corporation_tax"
}
},
"page_number": 33,
"text_length": 1230
}
],
"processing_timestamp": "2025-12-11T14:57:34.264977"
}