| Original Filename: | ilovepdf_merged_9_merged.pdf |
| Upload Date: | January 02, 2026 at 10:07 AM |
| Total Pages: | 34 |
| Processing Status: | Completed |
| Total Documents: | 8 |
| Loan Statements: | 2 |
| Nominal Ledgers: | 1 |
| Mortgage Statements: | 1 |
| Invoices: | 1 |
| Hp Agreements: | 1 |
| Payroll Statements: | 2 |
Unknown
60%Loan Statement
95%Loan Statement
90%Loan Statement
95%Loan Statement
95%Loan Statement
95%Unknown
80%Loan Statement
95%Loan Statement
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Nominal Ledger
95%Mortgage Statement
95%Mortgage Statement
95%Mortgage Statement
95%Mortgage Statement
95%Mortgage Statement
95%Invoice
85%Hp Agreement
95%Hp Agreement
95%Hp Agreement
95%Hp Agreement
95%Hp Agreement
95%Unknown
80%Payroll Statement
95%Payroll Statement
95%| Document Type | Pages | Confidence | Processing Status | Created | Actions |
|---|---|---|---|---|---|
| Loan Statement | 2-6 (5 pages) | 94% | Processed | 2026-01-02 10:08 | View |
| Loan Statement | 8-9 (2 pages) | 95% | Processed | 2026-01-02 10:08 | View |
| Nominal Ledger | 10-20 (11 pages) | 95% | Processed | 2026-01-02 10:08 | No view available |
| Mortgage Statement | 21-25 (5 pages) | 95% | Processed | 2026-01-02 10:08 | View |
| Invoice | 26 (1 page) | 85% | Processed | 2026-01-02 10:08 | View |
| Hp Agreement | 27-31 (5 pages) | 95% | Processed | 2026-01-02 10:08 | View |
| Payroll Statement | 33 (1 page) | 95% | Processed | 2026-01-02 10:08 | No view available |
| Payroll Statement | 34 (1 page) | 95% | Processed | 2026-01-02 10:09 | No view available |
{
"document_groups": [
{
"avg_confidence": 0.9400000000000001,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "13.2% p.a.",
"invoice_date": null,
"invoice_number": null,
"loan_reference": "RS0008610B32Z",
"loan_tenure": "60 months",
"monthly_payment": "\u00a32,399.83",
"monthly_payment_amount": "\u00a32,399.83",
"mortgage_account_number": null,
"outstanding_balance": "\u00a352,204.64",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "30-03-2022 to 30-04-2024",
"total_amount": null
},
"document_type": "loan_statement",
"end_page": 6,
"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 Statement\u0027 and includes key indicators such as \u0027Loan Start Date\u0027, \u0027Original Loan Amount\u0027, \u0027Interest Rate\u0027, \u0027Total Principal Outstanding\u0027, and \u0027Final Repayment Due\u0027. Additionally, it mentions \u0027Loan Summary\u0027 and \u0027Payments Summary\u0027, which are typical sections in 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\": \"60 months\",\n \"loan_reference\": \"RS0008610B32Z\",\n \"annual_interest_rate\": \"13.2% p.a.\",\n \"outstanding_balance\": \"\u00a352,204.64\",\n \"statement_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-CtWLRJUM5kzZMoGdgd8I8MeHPw15D\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 Statement\\\u0027 and includes key indicators such as \\\u0027Loan Start Date\\\u0027, \\\u0027Original Loan Amount\\\u0027, \\\u0027Interest Rate\\\u0027, \\\u0027Total Principal Outstanding\\\u0027, and \\\u0027Final Repayment Due\\\u0027. Additionally, it mentions \\\u0027Loan Summary\\\u0027 and \\\u0027Payments Summary\\\u0027, which are typical sections in 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\": \"60 months\",\\n \"loan_reference\": \"RS0008610B32Z\",\\n \"annual_interest_rate\": \"13.2% p.a.\",\\n \"outstanding_balance\": \"\u00a352,204.64\",\\n \"statement_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=1767348409, 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=1488, total_tokens=1732, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reason"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "13.2% p.a.",
"invoice_date": null,
"invoice_number": null,
"loan_reference": "RS0008610B32Z",
"loan_tenure": "60 months",
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": "\u00a352,204.64",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and includes key indicators such as \u0027Loan Start Date\u0027, \u0027Original Loan Amount\u0027, \u0027Interest Rate\u0027, \u0027Total Principal Outstanding\u0027, and \u0027Final Repayment Due\u0027. Additionally, it mentions \u0027Loan Summary\u0027 and \u0027Payments Summary\u0027, which are typical sections in loan statements.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes key indicators such as \u0027Loan Start Date\u0027, \u0027Original Loan Amount\u0027, \u0027Interest Rate\u0027, \u0027Total Principal Outstanding\u0027, and \u0027Final Repayment Due\u0027. Additionally, it mentions \u0027Loan Summary\u0027 and \u0027Payments Summary\u0027, which are typical sections in 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\": \"60 months\",\n \"loan_reference\": \"RS0008610B32Z\",\n \"annual_interest_rate\": \"13.2% p.a.\",\n \"outstanding_balance\": \"\u00a352,204.64\",\n \"statement_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.16200501253132832,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.09090909090909091,
"total_score": 0.11454545454545456
},
"mortgage_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.09523809523809523,
"total_score": 0.16200501253132832
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.0,
"total_score": 0.045
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 2,
"text_length": 1942
},
{
"confidence_score": 0.9,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes references to a loan, such as the company name \u0027LendingCrowd\u0027, which is a lending platform, and mentions of fees and capital at risk. These are key indicators of a loan statement. However, specific loan details like loan reference, interest rate, or outstanding balance are not explicitly provided in the text.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLTuzbwaybOoUNNYPJQngUZ9PPk\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.9,\\n \"reasoning\": \"The document is titled \\\u0027Loan Statement\\\u0027 and includes references to a loan, such as the company name \\\u0027LendingCrowd\\\u0027, which is a lending platform, and mentions of fees and capital at risk. These are key indicators of a loan statement. However, specific loan details like loan reference, interest rate, or outstanding balance are not explicitly provided in the text.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348411, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=235, prompt_tokens=1132, total_tokens=1367, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_token"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and includes references to a loan, such as the company name \u0027LendingCrowd\u0027, which is a lending platform, and mentions of fees and capital at risk. These are key indicators of a loan statement. However, specific loan details like loan reference, interest rate, or outstanding balance are not explicitly provided in the text.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes references to a loan, such as the company name \u0027LendingCrowd\u0027, which is a lending platform, and mentions of fees and capital at risk. These are key indicators of a loan statement. However, specific loan details like loan reference, interest rate, or outstanding balance are not explicitly provided in the text.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.11454545454545456,
"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.06666666666666667,
"pattern_score": 0.09090909090909091,
"total_score": 0.11454545454545456
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "loan_statement"
}
},
"page_number": 3,
"text_length": 585
},
{
"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 Statement\u0027 and contains details of loan payments, including payment dates, principal, interest, total paid, and remaining balance. It also includes the name of the borrower and the lender, which are typical features of a loan 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\": \"\u00a371,021.48\",\n \"statement_period\": \"30-03-2022 to 30-04-2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,399.83\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLVjNNvztzkHp8HgmcGWcpJjkE4\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 Statement\\\u0027 and contains details of loan payments, including payment dates, principal, interest, total paid, and remaining balance. It also includes the name of the borrower and the lender, which are typical features of a loan 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\": \"\u00a371,021.48\",\\n \"statement_period\": \"30-03-2022 to 30-04-2024\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a32,399.83\"\\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=1767348413, 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=2075, total_tokens=2314, 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": "\u00a32,399.83",
"mortgage_account_number": null,
"outstanding_balance": "\u00a371,021.48",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "30-03-2022 to 30-04-2024",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and contains details of loan payments, including payment dates, principal, interest, total paid, and remaining balance. It also includes the name of the borrower and the lender, which are typical features of a loan statement.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and contains details of loan payments, including payment dates, principal, interest, total paid, and remaining balance. It also includes the name of the borrower and the lender, which are typical features of a loan 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\": \"\u00a371,021.48\",\n \"statement_period\": \"30-03-2022 to 30-04-2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,399.83\"\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.22909090909090912,
"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.13333333333333333,
"pattern_score": 0.18181818181818182,
"total_score": 0.22909090909090912
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "loan_statement"
}
},
"page_number": 4,
"text_length": 2080
},
{
"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 Statement\u0027 and includes key indicators such as payment dates, principal amounts, interest amounts, total paid, and remaining balance. It also references a company name and includes details about loan repayments, which are characteristic of a loan 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\": \"\u00a352,204.64\",\n \"statement_period\": \"30-05-2024 to 29-01-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-CtWLWGqCLvRaCQVzoVUKxgVGuJkRk\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 Statement\\\u0027 and includes key indicators such as payment dates, principal amounts, interest amounts, total paid, and remaining balance. It also references a company name and includes details about loan repayments, which are characteristic of a loan 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\": \"\u00a352,204.64\",\\n \"statement_period\": \"30-05-2024 to 29-01-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=1767348414, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=233, prompt_tokens=1454, total_tokens=1687, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_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": "\u00a352,204.64",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "30-05-2024 to 29-01-2025",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and includes key indicators such as payment dates, principal amounts, interest amounts, total paid, and remaining balance. It also references a company name and includes details about loan repayments, which are characteristic of a loan statement.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes key indicators such as payment dates, principal amounts, interest amounts, total paid, and remaining balance. It also references a company name and includes details about loan repayments, which are characteristic of a loan 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\": \"\u00a352,204.64\",\n \"statement_period\": \"30-05-2024 to 29-01-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.11454545454545456,
"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.06666666666666667,
"pattern_score": 0.09090909090909091,
"total_score": 0.11454545454545456
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "loan_statement"
}
},
"page_number": 5,
"text_length": 1104
},
{
"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 Statement\u0027 and includes key indicators such as scheduled payments, principal, interest, total payment amounts, and outstanding balance. It also includes a company name (S.C.S. AQUATIC \u0026 PET WHOLESALE) and references a financial institution (LendingCrowd). These are clear indicators of a loan 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\": \"\u00a32,399.83\",\n \"loan_tenure\": \"24 months\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a350,379.05\",\n \"statement_period\": \"28 February 2025 to 28 February 2027\",\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-CtWLYztzipNH1Q0ItVcPjik6mCmpB\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 Statement\\\u0027 and includes key indicators such as scheduled payments, principal, interest, total payment amounts, and outstanding balance. It also includes a company name (S.C.S. AQUATIC \u0026 PET WHOLESALE) and references a financial institution (LendingCrowd). These are clear indicators of a loan 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\": \"\u00a32,399.83\",\\n \"loan_tenure\": \"24 months\",\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a350,379.05\",\\n \"statement_period\": \"28 February 2025 to 28 February 2027\",\\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=1767348416, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=256, prompt_tokens=1960, total_tokens=2216, 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": "24 months",
"monthly_payment": "\u00a32,399.83",
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": "\u00a350,379.05",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "28 February 2025 to 28 February 2027",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and includes key indicators such as scheduled payments, principal, interest, total payment amounts, and outstanding balance. It also includes a company name (S.C.S. AQUATIC \u0026 PET WHOLESALE) and references a financial institution (LendingCrowd). These are clear indicators of a loan statement.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes key indicators such as scheduled payments, principal, interest, total payment amounts, and outstanding balance. It also includes a company name (S.C.S. AQUATIC \u0026 PET WHOLESALE) and references a financial institution (LendingCrowd). These are clear indicators of a loan 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\": \"\u00a32,399.83\",\n \"loan_tenure\": \"24 months\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a350,379.05\",\n \"statement_period\": \"28 February 2025 to 28 February 2027\",\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.11454545454545456,
"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.06666666666666667,
"pattern_score": 0.09090909090909091,
"total_score": 0.11454545454545456
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "loan_statement"
}
},
"page_number": 6,
"text_length": 1855
}
],
"start_page": 2
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": "BSCSAQUA2863D8",
"loan_tenure": "72 months",
"monthly_payment": null,
"monthly_payment_amount": "\u00a32,058.24",
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "From 27/02/2023 to 28/07/2025",
"total_amount": null
},
"document_type": "loan_statement",
"end_page": 9,
"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 contains key indicators of a loan statement, such as a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. These are characteristic of loan repayment statements. There is no mention of property addresses, hire purchase terms, or other indicators of different 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\": \"72 months\",\n \"loan_reference\": \"BSCSAQUA2863D8\",\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"From 27/02/2023 to 28/07/2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,058.24\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLbRekqG7wxxHVq60U84pRZtHCi\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 a loan reference number (\\\u0027BSCSAQUA2863D8\\\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. These are characteristic of loan repayment statements. There is no mention of property addresses, hire purchase terms, or other indicators of different 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\": \"72 months\",\\n \"loan_reference\": \"BSCSAQUA2863D8\",\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"From 27/02/2023 to 28/07/2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a32,058.24\"\\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=1767348419, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=271, prompt_tokens=1698, total_tokens=1969, completion_tokens_details=Completi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": "BSCSAQUA2863D8",
"loan_tenure": "72 months",
"monthly_payment": null,
"monthly_payment_amount": "\u00a32,058.24",
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "From 27/02/2023 to 28/07/2025",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a loan statement, such as a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. These are characteristic of loan repayment statements. There is no mention of property addresses, hire purchase terms, or other indicators of different document types.",
"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 a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. These are characteristic of loan repayment statements. There is no mention of property addresses, hire purchase terms, or other indicators of different 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\": \"72 months\",\n \"loan_reference\": \"BSCSAQUA2863D8\",\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"From 27/02/2023 to 28/07/2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,058.24\"\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.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 8,
"text_length": 1695
},
{
"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 a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. Additionally, it includes a loan withdrawal transaction, which is a common feature 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\": \"72 months\",\n \"loan_reference\": \"BSCSAQUA2863D8\",\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,058.24\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLdkNZ5JroXYxSglDH6cI8ApZhr\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 a loan reference number (\\\u0027BSCSAQUA2863D8\\\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. Additionally, it includes a loan withdrawal transaction, which is a common feature 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\": \"72 months\",\\n \"loan_reference\": \"BSCSAQUA2863D8\",\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a32,058.24\"\\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=1767348421, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=245, prompt_tokens=1298, total_tokens=1543, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_p"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": "BSCSAQUA2863D8",
"loan_tenure": "72 months",
"monthly_payment": null,
"monthly_payment_amount": "\u00a32,058.24",
"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 loan statement, such as a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. Additionally, it includes a loan withdrawal transaction, which is a common feature of loan statements.",
"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 a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. Additionally, it includes a loan withdrawal transaction, which is a common feature 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\": \"72 months\",\n \"loan_reference\": \"BSCSAQUA2863D8\",\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,058.24\"\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.065,
"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.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 9,
"text_length": 779
}
],
"start_page": 8
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "nominal_ledger",
"end_page": 20,
"pages": [
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains account codes, descriptions, and financial figures for different periods, which are key indicators of a nominal ledger. Terms like \u0027Sale of goods\u0027, \u0027Opening stock\u0027, \u0027Closing stock\u0027, \u0027Purchases\u0027, and \u0027Wages and salaries\u0027 are typical of a general or nominal ledger. There are no indicators of transactions, invoices, payroll, or other specific document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLfAdJkTibQZwDrtkAin7Jcx1QZ\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains account codes, descriptions, and financial figures for different periods, which are key indicators of a nominal ledger. Terms like \\\u0027Sale of goods\\\u0027, \\\u0027Opening stock\\\u0027, \\\u0027Closing stock\\\u0027, \\\u0027Purchases\\\u0027, and \\\u0027Wages and salaries\\\u0027 are typical of a general or nominal ledger. There are no indicators of transactions, invoices, payroll, or other specific document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348423, 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=1613, total_tokens=1854, 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 contains account codes, descriptions, and financial figures for different periods, which are key indicators of a nominal ledger. Terms like \u0027Sale of goods\u0027, \u0027Opening stock\u0027, \u0027Closing stock\u0027, \u0027Purchases\u0027, and \u0027Wages and salaries\u0027 are typical of a general or nominal ledger. There are no indicators of transactions, invoices, payroll, or other specific document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains account codes, descriptions, and financial figures for different periods, which are key indicators of a nominal ledger. Terms like \u0027Sale of goods\u0027, \u0027Opening stock\u0027, \u0027Closing stock\u0027, \u0027Purchases\u0027, and \u0027Wages and salaries\u0027 are typical of a general or nominal ledger. There are no indicators of transactions, invoices, payroll, or other specific document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.4642857142857143,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.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.5,
"pattern_score": 0.14285714285714285,
"total_score": 0.4642857142857143
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.0,
"total_score": 0.045
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 10,
"text_length": 1723
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked,\u0027 \u0027Employers NI,\u0027 \u0027Staff pensions,\u0027 and \u0027Rent.\u0027 These are clear indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. The structure and terminology align with a general ledger or nominal ledger format.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWLhDRobt90rb0ocHGPxnFTYbcy2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \\\u0027Payroll expenses booked,\\\u0027 \\\u0027Employers NI,\\\u0027 \\\u0027Staff pensions,\\\u0027 and \\\u0027Rent.\\\u0027 These are clear indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. The structure and terminology align with a general ledger or nominal ledger format.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348425, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=233, prompt_tokens=1612, total_tokens=1845, completion_tokens_details=CompletionTokensDetails(accepted_prediction_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked,\u0027 \u0027Employers NI,\u0027 \u0027Staff pensions,\u0027 and \u0027Rent.\u0027 These are clear indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. The structure and terminology align with a general ledger or nominal ledger format.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked,\u0027 \u0027Employers NI,\u0027 \u0027Staff pensions,\u0027 and \u0027Rent.\u0027 These are clear indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. The structure and terminology align with a general ledger or nominal ledger format.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.030303030303030304,
"total_score": 0.06681818181818183
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 11,
"text_length": 1673
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes (e.g., 7202-Water, 7200-Electricity, 7800-Repairs \u0026 Renewals), descriptions of expenses (e.g., Light, heat and power, Insurance, Repairs and renewals), and associated amounts. These are key indicators of a nominal ledger, which is used to track financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLjwMqqibm7xJ0uoU4tXU8Mgq3L\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes (e.g., 7202-Water, 7200-Electricity, 7800-Repairs \u0026 Renewals), descriptions of expenses (e.g., Light, heat and power, Insurance, Repairs and renewals), and associated amounts. These are key indicators of a nominal ledger, which is used to track financial transactions categorized by accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348427, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=243, prompt_tokens=1635, total_tokens=1878, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes (e.g., 7202-Water, 7200-Electricity, 7800-Repairs \u0026 Renewals), descriptions of expenses (e.g., Light, heat and power, Insurance, Repairs and renewals), and associated amounts. These are key indicators of a nominal ledger, which is used to track financial transactions categorized by accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes (e.g., 7202-Water, 7200-Electricity, 7800-Repairs \u0026 Renewals), descriptions of expenses (e.g., Light, heat and power, Insurance, Repairs and renewals), and associated amounts. These are key indicators of a nominal ledger, which is used to track financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 12,
"text_length": 1622
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple entries with account codes, descriptions, and amounts, which are characteristic of a nominal ledger. Specific account codes such as \u00277504-Stationery\u0027, \u00277206-TV Licence\u0027, and \u00278200-Donations\u0027 are present, along with corresponding amounts and descriptions. There is no indication of transactions, balances, or other identifiers that would classify it as a bank statement, invoice, 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-CtWLk1vXN6S49i0Hg36NMbsOknb3D\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple entries with account codes, descriptions, and amounts, which are characteristic of a nominal ledger. Specific account codes such as \\\u00277504-Stationery\\\u0027, \\\u00277206-TV Licence\\\u0027, and \\\u00278200-Donations\\\u0027 are present, along with corresponding amounts and descriptions. There is no indication of transactions, balances, or other identifiers that would classify it as a bank statement, invoice, 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=1767348428, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=250, prompt_tokens=1652, total_tokens=1902, completion_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 entries with account codes, descriptions, and amounts, which are characteristic of a nominal ledger. Specific account codes such as \u00277504-Stationery\u0027, \u00277206-TV Licence\u0027, and \u00278200-Donations\u0027 are present, along with corresponding amounts and descriptions. There is no indication of transactions, balances, or other identifiers that would classify it as a bank statement, invoice, or other document type.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple entries with account codes, descriptions, and amounts, which are characteristic of a nominal ledger. Specific account codes such as \u00277504-Stationery\u0027, \u00277206-TV Licence\u0027, and \u00278200-Donations\u0027 are present, along with corresponding amounts and descriptions. There is no indication of transactions, balances, or other identifiers that would classify it as a bank statement, invoice, 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": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 1600
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account codes, descriptions of expenses, and amounts associated with various categories such as advertising, legal fees, bank charges, and depreciation. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLmTIki1OSqi8d6Ep8zlTMGU8uo\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed account codes, descriptions of expenses, and amounts associated with various categories such as advertising, legal fees, bank charges, and depreciation. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348430, 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=1659, total_tokens=1874, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed account codes, descriptions of expenses, and amounts associated with various categories such as advertising, legal fees, bank charges, and depreciation. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account codes, descriptions of expenses, and amounts associated with various categories such as advertising, legal fees, bank charges, and depreciation. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.02564102564102564,
"total_score": 0.06730769230769232
}
},
"type": "nominal_ledger"
}
},
"page_number": 14,
"text_length": 1936
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Depreciation Expense\u0027, \u0027Corporation tax charge\u0027, \u0027Plant \u0026 Machinery\u0027, and \u0027Depreciation Adjustment\u0027. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLoxMt7ZecNUSO7VrDDeYV8iSAi\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \\\u0027Depreciation Expense\\\u0027, \\\u0027Corporation tax charge\\\u0027, \\\u0027Plant \u0026 Machinery\\\u0027, and \\\u0027Depreciation Adjustment\\\u0027. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348432, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=225, prompt_tokens=1646, total_tokens=1871, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_pre"
},
"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 account codes, ledger entries, and descriptions such as \u0027Depreciation Expense\u0027, \u0027Corporation tax charge\u0027, \u0027Plant \u0026 Machinery\u0027, and \u0027Depreciation Adjustment\u0027. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Depreciation Expense\u0027, \u0027Corporation tax charge\u0027, \u0027Plant \u0026 Machinery\u0027, and \u0027Depreciation Adjustment\u0027. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"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.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.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 15,
"text_length": 1953
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, journal entries (JE), reclassifications, and accumulated depreciation, which are key indicators of a nominal ledger. Additionally, terms like \u0027cost b/fwd\u0027, \u0027depreciation charge\u0027, and \u0027reclassification\u0027 are specific to ledger accounting.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWLpPWl2x0Ex6csMMff9MhRdkvmx\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, journal entries (JE), reclassifications, and accumulated depreciation, which are key indicators of a nominal ledger. Additionally, terms like \\\u0027cost b/fwd\\\u0027, \\\u0027depreciation charge\\\u0027, and \\\u0027reclassification\\\u0027 are specific to ledger accounting.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348433, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=223, prompt_tokens=1666, total_tokens=1889, 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 multiple references to account codes, journal entries (JE), reclassifications, and accumulated depreciation, which are key indicators of a nominal ledger. Additionally, terms like \u0027cost b/fwd\u0027, \u0027depreciation charge\u0027, and \u0027reclassification\u0027 are specific to ledger accounting.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, journal entries (JE), reclassifications, and accumulated depreciation, which are key indicators of a nominal ledger. Additionally, terms like \u0027cost b/fwd\u0027, \u0027depreciation charge\u0027, and \u0027reclassification\u0027 are specific to ledger accounting.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 16,
"text_length": 2185
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, descriptions of transactions, and balances, which are key indicators of a nominal ledger. Terms like \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Prepayments\u0027, and \u0027Intercompany Loans\u0027 are typical of a general ledger or nominal ledger. There are no indicators of invoices, payroll, loan, mortgage, 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-CtWLrPoWGAZDRF5iHnykM81An8ict\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, descriptions of transactions, and balances, which are key indicators of a nominal ledger. Terms like \\\u0027Depreciation\\\u0027, \\\u0027Closing Stock\\\u0027, \\\u0027Opening Stock\\\u0027, \\\u0027Prepayments\\\u0027, and \\\u0027Intercompany Loans\\\u0027 are typical of a general ledger or nominal ledger. There are no indicators of invoices, payroll, loan, mortgage, 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=1767348435, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=242, prompt_tokens=1651, total_tokens=1893, completion_tokens_details=CompletionTokensDetails(acce"
},
"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 account codes, descriptions of transactions, and balances, which are key indicators of a nominal ledger. Terms like \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Prepayments\u0027, and \u0027Intercompany Loans\u0027 are typical of a general ledger or nominal ledger. There are no indicators of invoices, payroll, loan, mortgage, or other financial documents.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, descriptions of transactions, and balances, which are key indicators of a nominal ledger. Terms like \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Prepayments\u0027, and \u0027Intercompany Loans\u0027 are typical of a general ledger or nominal ledger. There are no indicators of invoices, payroll, loan, mortgage, 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": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 17,
"text_length": 1837
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes, control accounts, and specific ledger entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are key indicators of a nominal ledger. Additionally, the document includes detailed financial transactions and adjustments, which are typical of a general or nominal ledger.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLs9yGmWmwuvP4xGAfS1ngRw0yC\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to account codes, control accounts, and specific ledger entries such as \\\u0027Trade creditors\\\u0027, \\\u0027Wages and salaries control\\\u0027, \\\u0027Pension contributions unpaid\\\u0027, and \\\u0027Corporation tax control\\\u0027. These are key indicators of a nominal ledger. Additionally, the document includes detailed financial transactions and adjustments, which are typical of a general or nominal ledger.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348436, 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=1614, total_tokens=1850, completion_tokens_details=CompletionTokensDetails(a"
},
"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 account codes, control accounts, and specific ledger entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are key indicators of a nominal ledger. Additionally, the document includes detailed financial transactions and adjustments, which are typical of a general or nominal ledger.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes, control accounts, and specific ledger entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are key indicators of a nominal ledger. Additionally, the document includes detailed financial transactions and adjustments, which are typical of a general or nominal ledger.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.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.125,
"total_score": 0.08333333333333334
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.030303030303030304,
"total_score": 0.06681818181818183
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 18,
"text_length": 1718
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked\u0027, \u0027VAT Control account\u0027, \u0027Directors Loan Account\u0027, and \u0027Retained Earnings\u0027. These are clear indicators of a nominal ledger or general ledger document, which tracks financial transactions across various accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLuOQRXL769nhxHOQ0gFl7K3qsE\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \\\u0027Payroll expenses booked\\\u0027, \\\u0027VAT Control account\\\u0027, \\\u0027Directors Loan Account\\\u0027, and \\\u0027Retained Earnings\\\u0027. These are clear indicators of a nominal ledger or general ledger document, which tracks financial transactions across various accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348438, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=224, prompt_tokens=1670, total_tokens=1894, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_token"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked\u0027, \u0027VAT Control account\u0027, \u0027Directors Loan Account\u0027, and \u0027Retained Earnings\u0027. These are clear indicators of a nominal ledger or general ledger document, which tracks financial transactions across various accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked\u0027, \u0027VAT Control account\u0027, \u0027Directors Loan Account\u0027, and \u0027Retained Earnings\u0027. These are clear indicators of a nominal ledger or general ledger document, which tracks financial transactions across various accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.15789473684210525,
"pattern_score": 0.2,
"total_score": 0.20968421052631578
},
"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.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 19,
"text_length": 1812
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes, descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances, which are key indicators of a nominal ledger. Additionally, the term \u0027Nominal Ledger\u0027 is explicitly mentioned in the 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-CtWLw4aU5AfIE5tmFqvfnEoMdUcd1\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to account codes, descriptions of transactions (e.g., \\\u0027Extra dividend\\\u0027, \\\u0027Dividend Accounted\\\u0027), and balances, which are key indicators of a nominal ledger. Additionally, the term \\\u0027Nominal Ledger\\\u0027 is explicitly mentioned in the 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=1767348440, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=216, prompt_tokens=1123, total_tokens=1339, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDe"
},
"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 account codes, descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances, which are key indicators of a nominal ledger. Additionally, the term \u0027Nominal Ledger\u0027 is explicitly mentioned in the document.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes, descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances, which are key indicators of a nominal ledger. Additionally, the term \u0027Nominal Ledger\u0027 is explicitly mentioned in the 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": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"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.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 20,
"text_length": 351
}
],
"start_page": 10
},
{
"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": "\u00a3705.55",
"mortgage_account_number": "1100059898",
"outstanding_balance": "\u00a3212,160.19",
"property_address": "Flat 1, Russell House, 58 Sydenham Road, Croydon, CRO 2FJ",
"remaining_term_months": 106,
"seller_name": null,
"statement_period": "1st April of last year to 31st March of this year",
"total_amount": null
},
"document_type": "mortgage_statement",
"end_page": 25,
"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 is identified as a mortgage statement due to the presence of key indicators such as \u0027Your Buy To Let Mortgage Statement\u0027, \u0027Mortgage Account Number\u0027, \u0027Property Address\u0027, and references to mortgage payments and terms. Additionally, the document includes a mortgage account number and property address, 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\": null,\n \"statement_period\": \"1st April of last year to 31st March of this year\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": \"Flat 1, Russell House, 58 Sydenham Road, Croydon, CRO 2FJ\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLxPmSbg9Belm8KGtg2ngmiKfGx\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 identified as a mortgage statement due to the presence of key indicators such as \\\u0027Your Buy To Let Mortgage Statement\\\u0027, \\\u0027Mortgage Account Number\\\u0027, \\\u0027Property Address\\\u0027, and references to mortgage payments and terms. Additionally, the document includes a mortgage account number and property address, 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\": null,\\n \"statement_period\": \"1st April of last year to 31st March of this year\",\\n \"mortgage_account_number\": \"1100059898\",\\n \"property_address\": \"Flat 1, Russell House, 58 Sydenham Road, Croydon, CRO 2FJ\",\\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=1767348441, 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=1356, 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": "1100059898",
"outstanding_balance": null,
"property_address": "Flat 1, Russell House, 58 Sydenham Road, Croydon, CRO 2FJ",
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1st April of last year to 31st March of this year",
"total_amount": null
},
"llm_reasoning": "The document is identified as a mortgage statement due to the presence of key indicators such as \u0027Your Buy To Let Mortgage Statement\u0027, \u0027Mortgage Account Number\u0027, \u0027Property Address\u0027, and references to mortgage payments and terms. Additionally, the document includes a mortgage account number and property address, which are specific to mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is identified as a mortgage statement due to the presence of key indicators such as \u0027Your Buy To Let Mortgage Statement\u0027, \u0027Mortgage Account Number\u0027, \u0027Property Address\u0027, and references to mortgage payments and terms. Additionally, the document includes a mortgage account number and property address, 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\": null,\n \"statement_period\": \"1st April of last year to 31st March of this year\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": \"Flat 1, Russell House, 58 Sydenham Road, Croydon, CRO 2FJ\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.24822055137844612,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.14285714285714285,
"total_score": 0.09243697478991597
},
"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.13157894736842105,
"pattern_score": 0.19047619047619047,
"total_score": 0.24822055137844612
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 21,
"text_length": 1522
},
{
"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 explicitly mentions \u0027Your Mortgage Statement Summary\u0027, includes a mortgage account number, repayment type, remaining mortgage term, and interest rate details. These are key indicators of a mortgage 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\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": 106,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLzafLsVhOQbeV7IX3pEsUrIHbq\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 explicitly mentions \\\u0027Your Mortgage Statement Summary\\\u0027, includes a mortgage account number, repayment type, remaining mortgage term, and interest rate details. These are key indicators of a mortgage 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\": \"1100059898\",\\n \"property_address\": null,\\n \"remaining_term_months\": 106,\\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=1767348443, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=205, prompt_tokens=1151, total_tokens=1356, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=1024"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": "1100059898",
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": 106,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document explicitly mentions \u0027Your Mortgage Statement Summary\u0027, includes a mortgage account number, repayment type, remaining mortgage term, and interest rate details. These are key indicators of a mortgage statement.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Your Mortgage Statement Summary\u0027, includes a mortgage account number, repayment type, remaining mortgage term, and interest rate details. These are key indicators of a mortgage 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\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": 106,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.13152882205513783,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.14285714285714285,
"total_score": 0.09243697478991597
},
"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.10526315789473684,
"pattern_score": 0.047619047619047616,
"total_score": 0.13152882205513783
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 22,
"text_length": 747
},
{
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Mortgage Payment Due\u0027, and \u0027Balance\u0027. It also includes a breakdown of transactions related to a mortgage account, including payments, interest charges, and balances over a specific period.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,160.19\",\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWM1Q01fJHqRCSHYnIbMs6t0ynk3\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, \\\u0027Interest Charged\\\u0027, \\\u0027Payment received by DD\\\u0027, \\\u0027Mortgage Payment Due\\\u0027, and \\\u0027Balance\\\u0027. It also includes a breakdown of transactions related to a mortgage account, including payments, interest charges, and balances over a specific period.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a3212,160.19\",\\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\\n \"mortgage_account_number\": \"1100059898\",\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3705.55\"\\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=1767348445, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=252, prompt_tokens=1485, total_tokens=1737, completion_tokens_details=CompletionTokensDetails(accepted_pre"
},
"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": "\u00a3705.55",
"mortgage_account_number": "1100059898",
"outstanding_balance": "\u00a3212,160.19",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1 April 2023 to 31 March 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as \u0027Mortgage Account Number\u0027, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Mortgage Payment Due\u0027, and \u0027Balance\u0027. It also includes a breakdown of transactions related to a mortgage account, including payments, interest charges, and balances over a specific period.",
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Mortgage Payment Due\u0027, and \u0027Balance\u0027. It also includes a breakdown of transactions related to a mortgage account, including payments, interest charges, and balances over a specific period.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,160.19\",\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"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.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.10526315789473684,
"pattern_score": 0.09523809523809523,
"total_score": 0.16200501253132832
},
"nominal_ledger": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 23,
"text_length": 1648
},
{
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, and \u0027Mortgage Payment Due\u0027. It also includes a clear mortgage account number and details about payments, interest, and balances over time.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,162.11\",\n \"statement_period\": \"01 Aug 2023 to 01 Mar 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWM2recqA9pi9dAANZRgb3BNrUbu\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, \\\u0027Interest Charged\\\u0027, \\\u0027Payment received by DD\\\u0027, and \\\u0027Mortgage Payment Due\\\u0027. It also includes a clear mortgage account number and details about payments, interest, and balances over time.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a3212,162.11\",\\n \"statement_period\": \"01 Aug 2023 to 01 Mar 2024\",\\n \"mortgage_account_number\": \"1100059898\",\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3705.55\"\\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=1767348446, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=243, prompt_tokens=1468, total_tokens=1711, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\u00a3705.55",
"mortgage_account_number": "1100059898",
"outstanding_balance": "\u00a3212,162.11",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01 Aug 2023 to 01 Mar 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as \u0027Mortgage Account Number\u0027, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, and \u0027Mortgage Payment Due\u0027. It also includes a clear mortgage account number and details about payments, interest, and balances over time.",
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, and \u0027Mortgage Payment Due\u0027. It also includes a clear mortgage account number and details about payments, interest, and balances over time.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,162.11\",\n \"statement_period\": \"01 Aug 2023 to 01 Mar 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"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.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.02631578947368421,
"pattern_score": 0.047619047619047616,
"total_score": 0.05573934837092731
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 24,
"text_length": 1140
},
{
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Closing balance\u0027, and \u0027Total Interest Charged\u0027. Additionally, the document references a mortgage provider (Fleet Mortgages) and includes a mortgage account number and balance details.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,175.64\",\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWM4TxMaIJHs9ZAutQRbhqc3B29x\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, \\\u0027Interest Charged\\\u0027, \\\u0027Payment received by DD\\\u0027, \\\u0027Closing balance\\\u0027, and \\\u0027Total Interest Charged\\\u0027. Additionally, the document references a mortgage provider (Fleet Mortgages) and includes a mortgage account number and balance details.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a3212,175.64\",\\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\\n \"mortgage_account_number\": \"1100059898\",\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3705.55\"\\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=1767348448, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=251, prompt_tokens=1162, total_tokens=1413, 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": "\u00a3705.55",
"mortgage_account_number": "1100059898",
"outstanding_balance": "\u00a3212,175.64",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1 April 2023 to 31 March 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as \u0027Mortgage Account Number\u0027, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Closing balance\u0027, and \u0027Total Interest Charged\u0027. Additionally, the document references a mortgage provider (Fleet Mortgages) and includes a mortgage account number and balance details.",
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Closing balance\u0027, and \u0027Total Interest Charged\u0027. Additionally, the document references a mortgage provider (Fleet Mortgages) and includes a mortgage account number and balance details.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,175.64\",\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"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.047619047619047616,
"total_score": 0.05573934837092731
},
"nominal_ledger": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.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": 25,
"text_length": 531
}
],
"start_page": 21
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "December 1, 2023",
"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": "Stocktake UK",
"statement_period": null,
"total_amount": "\u00a334,365.93"
},
"document_type": "invoice",
"end_page": 26,
"pages": [
{
"confidence_score": 0.85,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. While it is labeled as a \u0027Valuation Certificate,\u0027 the structure and content align more closely with an invoice, as it includes a breakdown of items and their respective values, along with a total amount. However, the lack of a clear invoice number and explicit invoice date slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Stocktake UK\",\n \"invoice_date\": \"December 1, 2023\",\n \"total_amount\": \"\u00a334,365.93\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWM6FcDk017eoFfBNW2KnoWCD7tT\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. While it is labeled as a \\\u0027Valuation Certificate,\\\u0027 the structure and content align more closely with an invoice, as it includes a breakdown of items and their respective values, along with a total amount. However, the lack of a clear invoice number and explicit invoice date slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Stocktake UK\",\\n \"invoice_date\": \"December 1, 2023\",\\n \"total_amount\": \"\u00a334,365.93\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348450, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=263, prompt_tokens=1395, total_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "December 1, 2023",
"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": "Stocktake UK",
"statement_period": null,
"total_amount": "\u00a334,365.93"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. While it is labeled as a \u0027Valuation Certificate,\u0027 the structure and content align more closely with an invoice, as it includes a breakdown of items and their respective values, along with a total amount. However, the lack of a clear invoice number and explicit invoice date slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. While it is labeled as a \u0027Valuation Certificate,\u0027 the structure and content align more closely with an invoice, as it includes a breakdown of items and their respective values, along with a total amount. However, the lack of a clear invoice number and explicit invoice date slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Stocktake UK\",\n \"invoice_date\": \"December 1, 2023\",\n \"total_amount\": \"\u00a334,365.93\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.13,
"features": {
"bank_statement": {
"keyword_score": 0.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.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 26,
"text_length": 1384
}
],
"start_page": 26
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": "not explicitly mentioned",
"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
},
"document_type": "hp_agreement",
"end_page": 31,
"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 details such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, and \u0027Loan Tenure\u0027. These are strong indicators of 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\": \"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-CtWM8mT36Dh1lRxHBN7ZvfcPkT0Ro\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 details such as \\\u0027Agreement Number\\\u0027, \\\u0027Balance Financed\\\u0027, \\\u0027Monthly Payment\\\u0027, and \\\u0027Loan Tenure\\\u0027. These are strong indicators of 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\": \"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=1767348452, 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=1731, total_tokens=1949, 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, cach"
},
"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 details such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, and \u0027Loan Tenure\u0027. These are strong indicators of a hire purchase agreement.",
"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 details such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, and \u0027Loan Tenure\u0027. These are strong indicators of 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\": \"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": "llm_preferred",
"pattern_based": {
"confidence": 0.195,
"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.25,
"pattern_score": 0.0,
"total_score": 0.195
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 27,
"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. Additionally, it includes terms like \u0027declaration for exemption relating to businesses\u0027 and mentions the Financial Services and Markets Act, which are common 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-CtWM9YOul317qpx6meHFkCcDG61l7\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. Additionally, it includes terms like \\\u0027declaration for exemption relating to businesses\\\u0027 and mentions the Financial Services and Markets Act, which are common 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=1767348453, 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=1602, total_tokens=1830, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027finance\u0027, \u0027Supplier\u0027, \u0027Equipment\u0027, and \u0027settlement amount\u0027. Additionally, it includes terms like \u0027declaration for exemption relating to businesses\u0027 and mentions the Financial Services and Markets Act, which are common 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. Additionally, it includes terms like \u0027declaration for exemption relating to businesses\u0027 and mentions the Financial Services and Markets Act, which are common 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.065,
"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.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 28,
"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 \u0027hire\u0027, \u0027agreement\u0027, \u0027equipment\u0027, \u0027rentals\u0027, \u0027payment of rentals\u0027, \u0027commencement of hire\u0027, and terms related to the use, maintenance, and payment for equipment. Additionally, the document mentions \u0027Aldermore\u0027, which is a financial institution often associated with 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\": \"not explicitly mentioned\",\n \"amount_financed\": \"not explicitly mentioned\",\n \"monthly_payment\": \"not explicitly mentioned\",\n \"loan_tenure\": \"not explicitly mentioned\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWMBQXe7gwHI9686dauzp7dgHP0t\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 \\\u0027hire\\\u0027, \\\u0027agreement\\\u0027, \\\u0027equipment\\\u0027, \\\u0027rentals\\\u0027, \\\u0027payment of rentals\\\u0027, \\\u0027commencement of hire\\\u0027, and terms related to the use, maintenance, and payment for equipment. Additionally, the document mentions \\\u0027Aldermore\\\u0027, which is a financial institution often associated with 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\": \"not explicitly mentioned\",\\n \"amount_financed\": \"not explicitly mentioned\",\\n \"monthly_payment\": \"not explicitly mentioned\",\\n \"loan_tenure\": \"not explicitly mentioned\",\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348455, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=252, prompt_tokens=16"
},
"document_identifiers": {
"agreement_date": "not explicitly mentioned",
"amount_financed": "not explicitly mentioned",
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": "not explicitly mentioned",
"monthly_payment": "not explicitly mentioned",
"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 \u0027hire\u0027, \u0027agreement\u0027, \u0027equipment\u0027, \u0027rentals\u0027, \u0027payment of rentals\u0027, \u0027commencement of hire\u0027, and terms related to the use, maintenance, and payment for equipment. Additionally, the document mentions \u0027Aldermore\u0027, which is a financial institution often associated with 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 \u0027hire\u0027, \u0027agreement\u0027, \u0027equipment\u0027, \u0027rentals\u0027, \u0027payment of rentals\u0027, \u0027commencement of hire\u0027, and terms related to the use, maintenance, and payment for equipment. Additionally, the document mentions \u0027Aldermore\u0027, which is a financial institution often associated with 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\": \"not explicitly mentioned\",\n \"amount_financed\": \"not explicitly mentioned\",\n \"monthly_payment\": \"not explicitly mentioned\",\n \"loan_tenure\": \"not explicitly mentioned\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.06
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 29,
"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 key indicators of a hire purchase agreement, such as references to \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, it mentions terms like \u0027amount financed\u0027, \u0027insurance money\u0027, and \u0027hiring of the Equipment\u0027, which 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\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWMDBy5wjt8sqEsRXJ7uw6UPKBEZ\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 \\\u0027Equipment\\\u0027, \\\u0027Insurance monies\\\u0027, \\\u0027Total Loss\\\u0027, \\\u0027Rentals\\\u0027, and \\\u0027Termination\\\u0027. Additionally, it mentions terms like \\\u0027amount financed\\\u0027, \\\u0027insurance money\\\u0027, and \\\u0027hiring of the Equipment\\\u0027, which 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\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348457, 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=1672, total_tokens=1900, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejecte"
},
"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 \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, it mentions terms like \u0027amount financed\u0027, \u0027insurance money\u0027, and \u0027hiring of the Equipment\u0027, which are specific to 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 \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, it mentions terms like \u0027amount financed\u0027, \u0027insurance money\u0027, and \u0027hiring of the Equipment\u0027, which 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\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 30,
"text_length": 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 terms commonly associated with hire purchase agreements, such as \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 \u0027Option to Purchase Fee,\u0027 \u0027hiring of the Equipment,\u0027 and \u0027Aldermore,\u0027 which appears to be the financing entity. Additionally, the document discusses terms like \u0027amounts due,\u0027 \u0027commission,\u0027 and \u0027termination of the hiring of the Equipment,\u0027 which are indicative of 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-CtWMPudY8kw0t0C0787LHLHXQM20v\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 \\\u0027Option to Purchase,\\\u0027 \\\u0027Rentals,\\\u0027 \\\u0027Option to Purchase Fee,\\\u0027 \\\u0027hiring of the Equipment,\\\u0027 and \\\u0027Aldermore,\\\u0027 which appears to be the financing entity. Additionally, the document discusses terms like \\\u0027amounts due,\\\u0027 \\\u0027commission,\\\u0027 and \\\u0027termination of the hiring of the Equipment,\\\u0027 which are indicative of 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=1767348469, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=250, prompt_tokens=1627, total_tokens=1877, completion_"
},
"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 \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 \u0027Option to Purchase Fee,\u0027 \u0027hiring of the Equipment,\u0027 and \u0027Aldermore,\u0027 which appears to be the financing entity. Additionally, the document discusses terms like \u0027amounts due,\u0027 \u0027commission,\u0027 and \u0027termination of the hiring of the Equipment,\u0027 which are indicative of 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 terms commonly associated with hire purchase agreements, such as \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 \u0027Option to Purchase Fee,\u0027 \u0027hiring of the Equipment,\u0027 and \u0027Aldermore,\u0027 which appears to be the financing entity. Additionally, the document discusses terms like \u0027amounts due,\u0027 \u0027commission,\u0027 and \u0027termination of the hiring of the Equipment,\u0027 which are indicative of 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.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.0,
"total_score": 0.045
},
"property_statement": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.02564102564102564,
"total_score": 0.10897435897435898
}
},
"type": "property_statement"
}
},
"page_number": 31,
"text_length": 10817
}
],
"start_page": 27
},
{
"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": "payroll_statement",
"end_page": 34,
"pages": [
{
"confidence_score": 0.95,
"document_type": "payroll_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"payroll_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed payroll information, including employee names, gross pay, taxable gross, tax, NICs, net pay, employer NICs, and cost to employer. It also includes a summary of payroll for multiple employees and mentions \u0027Payroll Summary\u0027 explicitly in the header. These are key indicators of a payroll 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-CtWMTmLYPmjhJlplGZLmxfqxzXA8J\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"payroll_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed payroll information, including employee names, gross pay, taxable gross, tax, NICs, net pay, employer NICs, and cost to employer. It also includes a summary of payroll for multiple employees and mentions \\\u0027Payroll Summary\\\u0027 explicitly in the header. These are key indicators of a payroll 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=1767348473, 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=2693, total_tokens=2920, 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 contains detailed payroll information, including employee names, gross pay, taxable gross, tax, NICs, net pay, employer NICs, and cost to employer. It also includes a summary of payroll for multiple employees and mentions \u0027Payroll Summary\u0027 explicitly in the header. These are key indicators of a payroll statement.",
"raw_response": "```json\n{\n \"document_type\": \"payroll_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed payroll information, including employee names, gross pay, taxable gross, tax, NICs, net pay, employer NICs, and cost to employer. It also includes a summary of payroll for multiple employees and mentions \u0027Payroll Summary\u0027 explicitly in the header. These are key indicators of a payroll 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": "payroll_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.4881818181818182,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.25,
"pattern_score": 0.30303030303030304,
"total_score": 0.4881818181818182
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "payroll_statement"
}
},
"page_number": 33,
"text_length": 6074
},
{
"confidence_score": 0.95,
"document_type": "payroll_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"payroll_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed payroll information such as employee names, gross pay, taxable gross, net pay, deductions (e.g., NICs, pension), and employer costs. It also includes a summary of payroll data for multiple employees over a specific period (Months 1 to 4). These are key indicators of a payroll 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-CtWMVZwVXx77a5wKyezKwPx4hxGOs\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"payroll_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed payroll information such as employee names, gross pay, taxable gross, net pay, deductions (e.g., NICs, pension), and employer costs. It also includes a summary of payroll data for multiple employees over a specific period (Months 1 to 4). These are key indicators of a payroll 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=1767348475, 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=2699, total_tokens=2928, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed payroll information such as employee names, gross pay, taxable gross, net pay, deductions (e.g., NICs, pension), and employer costs. It also includes a summary of payroll data for multiple employees over a specific period (Months 1 to 4). These are key indicators of a payroll statement.",
"raw_response": "```json\n{\n \"document_type\": \"payroll_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed payroll information such as employee names, gross pay, taxable gross, net pay, deductions (e.g., NICs, pension), and employer costs. It also includes a summary of payroll data for multiple employees over a specific period (Months 1 to 4). These are key indicators of a payroll 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": "payroll_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.42136363636363633,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.20833333333333334,
"pattern_score": 0.2727272727272727,
"total_score": 0.42136363636363633
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "payroll_statement"
}
},
"page_number": 34,
"text_length": 4043
}
],
"start_page": 33
}
],
"page_classifications": [
{
"confidence_score": 0.6,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.6,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.6,\n \"reasoning\": \"The document mentions \u0027lending crowd,\u0027 which suggests a financial lending context. However, the text is minimal and lacks specific details to confirm the exact type of document. Based on the term \u0027lending,\u0027 it is most likely related to a loan 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-CtWLQeEfntrCxhwW1E90kxaZpEDAh\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.6,\\n \"reasoning\": \"The document mentions \\\u0027lending crowd,\\\u0027 which suggests a financial lending context. However, the text is minimal and lacks specific details to confirm the exact type of document. Based on the term \\\u0027lending,\\\u0027 it is most likely related to a loan 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=1767348408, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=213, prompt_tokens=995, total_tokens=1208, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(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": null,
"total_amount": null
},
"llm_reasoning": "The document mentions \u0027lending crowd,\u0027 which suggests a financial lending context. However, the text is minimal and lacks specific details to confirm the exact type of document. Based on the term \u0027lending,\u0027 it is most likely related to a loan statement.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.6,\n \"reasoning\": \"The document mentions \u0027lending crowd,\u0027 which suggests a financial lending context. However, the text is minimal and lacks specific details to confirm the exact type of document. Based on the term \u0027lending,\u0027 it is most likely related to a loan 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": "loan_statement"
},
"method_used": "uncertain",
"pattern_based": {
"confidence": 0.015,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "payroll_statement"
}
},
"page_number": 1,
"text_length": 19
},
{
"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 Statement\u0027 and includes key indicators such as \u0027Loan Start Date\u0027, \u0027Original Loan Amount\u0027, \u0027Interest Rate\u0027, \u0027Total Principal Outstanding\u0027, and \u0027Final Repayment Due\u0027. Additionally, it mentions \u0027Loan Summary\u0027 and \u0027Payments Summary\u0027, which are typical sections in 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\": \"60 months\",\n \"loan_reference\": \"RS0008610B32Z\",\n \"annual_interest_rate\": \"13.2% p.a.\",\n \"outstanding_balance\": \"\u00a352,204.64\",\n \"statement_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-CtWLRJUM5kzZMoGdgd8I8MeHPw15D\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 Statement\\\u0027 and includes key indicators such as \\\u0027Loan Start Date\\\u0027, \\\u0027Original Loan Amount\\\u0027, \\\u0027Interest Rate\\\u0027, \\\u0027Total Principal Outstanding\\\u0027, and \\\u0027Final Repayment Due\\\u0027. Additionally, it mentions \\\u0027Loan Summary\\\u0027 and \\\u0027Payments Summary\\\u0027, which are typical sections in 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\": \"60 months\",\\n \"loan_reference\": \"RS0008610B32Z\",\\n \"annual_interest_rate\": \"13.2% p.a.\",\\n \"outstanding_balance\": \"\u00a352,204.64\",\\n \"statement_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=1767348409, 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=1488, total_tokens=1732, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reason"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "13.2% p.a.",
"invoice_date": null,
"invoice_number": null,
"loan_reference": "RS0008610B32Z",
"loan_tenure": "60 months",
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": "\u00a352,204.64",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and includes key indicators such as \u0027Loan Start Date\u0027, \u0027Original Loan Amount\u0027, \u0027Interest Rate\u0027, \u0027Total Principal Outstanding\u0027, and \u0027Final Repayment Due\u0027. Additionally, it mentions \u0027Loan Summary\u0027 and \u0027Payments Summary\u0027, which are typical sections in loan statements.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes key indicators such as \u0027Loan Start Date\u0027, \u0027Original Loan Amount\u0027, \u0027Interest Rate\u0027, \u0027Total Principal Outstanding\u0027, and \u0027Final Repayment Due\u0027. Additionally, it mentions \u0027Loan Summary\u0027 and \u0027Payments Summary\u0027, which are typical sections in 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\": \"60 months\",\n \"loan_reference\": \"RS0008610B32Z\",\n \"annual_interest_rate\": \"13.2% p.a.\",\n \"outstanding_balance\": \"\u00a352,204.64\",\n \"statement_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.16200501253132832,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.09090909090909091,
"total_score": 0.11454545454545456
},
"mortgage_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.09523809523809523,
"total_score": 0.16200501253132832
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.0,
"total_score": 0.045
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 2,
"text_length": 1942
},
{
"confidence_score": 0.9,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes references to a loan, such as the company name \u0027LendingCrowd\u0027, which is a lending platform, and mentions of fees and capital at risk. These are key indicators of a loan statement. However, specific loan details like loan reference, interest rate, or outstanding balance are not explicitly provided in the text.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLTuzbwaybOoUNNYPJQngUZ9PPk\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.9,\\n \"reasoning\": \"The document is titled \\\u0027Loan Statement\\\u0027 and includes references to a loan, such as the company name \\\u0027LendingCrowd\\\u0027, which is a lending platform, and mentions of fees and capital at risk. These are key indicators of a loan statement. However, specific loan details like loan reference, interest rate, or outstanding balance are not explicitly provided in the text.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348411, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=235, prompt_tokens=1132, total_tokens=1367, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_token"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and includes references to a loan, such as the company name \u0027LendingCrowd\u0027, which is a lending platform, and mentions of fees and capital at risk. These are key indicators of a loan statement. However, specific loan details like loan reference, interest rate, or outstanding balance are not explicitly provided in the text.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes references to a loan, such as the company name \u0027LendingCrowd\u0027, which is a lending platform, and mentions of fees and capital at risk. These are key indicators of a loan statement. However, specific loan details like loan reference, interest rate, or outstanding balance are not explicitly provided in the text.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.11454545454545456,
"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.06666666666666667,
"pattern_score": 0.09090909090909091,
"total_score": 0.11454545454545456
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "loan_statement"
}
},
"page_number": 3,
"text_length": 585
},
{
"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 Statement\u0027 and contains details of loan payments, including payment dates, principal, interest, total paid, and remaining balance. It also includes the name of the borrower and the lender, which are typical features of a loan 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\": \"\u00a371,021.48\",\n \"statement_period\": \"30-03-2022 to 30-04-2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,399.83\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLVjNNvztzkHp8HgmcGWcpJjkE4\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 Statement\\\u0027 and contains details of loan payments, including payment dates, principal, interest, total paid, and remaining balance. It also includes the name of the borrower and the lender, which are typical features of a loan 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\": \"\u00a371,021.48\",\\n \"statement_period\": \"30-03-2022 to 30-04-2024\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a32,399.83\"\\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=1767348413, 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=2075, total_tokens=2314, 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": "\u00a32,399.83",
"mortgage_account_number": null,
"outstanding_balance": "\u00a371,021.48",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "30-03-2022 to 30-04-2024",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and contains details of loan payments, including payment dates, principal, interest, total paid, and remaining balance. It also includes the name of the borrower and the lender, which are typical features of a loan statement.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and contains details of loan payments, including payment dates, principal, interest, total paid, and remaining balance. It also includes the name of the borrower and the lender, which are typical features of a loan 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\": \"\u00a371,021.48\",\n \"statement_period\": \"30-03-2022 to 30-04-2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,399.83\"\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.22909090909090912,
"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.13333333333333333,
"pattern_score": 0.18181818181818182,
"total_score": 0.22909090909090912
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "loan_statement"
}
},
"page_number": 4,
"text_length": 2080
},
{
"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 Statement\u0027 and includes key indicators such as payment dates, principal amounts, interest amounts, total paid, and remaining balance. It also references a company name and includes details about loan repayments, which are characteristic of a loan 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\": \"\u00a352,204.64\",\n \"statement_period\": \"30-05-2024 to 29-01-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-CtWLWGqCLvRaCQVzoVUKxgVGuJkRk\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 Statement\\\u0027 and includes key indicators such as payment dates, principal amounts, interest amounts, total paid, and remaining balance. It also references a company name and includes details about loan repayments, which are characteristic of a loan 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\": \"\u00a352,204.64\",\\n \"statement_period\": \"30-05-2024 to 29-01-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=1767348414, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=233, prompt_tokens=1454, total_tokens=1687, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_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": "\u00a352,204.64",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "30-05-2024 to 29-01-2025",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and includes key indicators such as payment dates, principal amounts, interest amounts, total paid, and remaining balance. It also references a company name and includes details about loan repayments, which are characteristic of a loan statement.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes key indicators such as payment dates, principal amounts, interest amounts, total paid, and remaining balance. It also references a company name and includes details about loan repayments, which are characteristic of a loan 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\": \"\u00a352,204.64\",\n \"statement_period\": \"30-05-2024 to 29-01-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.11454545454545456,
"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.06666666666666667,
"pattern_score": 0.09090909090909091,
"total_score": 0.11454545454545456
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "loan_statement"
}
},
"page_number": 5,
"text_length": 1104
},
{
"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 Statement\u0027 and includes key indicators such as scheduled payments, principal, interest, total payment amounts, and outstanding balance. It also includes a company name (S.C.S. AQUATIC \u0026 PET WHOLESALE) and references a financial institution (LendingCrowd). These are clear indicators of a loan 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\": \"\u00a32,399.83\",\n \"loan_tenure\": \"24 months\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a350,379.05\",\n \"statement_period\": \"28 February 2025 to 28 February 2027\",\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-CtWLYztzipNH1Q0ItVcPjik6mCmpB\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 Statement\\\u0027 and includes key indicators such as scheduled payments, principal, interest, total payment amounts, and outstanding balance. It also includes a company name (S.C.S. AQUATIC \u0026 PET WHOLESALE) and references a financial institution (LendingCrowd). These are clear indicators of a loan 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\": \"\u00a32,399.83\",\\n \"loan_tenure\": \"24 months\",\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a350,379.05\",\\n \"statement_period\": \"28 February 2025 to 28 February 2027\",\\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=1767348416, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=256, prompt_tokens=1960, total_tokens=2216, 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": "24 months",
"monthly_payment": "\u00a32,399.83",
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": "\u00a350,379.05",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "28 February 2025 to 28 February 2027",
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Loan Statement\u0027 and includes key indicators such as scheduled payments, principal, interest, total payment amounts, and outstanding balance. It also includes a company name (S.C.S. AQUATIC \u0026 PET WHOLESALE) and references a financial institution (LendingCrowd). These are clear indicators of a loan statement.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and includes key indicators such as scheduled payments, principal, interest, total payment amounts, and outstanding balance. It also includes a company name (S.C.S. AQUATIC \u0026 PET WHOLESALE) and references a financial institution (LendingCrowd). These are clear indicators of a loan 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\": \"\u00a32,399.83\",\n \"loan_tenure\": \"24 months\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a350,379.05\",\n \"statement_period\": \"28 February 2025 to 28 February 2027\",\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.11454545454545456,
"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.06666666666666667,
"pattern_score": 0.09090909090909091,
"total_score": 0.11454545454545456
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "loan_statement"
}
},
"page_number": 6,
"text_length": 1855
},
{
"confidence_score": 0.8,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document mentions \u0027Funding Circle\u0027 which is a known loan provider, and the term \u0027loan\u0027 is explicitly stated, indicating it is related to a loan account or loan statement. However, the lack of detailed information reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWLa0X0YiYJGouV1yWs6WyrfQb6n\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.8,\\n \"reasoning\": \"The document mentions \\\u0027Funding Circle\\\u0027 which is a known loan provider, and the term \\\u0027loan\\\u0027 is explicitly stated, indicating it is related to a loan account or loan statement. However, the lack of detailed information reduces confidence slightly.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348418, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=209, prompt_tokens=993, total_tokens=1202, 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, cache"
},
"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 \u0027Funding Circle\u0027 which is a known loan provider, and the term \u0027loan\u0027 is explicitly stated, indicating it is related to a loan account or loan statement. However, the lack of detailed information reduces confidence slightly.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document mentions \u0027Funding Circle\u0027 which is a known loan provider, and the term \u0027loan\u0027 is explicitly stated, indicating it is related to a loan account or loan statement. However, the lack of detailed information reduces confidence slightly.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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": "uncertain",
"pattern_based": {
"confidence": 0.0,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 7,
"text_length": 20
},
{
"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 a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. These are characteristic of loan repayment statements. There is no mention of property addresses, hire purchase terms, or other indicators of different 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\": \"72 months\",\n \"loan_reference\": \"BSCSAQUA2863D8\",\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"From 27/02/2023 to 28/07/2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,058.24\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLbRekqG7wxxHVq60U84pRZtHCi\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 a loan reference number (\\\u0027BSCSAQUA2863D8\\\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. These are characteristic of loan repayment statements. There is no mention of property addresses, hire purchase terms, or other indicators of different 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\": \"72 months\",\\n \"loan_reference\": \"BSCSAQUA2863D8\",\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"From 27/02/2023 to 28/07/2025\",\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a32,058.24\"\\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=1767348419, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=271, prompt_tokens=1698, total_tokens=1969, completion_tokens_details=Completi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": "BSCSAQUA2863D8",
"loan_tenure": "72 months",
"monthly_payment": null,
"monthly_payment_amount": "\u00a32,058.24",
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "From 27/02/2023 to 28/07/2025",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a loan statement, such as a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. These are characteristic of loan repayment statements. There is no mention of property addresses, hire purchase terms, or other indicators of different document types.",
"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 a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. These are characteristic of loan repayment statements. There is no mention of property addresses, hire purchase terms, or other indicators of different 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\": \"72 months\",\n \"loan_reference\": \"BSCSAQUA2863D8\",\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"From 27/02/2023 to 28/07/2025\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,058.24\"\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.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 8,
"text_length": 1695
},
{
"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 a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. Additionally, it includes a loan withdrawal transaction, which is a common feature 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\": \"72 months\",\n \"loan_reference\": \"BSCSAQUA2863D8\",\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,058.24\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLdkNZ5JroXYxSglDH6cI8ApZhr\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 a loan reference number (\\\u0027BSCSAQUA2863D8\\\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. Additionally, it includes a loan withdrawal transaction, which is a common feature 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\": \"72 months\",\\n \"loan_reference\": \"BSCSAQUA2863D8\",\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a32,058.24\"\\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=1767348421, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=245, prompt_tokens=1298, total_tokens=1543, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_p"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": "BSCSAQUA2863D8",
"loan_tenure": "72 months",
"monthly_payment": null,
"monthly_payment_amount": "\u00a32,058.24",
"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 loan statement, such as a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. Additionally, it includes a loan withdrawal transaction, which is a common feature of loan statements.",
"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 a loan reference number (\u0027BSCSAQUA2863D8\u0027), loan amount (\u00a3105,000.00), loan term (72 months), and a series of direct debit repayments. Additionally, it includes a loan withdrawal transaction, which is a common feature 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\": \"72 months\",\n \"loan_reference\": \"BSCSAQUA2863D8\",\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a32,058.24\"\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.065,
"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.0625,
"total_score": 0.04807692307692308
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 9,
"text_length": 779
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains account codes, descriptions, and financial figures for different periods, which are key indicators of a nominal ledger. Terms like \u0027Sale of goods\u0027, \u0027Opening stock\u0027, \u0027Closing stock\u0027, \u0027Purchases\u0027, and \u0027Wages and salaries\u0027 are typical of a general or nominal ledger. There are no indicators of transactions, invoices, payroll, or other specific document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLfAdJkTibQZwDrtkAin7Jcx1QZ\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains account codes, descriptions, and financial figures for different periods, which are key indicators of a nominal ledger. Terms like \\\u0027Sale of goods\\\u0027, \\\u0027Opening stock\\\u0027, \\\u0027Closing stock\\\u0027, \\\u0027Purchases\\\u0027, and \\\u0027Wages and salaries\\\u0027 are typical of a general or nominal ledger. There are no indicators of transactions, invoices, payroll, or other specific document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348423, 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=1613, total_tokens=1854, 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 contains account codes, descriptions, and financial figures for different periods, which are key indicators of a nominal ledger. Terms like \u0027Sale of goods\u0027, \u0027Opening stock\u0027, \u0027Closing stock\u0027, \u0027Purchases\u0027, and \u0027Wages and salaries\u0027 are typical of a general or nominal ledger. There are no indicators of transactions, invoices, payroll, or other specific document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains account codes, descriptions, and financial figures for different periods, which are key indicators of a nominal ledger. Terms like \u0027Sale of goods\u0027, \u0027Opening stock\u0027, \u0027Closing stock\u0027, \u0027Purchases\u0027, and \u0027Wages and salaries\u0027 are typical of a general or nominal ledger. There are no indicators of transactions, invoices, payroll, or other specific document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.4642857142857143,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.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.5,
"pattern_score": 0.14285714285714285,
"total_score": 0.4642857142857143
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.0,
"total_score": 0.045
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 10,
"text_length": 1723
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked,\u0027 \u0027Employers NI,\u0027 \u0027Staff pensions,\u0027 and \u0027Rent.\u0027 These are clear indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. The structure and terminology align with a general ledger or nominal ledger format.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWLhDRobt90rb0ocHGPxnFTYbcy2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \\\u0027Payroll expenses booked,\\\u0027 \\\u0027Employers NI,\\\u0027 \\\u0027Staff pensions,\\\u0027 and \\\u0027Rent.\\\u0027 These are clear indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. The structure and terminology align with a general ledger or nominal ledger format.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348425, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=233, prompt_tokens=1612, total_tokens=1845, completion_tokens_details=CompletionTokensDetails(accepted_prediction_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked,\u0027 \u0027Employers NI,\u0027 \u0027Staff pensions,\u0027 and \u0027Rent.\u0027 These are clear indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. The structure and terminology align with a general ledger or nominal ledger format.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked,\u0027 \u0027Employers NI,\u0027 \u0027Staff pensions,\u0027 and \u0027Rent.\u0027 These are clear indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. The structure and terminology align with a general ledger or nominal ledger format.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.030303030303030304,
"total_score": 0.06681818181818183
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 11,
"text_length": 1673
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes (e.g., 7202-Water, 7200-Electricity, 7800-Repairs \u0026 Renewals), descriptions of expenses (e.g., Light, heat and power, Insurance, Repairs and renewals), and associated amounts. These are key indicators of a nominal ledger, which is used to track financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLjwMqqibm7xJ0uoU4tXU8Mgq3L\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes (e.g., 7202-Water, 7200-Electricity, 7800-Repairs \u0026 Renewals), descriptions of expenses (e.g., Light, heat and power, Insurance, Repairs and renewals), and associated amounts. These are key indicators of a nominal ledger, which is used to track financial transactions categorized by accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348427, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=243, prompt_tokens=1635, total_tokens=1878, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes (e.g., 7202-Water, 7200-Electricity, 7800-Repairs \u0026 Renewals), descriptions of expenses (e.g., Light, heat and power, Insurance, Repairs and renewals), and associated amounts. These are key indicators of a nominal ledger, which is used to track financial transactions categorized by accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes (e.g., 7202-Water, 7200-Electricity, 7800-Repairs \u0026 Renewals), descriptions of expenses (e.g., Light, heat and power, Insurance, Repairs and renewals), and associated amounts. These are key indicators of a nominal ledger, which is used to track financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 12,
"text_length": 1622
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple entries with account codes, descriptions, and amounts, which are characteristic of a nominal ledger. Specific account codes such as \u00277504-Stationery\u0027, \u00277206-TV Licence\u0027, and \u00278200-Donations\u0027 are present, along with corresponding amounts and descriptions. There is no indication of transactions, balances, or other identifiers that would classify it as a bank statement, invoice, 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-CtWLk1vXN6S49i0Hg36NMbsOknb3D\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple entries with account codes, descriptions, and amounts, which are characteristic of a nominal ledger. Specific account codes such as \\\u00277504-Stationery\\\u0027, \\\u00277206-TV Licence\\\u0027, and \\\u00278200-Donations\\\u0027 are present, along with corresponding amounts and descriptions. There is no indication of transactions, balances, or other identifiers that would classify it as a bank statement, invoice, 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=1767348428, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=250, prompt_tokens=1652, total_tokens=1902, completion_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 entries with account codes, descriptions, and amounts, which are characteristic of a nominal ledger. Specific account codes such as \u00277504-Stationery\u0027, \u00277206-TV Licence\u0027, and \u00278200-Donations\u0027 are present, along with corresponding amounts and descriptions. There is no indication of transactions, balances, or other identifiers that would classify it as a bank statement, invoice, or other document type.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple entries with account codes, descriptions, and amounts, which are characteristic of a nominal ledger. Specific account codes such as \u00277504-Stationery\u0027, \u00277206-TV Licence\u0027, and \u00278200-Donations\u0027 are present, along with corresponding amounts and descriptions. There is no indication of transactions, balances, or other identifiers that would classify it as a bank statement, invoice, 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": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 1600
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account codes, descriptions of expenses, and amounts associated with various categories such as advertising, legal fees, bank charges, and depreciation. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLmTIki1OSqi8d6Ep8zlTMGU8uo\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed account codes, descriptions of expenses, and amounts associated with various categories such as advertising, legal fees, bank charges, and depreciation. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348430, 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=1659, total_tokens=1874, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed account codes, descriptions of expenses, and amounts associated with various categories such as advertising, legal fees, bank charges, and depreciation. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed account codes, descriptions of expenses, and amounts associated with various categories such as advertising, legal fees, bank charges, and depreciation. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.02564102564102564,
"total_score": 0.06730769230769232
}
},
"type": "nominal_ledger"
}
},
"page_number": 14,
"text_length": 1936
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Depreciation Expense\u0027, \u0027Corporation tax charge\u0027, \u0027Plant \u0026 Machinery\u0027, and \u0027Depreciation Adjustment\u0027. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLoxMt7ZecNUSO7VrDDeYV8iSAi\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \\\u0027Depreciation Expense\\\u0027, \\\u0027Corporation tax charge\\\u0027, \\\u0027Plant \u0026 Machinery\\\u0027, and \\\u0027Depreciation Adjustment\\\u0027. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348432, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=225, prompt_tokens=1646, total_tokens=1871, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_pre"
},
"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 account codes, ledger entries, and descriptions such as \u0027Depreciation Expense\u0027, \u0027Corporation tax charge\u0027, \u0027Plant \u0026 Machinery\u0027, and \u0027Depreciation Adjustment\u0027. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Depreciation Expense\u0027, \u0027Corporation tax charge\u0027, \u0027Plant \u0026 Machinery\u0027, and \u0027Depreciation Adjustment\u0027. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"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.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.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 15,
"text_length": 1953
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, journal entries (JE), reclassifications, and accumulated depreciation, which are key indicators of a nominal ledger. Additionally, terms like \u0027cost b/fwd\u0027, \u0027depreciation charge\u0027, and \u0027reclassification\u0027 are specific to ledger accounting.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWLpPWl2x0Ex6csMMff9MhRdkvmx\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, journal entries (JE), reclassifications, and accumulated depreciation, which are key indicators of a nominal ledger. Additionally, terms like \\\u0027cost b/fwd\\\u0027, \\\u0027depreciation charge\\\u0027, and \\\u0027reclassification\\\u0027 are specific to ledger accounting.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348433, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=223, prompt_tokens=1666, total_tokens=1889, 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 multiple references to account codes, journal entries (JE), reclassifications, and accumulated depreciation, which are key indicators of a nominal ledger. Additionally, terms like \u0027cost b/fwd\u0027, \u0027depreciation charge\u0027, and \u0027reclassification\u0027 are specific to ledger accounting.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, journal entries (JE), reclassifications, and accumulated depreciation, which are key indicators of a nominal ledger. Additionally, terms like \u0027cost b/fwd\u0027, \u0027depreciation charge\u0027, and \u0027reclassification\u0027 are specific to ledger accounting.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 16,
"text_length": 2185
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, descriptions of transactions, and balances, which are key indicators of a nominal ledger. Terms like \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Prepayments\u0027, and \u0027Intercompany Loans\u0027 are typical of a general ledger or nominal ledger. There are no indicators of invoices, payroll, loan, mortgage, 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-CtWLrPoWGAZDRF5iHnykM81An8ict\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, descriptions of transactions, and balances, which are key indicators of a nominal ledger. Terms like \\\u0027Depreciation\\\u0027, \\\u0027Closing Stock\\\u0027, \\\u0027Opening Stock\\\u0027, \\\u0027Prepayments\\\u0027, and \\\u0027Intercompany Loans\\\u0027 are typical of a general ledger or nominal ledger. There are no indicators of invoices, payroll, loan, mortgage, 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=1767348435, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=242, prompt_tokens=1651, total_tokens=1893, completion_tokens_details=CompletionTokensDetails(acce"
},
"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 account codes, descriptions of transactions, and balances, which are key indicators of a nominal ledger. Terms like \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Prepayments\u0027, and \u0027Intercompany Loans\u0027 are typical of a general ledger or nominal ledger. There are no indicators of invoices, payroll, loan, mortgage, or other financial documents.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, descriptions of transactions, and balances, which are key indicators of a nominal ledger. Terms like \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Prepayments\u0027, and \u0027Intercompany Loans\u0027 are typical of a general ledger or nominal ledger. There are no indicators of invoices, payroll, loan, mortgage, 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": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 17,
"text_length": 1837
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes, control accounts, and specific ledger entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are key indicators of a nominal ledger. Additionally, the document includes detailed financial transactions and adjustments, which are typical of a general or nominal ledger.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLs9yGmWmwuvP4xGAfS1ngRw0yC\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to account codes, control accounts, and specific ledger entries such as \\\u0027Trade creditors\\\u0027, \\\u0027Wages and salaries control\\\u0027, \\\u0027Pension contributions unpaid\\\u0027, and \\\u0027Corporation tax control\\\u0027. These are key indicators of a nominal ledger. Additionally, the document includes detailed financial transactions and adjustments, which are typical of a general or nominal ledger.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348436, 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=1614, total_tokens=1850, completion_tokens_details=CompletionTokensDetails(a"
},
"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 account codes, control accounts, and specific ledger entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are key indicators of a nominal ledger. Additionally, the document includes detailed financial transactions and adjustments, which are typical of a general or nominal ledger.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes, control accounts, and specific ledger entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are key indicators of a nominal ledger. Additionally, the document includes detailed financial transactions and adjustments, which are typical of a general or nominal ledger.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"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.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.125,
"total_score": 0.08333333333333334
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.030303030303030304,
"total_score": 0.06681818181818183
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 18,
"text_length": 1718
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked\u0027, \u0027VAT Control account\u0027, \u0027Directors Loan Account\u0027, and \u0027Retained Earnings\u0027. These are clear indicators of a nominal ledger or general ledger document, which tracks financial transactions across various accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLuOQRXL769nhxHOQ0gFl7K3qsE\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \\\u0027Payroll expenses booked\\\u0027, \\\u0027VAT Control account\\\u0027, \\\u0027Directors Loan Account\\\u0027, and \\\u0027Retained Earnings\\\u0027. These are clear indicators of a nominal ledger or general ledger document, which tracks financial transactions across various accounts.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1767348438, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=224, prompt_tokens=1670, total_tokens=1894, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_token"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked\u0027, \u0027VAT Control account\u0027, \u0027Directors Loan Account\u0027, and \u0027Retained Earnings\u0027. These are clear indicators of a nominal ledger or general ledger document, which tracks financial transactions across various accounts.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Payroll expenses booked\u0027, \u0027VAT Control account\u0027, \u0027Directors Loan Account\u0027, and \u0027Retained Earnings\u0027. These are clear indicators of a nominal ledger or general ledger document, which tracks financial transactions across various accounts.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.04
},
"financial_statement": {
"keyword_score": 0.15789473684210525,
"pattern_score": 0.2,
"total_score": 0.20968421052631578
},
"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.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.02564102564102564,
"total_score": 0.02564102564102564
}
},
"type": "nominal_ledger"
}
},
"page_number": 19,
"text_length": 1812
},
{
"confidence_score": 0.95,
"document_type": "nominal_ledger",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes, descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances, which are key indicators of a nominal ledger. Additionally, the term \u0027Nominal Ledger\u0027 is explicitly mentioned in the 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-CtWLw4aU5AfIE5tmFqvfnEoMdUcd1\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"nominal_ledger\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to account codes, descriptions of transactions (e.g., \\\u0027Extra dividend\\\u0027, \\\u0027Dividend Accounted\\\u0027), and balances, which are key indicators of a nominal ledger. Additionally, the term \\\u0027Nominal Ledger\\\u0027 is explicitly mentioned in the 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=1767348440, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=216, prompt_tokens=1123, total_tokens=1339, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDe"
},
"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 account codes, descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances, which are key indicators of a nominal ledger. Additionally, the term \u0027Nominal Ledger\u0027 is explicitly mentioned in the document.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes, descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances, which are key indicators of a nominal ledger. Additionally, the term \u0027Nominal Ledger\u0027 is explicitly mentioned in the 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": "nominal_ledger"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.33428571428571424,
"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.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.3333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.33428571428571424
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 20,
"text_length": 351
},
{
"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 identified as a mortgage statement due to the presence of key indicators such as \u0027Your Buy To Let Mortgage Statement\u0027, \u0027Mortgage Account Number\u0027, \u0027Property Address\u0027, and references to mortgage payments and terms. Additionally, the document includes a mortgage account number and property address, 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\": null,\n \"statement_period\": \"1st April of last year to 31st March of this year\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": \"Flat 1, Russell House, 58 Sydenham Road, Croydon, CRO 2FJ\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLxPmSbg9Belm8KGtg2ngmiKfGx\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 identified as a mortgage statement due to the presence of key indicators such as \\\u0027Your Buy To Let Mortgage Statement\\\u0027, \\\u0027Mortgage Account Number\\\u0027, \\\u0027Property Address\\\u0027, and references to mortgage payments and terms. Additionally, the document includes a mortgage account number and property address, 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\": null,\\n \"statement_period\": \"1st April of last year to 31st March of this year\",\\n \"mortgage_account_number\": \"1100059898\",\\n \"property_address\": \"Flat 1, Russell House, 58 Sydenham Road, Croydon, CRO 2FJ\",\\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=1767348441, 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=1356, 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": "1100059898",
"outstanding_balance": null,
"property_address": "Flat 1, Russell House, 58 Sydenham Road, Croydon, CRO 2FJ",
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1st April of last year to 31st March of this year",
"total_amount": null
},
"llm_reasoning": "The document is identified as a mortgage statement due to the presence of key indicators such as \u0027Your Buy To Let Mortgage Statement\u0027, \u0027Mortgage Account Number\u0027, \u0027Property Address\u0027, and references to mortgage payments and terms. Additionally, the document includes a mortgage account number and property address, which are specific to mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is identified as a mortgage statement due to the presence of key indicators such as \u0027Your Buy To Let Mortgage Statement\u0027, \u0027Mortgage Account Number\u0027, \u0027Property Address\u0027, and references to mortgage payments and terms. Additionally, the document includes a mortgage account number and property address, 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\": null,\n \"statement_period\": \"1st April of last year to 31st March of this year\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": \"Flat 1, Russell House, 58 Sydenham Road, Croydon, CRO 2FJ\",\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.24822055137844612,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.14285714285714285,
"total_score": 0.09243697478991597
},
"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.13157894736842105,
"pattern_score": 0.19047619047619047,
"total_score": 0.24822055137844612
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 21,
"text_length": 1522
},
{
"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 explicitly mentions \u0027Your Mortgage Statement Summary\u0027, includes a mortgage account number, repayment type, remaining mortgage term, and interest rate details. These are key indicators of a mortgage 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\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": 106,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWLzafLsVhOQbeV7IX3pEsUrIHbq\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 explicitly mentions \\\u0027Your Mortgage Statement Summary\\\u0027, includes a mortgage account number, repayment type, remaining mortgage term, and interest rate details. These are key indicators of a mortgage 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\": \"1100059898\",\\n \"property_address\": null,\\n \"remaining_term_months\": 106,\\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=1767348443, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=205, prompt_tokens=1151, total_tokens=1356, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=1024"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": "1100059898",
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": 106,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document explicitly mentions \u0027Your Mortgage Statement Summary\u0027, includes a mortgage account number, repayment type, remaining mortgage term, and interest rate details. These are key indicators of a mortgage statement.",
"raw_response": "```json\n{\n \"document_type\": \"mortgage_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Your Mortgage Statement Summary\u0027, includes a mortgage account number, repayment type, remaining mortgage term, and interest rate details. These are key indicators of a mortgage 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\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": 106,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "mortgage_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.13152882205513783,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.14285714285714285,
"total_score": 0.09243697478991597
},
"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.10526315789473684,
"pattern_score": 0.047619047619047616,
"total_score": 0.13152882205513783
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 22,
"text_length": 747
},
{
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Mortgage Payment Due\u0027, and \u0027Balance\u0027. It also includes a breakdown of transactions related to a mortgage account, including payments, interest charges, and balances over a specific period.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,160.19\",\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWM1Q01fJHqRCSHYnIbMs6t0ynk3\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, \\\u0027Interest Charged\\\u0027, \\\u0027Payment received by DD\\\u0027, \\\u0027Mortgage Payment Due\\\u0027, and \\\u0027Balance\\\u0027. It also includes a breakdown of transactions related to a mortgage account, including payments, interest charges, and balances over a specific period.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a3212,160.19\",\\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\\n \"mortgage_account_number\": \"1100059898\",\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3705.55\"\\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=1767348445, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=252, prompt_tokens=1485, total_tokens=1737, completion_tokens_details=CompletionTokensDetails(accepted_pre"
},
"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": "\u00a3705.55",
"mortgage_account_number": "1100059898",
"outstanding_balance": "\u00a3212,160.19",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1 April 2023 to 31 March 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as \u0027Mortgage Account Number\u0027, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Mortgage Payment Due\u0027, and \u0027Balance\u0027. It also includes a breakdown of transactions related to a mortgage account, including payments, interest charges, and balances over a specific period.",
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Mortgage Payment Due\u0027, and \u0027Balance\u0027. It also includes a breakdown of transactions related to a mortgage account, including payments, interest charges, and balances over a specific period.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,160.19\",\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"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.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.10526315789473684,
"pattern_score": 0.09523809523809523,
"total_score": 0.16200501253132832
},
"nominal_ledger": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 23,
"text_length": 1648
},
{
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, and \u0027Mortgage Payment Due\u0027. It also includes a clear mortgage account number and details about payments, interest, and balances over time.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,162.11\",\n \"statement_period\": \"01 Aug 2023 to 01 Mar 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWM2recqA9pi9dAANZRgb3BNrUbu\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, \\\u0027Interest Charged\\\u0027, \\\u0027Payment received by DD\\\u0027, and \\\u0027Mortgage Payment Due\\\u0027. It also includes a clear mortgage account number and details about payments, interest, and balances over time.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a3212,162.11\",\\n \"statement_period\": \"01 Aug 2023 to 01 Mar 2024\",\\n \"mortgage_account_number\": \"1100059898\",\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3705.55\"\\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=1767348446, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=243, prompt_tokens=1468, total_tokens=1711, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\u00a3705.55",
"mortgage_account_number": "1100059898",
"outstanding_balance": "\u00a3212,162.11",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01 Aug 2023 to 01 Mar 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as \u0027Mortgage Account Number\u0027, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, and \u0027Mortgage Payment Due\u0027. It also includes a clear mortgage account number and details about payments, interest, and balances over time.",
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, and \u0027Mortgage Payment Due\u0027. It also includes a clear mortgage account number and details about payments, interest, and balances over time.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,162.11\",\n \"statement_period\": \"01 Aug 2023 to 01 Mar 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"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.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.02631578947368421,
"pattern_score": 0.047619047619047616,
"total_score": 0.05573934837092731
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 24,
"text_length": 1140
},
{
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Closing balance\u0027, and \u0027Total Interest Charged\u0027. Additionally, the document references a mortgage provider (Fleet Mortgages) and includes a mortgage account number and balance details.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,175.64\",\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CtWM4TxMaIJHs9ZAutQRbhqc3B29x\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, \\\u0027Interest Charged\\\u0027, \\\u0027Payment received by DD\\\u0027, \\\u0027Closing balance\\\u0027, and \\\u0027Total Interest Charged\\\u0027. Additionally, the document references a mortgage provider (Fleet Mortgages) and includes a mortgage account number and balance details.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": \"\u00a3212,175.64\",\\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\\n \"mortgage_account_number\": \"1100059898\",\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": \"\u00a3705.55\"\\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=1767348448, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=251, prompt_tokens=1162, total_tokens=1413, 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": "\u00a3705.55",
"mortgage_account_number": "1100059898",
"outstanding_balance": "\u00a3212,175.64",
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "1 April 2023 to 31 March 2024",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a mortgage statement, such as \u0027Mortgage Account Number\u0027, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Closing balance\u0027, and \u0027Total Interest Charged\u0027. Additionally, the document references a mortgage provider (Fleet Mortgages) and includes a mortgage account number and balance details.",
"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, \u0027Interest Charged\u0027, \u0027Payment received by DD\u0027, \u0027Closing balance\u0027, and \u0027Total Interest Charged\u0027. Additionally, the document references a mortgage provider (Fleet Mortgages) and includes a mortgage account number and balance details.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": \"\u00a3212,175.64\",\n \"statement_period\": \"1 April 2023 to 31 March 2024\",\n \"mortgage_account_number\": \"1100059898\",\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": \"\u00a3705.55\"\n }\n}\n```"
},
"type": "mortgage_statement"
},
"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.047619047619047616,
"total_score": 0.05573934837092731
},
"nominal_ledger": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.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": 25,
"text_length": 531
},
{
"confidence_score": 0.85,
"document_type": "invoice",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. While it is labeled as a \u0027Valuation Certificate,\u0027 the structure and content align more closely with an invoice, as it includes a breakdown of items and their respective values, along with a total amount. However, the lack of a clear invoice number and explicit invoice date slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Stocktake UK\",\n \"invoice_date\": \"December 1, 2023\",\n \"total_amount\": \"\u00a334,365.93\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWM6FcDk017eoFfBNW2KnoWCD7tT\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. While it is labeled as a \\\u0027Valuation Certificate,\\\u0027 the structure and content align more closely with an invoice, as it includes a breakdown of items and their respective values, along with a total amount. However, the lack of a clear invoice number and explicit invoice date slightly reduces confidence.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": \"Stocktake UK\",\\n \"invoice_date\": \"December 1, 2023\",\\n \"total_amount\": \"\u00a334,365.93\",\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348450, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=263, prompt_tokens=1395, total_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": "December 1, 2023",
"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": "Stocktake UK",
"statement_period": null,
"total_amount": "\u00a334,365.93"
},
"llm_reasoning": "The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. While it is labeled as a \u0027Valuation Certificate,\u0027 the structure and content align more closely with an invoice, as it includes a breakdown of items and their respective values, along with a total amount. However, the lack of a clear invoice number and explicit invoice date slightly reduces confidence.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. While it is labeled as a \u0027Valuation Certificate,\u0027 the structure and content align more closely with an invoice, as it includes a breakdown of items and their respective values, along with a total amount. However, the lack of a clear invoice number and explicit invoice date slightly reduces confidence.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": \"Stocktake UK\",\n \"invoice_date\": \"December 1, 2023\",\n \"total_amount\": \"\u00a334,365.93\",\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "invoice"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.13,
"features": {
"bank_statement": {
"keyword_score": 0.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.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 26,
"text_length": 1384
},
{
"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 details such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, and \u0027Loan Tenure\u0027. These are strong indicators of 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\": \"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-CtWM8mT36Dh1lRxHBN7ZvfcPkT0Ro\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 details such as \\\u0027Agreement Number\\\u0027, \\\u0027Balance Financed\\\u0027, \\\u0027Monthly Payment\\\u0027, and \\\u0027Loan Tenure\\\u0027. These are strong indicators of 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\": \"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=1767348452, 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=1731, total_tokens=1949, 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, cach"
},
"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 details such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, and \u0027Loan Tenure\u0027. These are strong indicators of a hire purchase agreement.",
"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 details such as \u0027Agreement Number\u0027, \u0027Balance Financed\u0027, \u0027Monthly Payment\u0027, and \u0027Loan Tenure\u0027. These are strong indicators of 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\": \"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": "llm_preferred",
"pattern_based": {
"confidence": 0.195,
"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.25,
"pattern_score": 0.0,
"total_score": 0.195
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 27,
"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. Additionally, it includes terms like \u0027declaration for exemption relating to businesses\u0027 and mentions the Financial Services and Markets Act, which are common 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-CtWM9YOul317qpx6meHFkCcDG61l7\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. Additionally, it includes terms like \\\u0027declaration for exemption relating to businesses\\\u0027 and mentions the Financial Services and Markets Act, which are common 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=1767348453, 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=1602, total_tokens=1830, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027finance\u0027, \u0027Supplier\u0027, \u0027Equipment\u0027, and \u0027settlement amount\u0027. Additionally, it includes terms like \u0027declaration for exemption relating to businesses\u0027 and mentions the Financial Services and Markets Act, which are common 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. Additionally, it includes terms like \u0027declaration for exemption relating to businesses\u0027 and mentions the Financial Services and Markets Act, which are common 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.065,
"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.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 28,
"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 \u0027hire\u0027, \u0027agreement\u0027, \u0027equipment\u0027, \u0027rentals\u0027, \u0027payment of rentals\u0027, \u0027commencement of hire\u0027, and terms related to the use, maintenance, and payment for equipment. Additionally, the document mentions \u0027Aldermore\u0027, which is a financial institution often associated with 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\": \"not explicitly mentioned\",\n \"amount_financed\": \"not explicitly mentioned\",\n \"monthly_payment\": \"not explicitly mentioned\",\n \"loan_tenure\": \"not explicitly mentioned\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWMBQXe7gwHI9686dauzp7dgHP0t\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 \\\u0027hire\\\u0027, \\\u0027agreement\\\u0027, \\\u0027equipment\\\u0027, \\\u0027rentals\\\u0027, \\\u0027payment of rentals\\\u0027, \\\u0027commencement of hire\\\u0027, and terms related to the use, maintenance, and payment for equipment. Additionally, the document mentions \\\u0027Aldermore\\\u0027, which is a financial institution often associated with 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\": \"not explicitly mentioned\",\\n \"amount_financed\": \"not explicitly mentioned\",\\n \"monthly_payment\": \"not explicitly mentioned\",\\n \"loan_tenure\": \"not explicitly mentioned\",\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348455, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=252, prompt_tokens=16"
},
"document_identifiers": {
"agreement_date": "not explicitly mentioned",
"amount_financed": "not explicitly mentioned",
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": "not explicitly mentioned",
"monthly_payment": "not explicitly mentioned",
"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 \u0027hire\u0027, \u0027agreement\u0027, \u0027equipment\u0027, \u0027rentals\u0027, \u0027payment of rentals\u0027, \u0027commencement of hire\u0027, and terms related to the use, maintenance, and payment for equipment. Additionally, the document mentions \u0027Aldermore\u0027, which is a financial institution often associated with 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 \u0027hire\u0027, \u0027agreement\u0027, \u0027equipment\u0027, \u0027rentals\u0027, \u0027payment of rentals\u0027, \u0027commencement of hire\u0027, and terms related to the use, maintenance, and payment for equipment. Additionally, the document mentions \u0027Aldermore\u0027, which is a financial institution often associated with 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\": \"not explicitly mentioned\",\n \"amount_financed\": \"not explicitly mentioned\",\n \"monthly_payment\": \"not explicitly mentioned\",\n \"loan_tenure\": \"not explicitly mentioned\",\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.06
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 29,
"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 key indicators of a hire purchase agreement, such as references to \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, it mentions terms like \u0027amount financed\u0027, \u0027insurance money\u0027, and \u0027hiring of the Equipment\u0027, which 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\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CtWMDBy5wjt8sqEsRXJ7uw6UPKBEZ\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 \\\u0027Equipment\\\u0027, \\\u0027Insurance monies\\\u0027, \\\u0027Total Loss\\\u0027, \\\u0027Rentals\\\u0027, and \\\u0027Termination\\\u0027. Additionally, it mentions terms like \\\u0027amount financed\\\u0027, \\\u0027insurance money\\\u0027, and \\\u0027hiring of the Equipment\\\u0027, which 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\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1767348457, 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=1672, total_tokens=1900, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejecte"
},
"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 \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, it mentions terms like \u0027amount financed\u0027, \u0027insurance money\u0027, and \u0027hiring of the Equipment\u0027, which are specific to 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 \u0027Equipment\u0027, \u0027Insurance monies\u0027, \u0027Total Loss\u0027, \u0027Rentals\u0027, and \u0027Termination\u0027. Additionally, it mentions terms like \u0027amount financed\u0027, \u0027insurance money\u0027, and \u0027hiring of the Equipment\u0027, which 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\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.13
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 30,
"text_length": 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 terms commonly associated with hire purchase agreements, such as \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 \u0027Option to Purchase Fee,\u0027 \u0027hiring of the Equipment,\u0027 and \u0027Aldermore,\u0027 which appears to be the financing entity. Additionally, the document discusses terms like \u0027amounts due,\u0027 \u0027commission,\u0027 and \u0027termination of the hiring of the Equipment,\u0027 which are indicative of 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-CtWMPudY8kw0t0C0787LHLHXQM20v\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 \\\u0027Option to Purchase,\\\u0027 \\\u0027Rentals,\\\u0027 \\\u0027Option to Purchase Fee,\\\u0027 \\\u0027hiring of the Equipment,\\\u0027 and \\\u0027Aldermore,\\\u0027 which appears to be the financing entity. Additionally, the document discusses terms like \\\u0027amounts due,\\\u0027 \\\u0027commission,\\\u0027 and \\\u0027termination of the hiring of the Equipment,\\\u0027 which are indicative of 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=1767348469, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=250, prompt_tokens=1627, total_tokens=1877, completion_"
},
"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 \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 \u0027Option to Purchase Fee,\u0027 \u0027hiring of the Equipment,\u0027 and \u0027Aldermore,\u0027 which appears to be the financing entity. Additionally, the document discusses terms like \u0027amounts due,\u0027 \u0027commission,\u0027 and \u0027termination of the hiring of the Equipment,\u0027 which are indicative of 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 terms commonly associated with hire purchase agreements, such as \u0027Option to Purchase,\u0027 \u0027Rentals,\u0027 \u0027Option to Purchase Fee,\u0027 \u0027hiring of the Equipment,\u0027 and \u0027Aldermore,\u0027 which appears to be the financing entity. Additionally, the document discusses terms like \u0027amounts due,\u0027 \u0027commission,\u0027 and \u0027termination of the hiring of the Equipment,\u0027 which are indicative of 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.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.0,
"total_score": 0.045
},
"property_statement": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.02564102564102564,
"total_score": 0.10897435897435898
}
},
"type": "property_statement"
}
},
"page_number": 31,
"text_length": 10817
},
{
"confidence_score": 0.8,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document discusses data protection, credit reference agencies, fraud prevention, and the processing of personal data for financial services. While it does not contain specific transactional details, it appears to be related to financial operations and compliance, which aligns most closely with a financial statement or a general financial document. However, it lacks specific identifiers or details to classify it under other categories like bank_statement, loan_statement, or mortgage_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-CtWMR1nmtpERLZj7yBcpsblVEhiMS\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.8,\\n \"reasoning\": \"The document discusses data protection, credit reference agencies, fraud prevention, and the processing of personal data for financial services. While it does not contain specific transactional details, it appears to be related to financial operations and compliance, which aligns most closely with a financial statement or a general financial document. However, it lacks specific identifiers or details to classify it under other categories like bank_statement, loan_statement, or mortgage_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=1767348471, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_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 discusses data protection, credit reference agencies, fraud prevention, and the processing of personal data for financial services. While it does not contain specific transactional details, it appears to be related to financial operations and compliance, which aligns most closely with a financial statement or a general financial document. However, it lacks specific identifiers or details to classify it under other categories like bank_statement, loan_statement, or mortgage_statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document discusses data protection, credit reference agencies, fraud prevention, and the processing of personal data for financial services. While it does not contain specific transactional details, it appears to be related to financial operations and compliance, which aligns most closely with a financial statement or a general financial document. However, it lacks specific identifiers or details to classify it under other categories like bank_statement, loan_statement, or mortgage_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": "uncertain",
"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
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.041666666666666664
}
},
"type": "bank_statement"
}
},
"page_number": 32,
"text_length": 7424
},
{
"confidence_score": 0.95,
"document_type": "payroll_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"payroll_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed payroll information, including employee names, gross pay, taxable gross, tax, NICs, net pay, employer NICs, and cost to employer. It also includes a summary of payroll for multiple employees and mentions \u0027Payroll Summary\u0027 explicitly in the header. These are key indicators of a payroll 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-CtWMTmLYPmjhJlplGZLmxfqxzXA8J\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"payroll_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed payroll information, including employee names, gross pay, taxable gross, tax, NICs, net pay, employer NICs, and cost to employer. It also includes a summary of payroll for multiple employees and mentions \\\u0027Payroll Summary\\\u0027 explicitly in the header. These are key indicators of a payroll 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=1767348473, 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=2693, total_tokens=2920, 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 contains detailed payroll information, including employee names, gross pay, taxable gross, tax, NICs, net pay, employer NICs, and cost to employer. It also includes a summary of payroll for multiple employees and mentions \u0027Payroll Summary\u0027 explicitly in the header. These are key indicators of a payroll statement.",
"raw_response": "```json\n{\n \"document_type\": \"payroll_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed payroll information, including employee names, gross pay, taxable gross, tax, NICs, net pay, employer NICs, and cost to employer. It also includes a summary of payroll for multiple employees and mentions \u0027Payroll Summary\u0027 explicitly in the header. These are key indicators of a payroll 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": "payroll_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.4881818181818182,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.25,
"pattern_score": 0.30303030303030304,
"total_score": 0.4881818181818182
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "payroll_statement"
}
},
"page_number": 33,
"text_length": 6074
},
{
"confidence_score": 0.95,
"document_type": "payroll_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"payroll_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed payroll information such as employee names, gross pay, taxable gross, net pay, deductions (e.g., NICs, pension), and employer costs. It also includes a summary of payroll data for multiple employees over a specific period (Months 1 to 4). These are key indicators of a payroll 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-CtWMVZwVXx77a5wKyezKwPx4hxGOs\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"payroll_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains detailed payroll information such as employee names, gross pay, taxable gross, net pay, deductions (e.g., NICs, pension), and employer costs. It also includes a summary of payroll data for multiple employees over a specific period (Months 1 to 4). These are key indicators of a payroll 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=1767348475, 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=2699, total_tokens=2928, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains detailed payroll information such as employee names, gross pay, taxable gross, net pay, deductions (e.g., NICs, pension), and employer costs. It also includes a summary of payroll data for multiple employees over a specific period (Months 1 to 4). These are key indicators of a payroll statement.",
"raw_response": "```json\n{\n \"document_type\": \"payroll_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains detailed payroll information such as employee names, gross pay, taxable gross, net pay, deductions (e.g., NICs, pension), and employer costs. It also includes a summary of payroll data for multiple employees over a specific period (Months 1 to 4). These are key indicators of a payroll 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": "payroll_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.42136363636363633,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.20833333333333334,
"pattern_score": 0.2727272727272727,
"total_score": 0.42136363636363633
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "payroll_statement"
}
},
"page_number": 34,
"text_length": 4043
}
],
"processing_timestamp": "2026-01-02T10:07:56.181614"
}