| Original Filename: | ilovepdf_merged_9.pdf |
| Upload Date: | December 23, 2025 at 06:57 AM |
| Total Pages: | 32 |
| Processing Status: | Completed |
| Total Documents: | 6 |
| Loan Statements: | 3 |
| Nominal Ledgers: | 1 |
| Mortgage Statements: | 1 |
| Hp Agreements: | 1 |
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%Unknown
80%Hp Agreement
95%Hp Agreement
95%Hp Agreement
95%Hp Agreement
95%Hp Agreement
95%Loan Statement
85%| Document Type | Pages | Confidence | Processing Status | Created | Actions |
|---|---|---|---|---|---|
| Loan Statement | 2-6 (5 pages) | 94% | Processed | 2025-12-23 06:58 | View |
| Loan Statement | 8-9 (2 pages) | 95% | Processed | 2025-12-23 06:58 | View |
| Nominal Ledger | 10-20 (11 pages) | 95% | Processed | 2025-12-23 06:58 | No view available |
| Mortgage Statement | 21-25 (5 pages) | 95% | Processed | 2025-12-23 06:58 | View |
| Hp Agreement | 27-31 (5 pages) | 95% | Processed | 2025-12-23 06:58 | View |
| Loan Statement | 32 (1 page) | 85% | Processed | 2025-12-23 06:58 | View |
{
"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": null,
"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 contains 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 includes a loan account reference number and details about payments made, which are typical of loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": \"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-Cpqc7X8nF9Eqw1ijFMDUuAgy2GY6n\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 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 includes a loan account reference number and details about payments made, which are typical of loan statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": \"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=1766473011, 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=1444, total_tokens=1689, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tok"
},
"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 contains 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 includes a loan account reference number and details about payments made, which are typical of loan statements.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and contains 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 includes a loan account reference number and details about payments made, which are typical of loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": \"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 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 financial institution, and mentions of fees and capital at risk. 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-Cpqc9s360t4aRPTYDFo3iBoOGrJzD\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 financial institution, and mentions of fees and capital at risk. 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=1766473013, 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=1088, total_tokens=1315, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predic"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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 financial institution, and mentions of fees and capital at risk. 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 financial institution, and mentions of fees and capital at risk. 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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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 key indicators such as \u0027Loan payments\u0027, \u0027Principal\u0027, \u0027Interest\u0027, \u0027Total Paid\u0027, and \u0027Balance\u0027. It also includes a detailed breakdown of loan repayment transactions, which is characteristic of a loan statement. Additionally, the document mentions \u0027LendingCrowd\u0027, a financial institution, and includes a clear record of loan balances and payments 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\": \"\u00a367,766.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\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcA8lgnSoTB4NPGNdZ3js0qOIx1\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 key indicators such as \\\u0027Loan payments\\\u0027, \\\u0027Principal\\\u0027, \\\u0027Interest\\\u0027, \\\u0027Total Paid\\\u0027, and \\\u0027Balance\\\u0027. It also includes a detailed breakdown of loan repayment transactions, which is characteristic of a loan statement. Additionally, the document mentions \\\u0027LendingCrowd\\\u0027, a financial institution, and includes a clear record of loan balances and payments 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\": \"\u00a367,766.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\": 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=1766473014, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=261, prompt_tokens=2031, total_tokens=2292, comple"
},
"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": "\u00a367,766.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 key indicators such as \u0027Loan payments\u0027, \u0027Principal\u0027, \u0027Interest\u0027, \u0027Total Paid\u0027, and \u0027Balance\u0027. It also includes a detailed breakdown of loan repayment transactions, which is characteristic of a loan statement. Additionally, the document mentions \u0027LendingCrowd\u0027, a financial institution, and includes a clear record of loan balances and payments over time.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and contains key indicators such as \u0027Loan payments\u0027, \u0027Principal\u0027, \u0027Interest\u0027, \u0027Total Paid\u0027, and \u0027Balance\u0027. It also includes a detailed breakdown of loan repayment transactions, which is characteristic of a loan statement. Additionally, the document mentions \u0027LendingCrowd\u0027, a financial institution, and includes a clear record of loan balances and payments 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\": \"\u00a367,766.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\": null\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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 financial institution (LendingCrowd) 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\": \"\u00a32,399.83\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcC0mO00eiJxQ3Y90oI6kNPm9W9\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 financial institution (LendingCrowd) 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\": \"\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=1766473016, 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=1410, total_tokens=1655, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_to"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\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-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 financial institution (LendingCrowd) 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 financial institution (LendingCrowd) 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\": \"\u00a32,399.83\"\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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 balances. It also references a company name and provides a detailed breakdown of loan repayment schedules.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\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\": \"\u00a32,399.83\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcEPhb2APuBnLGsVSaRYgkHaWZx\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 balances. It also references a company name and provides a detailed breakdown of loan repayment schedules.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\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\": \"\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=1766473018, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=231, prompt_tokens=1916, total_tokens=2147, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0"
},
"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": "\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 balances. It also references a company name and provides a detailed breakdown of loan repayment schedules.",
"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 balances. It also references a company name and provides a detailed breakdown of loan repayment schedules.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\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\": \"\u00a32,399.83\"\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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": "27/03/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 amount (\u00a3105,000.00), loan term (72 months), and a loan reference (BSCSAQUA2863D8). Additionally, it lists regular direct debit repayments, which are typical of loan repayment schedules. 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\": \"27/03/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-CpqcHaVi0VoGMh9DqKuDU5tlX175t\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 amount (\u00a3105,000.00), loan term (72 months), and a loan reference (BSCSAQUA2863D8). Additionally, it lists regular direct debit repayments, which are typical of loan repayment schedules. 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\": \"27/03/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=1766473021, 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=1654, total_tokens=1925, completion_tokens_details=CompletionT"
},
"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": "27/03/2023 to 28/07/2025",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a loan statement, such as a loan amount (\u00a3105,000.00), loan term (72 months), and a loan reference (BSCSAQUA2863D8). Additionally, it lists regular direct debit repayments, which are typical of loan repayment schedules. 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 amount (\u00a3105,000.00), loan term (72 months), and a loan reference (BSCSAQUA2863D8). Additionally, it lists regular direct debit repayments, which are typical of loan repayment schedules. 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\": \"27/03/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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 8,
"text_length": 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), a loan amount (\u00a3105,000.00), a 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-CpqcJr1sp5aYnSUhedenqjysWXu9q\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), a loan amount (\u00a3105,000.00), a 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=1766473023, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=248, prompt_tokens=1254, total_tokens=1502, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejec"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": "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), a loan amount (\u00a3105,000.00), a 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), a loan amount (\u00a3105,000.00), a 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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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, \u0027Purchases\u0027, \u0027Wages and salaries\u0027, and \u0027Stock Adjustment\u0027 are typical of a general ledger or nominal ledger. There are no indicators of transactions, invoices, loans, 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-CpqcLEjxQ8fMvevrGRxIW9CDX7o9l\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, \\\u0027Purchases\\\u0027, \\\u0027Wages and salaries\\\u0027, and \\\u0027Stock Adjustment\\\u0027 are typical of a general ledger or nominal ledger. There are no indicators of transactions, invoices, loans, 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=1766473025, 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=1569, total_tokens=1810, completion_tokens_details=CompletionTokensDetails(accepted_pred"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains 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, \u0027Purchases\u0027, \u0027Wages and salaries\u0027, and \u0027Stock Adjustment\u0027 are typical of a general ledger or nominal ledger. There are no indicators of transactions, invoices, loans, or other financial documents.",
"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, \u0027Purchases\u0027, \u0027Wages and salaries\u0027, and \u0027Stock Adjustment\u0027 are typical of a general ledger or nominal ledger. There are no indicators of transactions, invoices, loans, 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.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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 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 typical indicators of a nominal ledger, which tracks financial transactions categorized by accounts. There are no indicators of invoices, payroll, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcN3FGXhQapCiok73SAM0hAIvgP\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, ledger entries, and descriptions such as \\\u0027Payroll expenses booked\\\u0027, \\\u0027Employers NI\\\u0027, \\\u0027Staff pensions\\\u0027, and \\\u0027Rent\\\u0027. These are typical indicators of a nominal ledger, which tracks financial transactions categorized by accounts. There are no indicators of invoices, payroll, or other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1766473027, 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=1568, total_tokens=1797, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reason"
},
"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, ledger entries, and descriptions such as \u0027Payroll expenses booked\u0027, \u0027Employers NI\u0027, \u0027Staff pensions\u0027, and \u0027Rent\u0027. These are typical indicators of a nominal ledger, which tracks financial transactions categorized by accounts. There are no indicators of invoices, payroll, or other document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains 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 typical indicators of a nominal ledger, which tracks financial transactions categorized by accounts. There are no indicators of invoices, payroll, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "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
},
"payroll": {
"keyword_score": 0.1,
"pattern_score": 0.0,
"total_score": 0.06
},
"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, categories such as \u0027Light, heat and power\u0027, \u0027Repairs and renewals\u0027, and \u0027Telephone and fax\u0027, as well as detailed entries for debits and credits. These are key indicators of a nominal ledger or general ledger 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-CpqcPBvQ3YzW0e7LffDJ9bg9pOMlB\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, categories such as \\\u0027Light, heat and power\\\u0027, \\\u0027Repairs and renewals\\\u0027, and \\\u0027Telephone and fax\\\u0027, as well as detailed entries for debits and credits. These are key indicators of a nominal ledger or general ledger 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=1766473029, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=221, prompt_tokens=1591, total_tokens=1812, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=Prom"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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, categories such as \u0027Light, heat and power\u0027, \u0027Repairs and renewals\u0027, and \u0027Telephone and fax\u0027, as well as detailed entries for debits and credits. These are key indicators of a nominal ledger or general ledger document.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, categories such as \u0027Light, heat and power\u0027, \u0027Repairs and renewals\u0027, and \u0027Telephone and fax\u0027, as well as detailed entries for debits and credits. These are key indicators of a nominal ledger or general ledger 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.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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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. There are no indicators of transactions, balances, or identifiers specific to other document types such as invoices, payroll, or loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CpqcQ5epJ8cyBnhjDBuGfMuuPMudM\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. There are no indicators of transactions, balances, or identifiers specific to other document types such as invoices, payroll, or loan statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1766473030, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1608, total_tokens=1820, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptToken"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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. There are no indicators of transactions, balances, or identifiers specific to other document types such as invoices, payroll, or loan statements.",
"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. There are no indicators of transactions, balances, or identifiers specific to other document types such as invoices, payroll, or loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 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 multiple entries with account codes, descriptions of expenses, and corresponding amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no references to invoices, loans, mortgages, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcSHqQsI9KepxyhsfzNYnaP84uc\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 of expenses, and corresponding amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no references to invoices, loans, mortgages, or other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1766473032, 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=1615, total_tokens=1833, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), "
},
"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 of expenses, and corresponding amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no references to invoices, loans, mortgages, or other document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple entries with account codes, descriptions of expenses, and corresponding amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no references to invoices, loans, mortgages, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"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, descriptions of transactions (e.g., depreciation, corporation tax, loan interest), and amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no specific identifiers or details that match other document types such as invoices, loan statements, or payroll.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcT257s6xHc5dIi26Xxk1O9bqbM\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 (e.g., depreciation, corporation tax, loan interest), and amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no specific identifiers or details that match other document types such as invoices, loan statements, or payroll.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1766473033, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=234, prompt_tokens=1602, total_tokens=1836, completion_tokens_details=CompletionTokensDetails(accepted_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes, descriptions of transactions (e.g., depreciation, corporation tax, loan interest), and amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no specific identifiers or details that match other document types such as invoices, loan statements, or payroll.",
"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 (e.g., depreciation, corporation tax, loan interest), and amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no specific identifiers or details that match other document types such as invoices, loan statements, or payroll.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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, reclassifications, and journal entries, which are key indicators of a nominal ledger. Specific account codes (e.g., 580.00, 582.00, 600.00) and descriptions like \u0027Fixtures and fittings cost\u0027, \u0027accumulated depreciation\u0027, and \u0027reclassification\u0027 further confirm this classification. There are no indicators of transactions, invoices, payroll, 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-CpqcV73tFauyCzK3hyh0wyrHkdY5y\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, reclassifications, and journal entries, which are key indicators of a nominal ledger. Specific account codes (e.g., 580.00, 582.00, 600.00) and descriptions like \\\u0027Fixtures and fittings cost\\\u0027, \\\u0027accumulated depreciation\\\u0027, and \\\u0027reclassification\\\u0027 further confirm this classification. There are no indicators of transactions, invoices, payroll, 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=1766473035, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=254, prompt_tokens=1622, total_tokens=1876, completion_tokens_det"
},
"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, reclassifications, and journal entries, which are key indicators of a nominal ledger. Specific account codes (e.g., 580.00, 582.00, 600.00) and descriptions like \u0027Fixtures and fittings cost\u0027, \u0027accumulated depreciation\u0027, and \u0027reclassification\u0027 further confirm this classification. There are no indicators of transactions, invoices, payroll, 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, reclassifications, and journal entries, which are key indicators of a nominal ledger. Specific account codes (e.g., 580.00, 582.00, 600.00) and descriptions like \u0027Fixtures and fittings cost\u0027, \u0027accumulated depreciation\u0027, and \u0027reclassification\u0027 further confirm this classification. There are no indicators of transactions, invoices, payroll, 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.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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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, ledger entries, and descriptions such as \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Intercompany Loans\u0027, and \u0027Prepayments\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-CpqcXKbi5bV95ZLvZVGSKU7kHQjd7\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\\\u0027, \\\u0027Closing Stock\\\u0027, \\\u0027Opening Stock\\\u0027, \\\u0027Intercompany Loans\\\u0027, and \\\u0027Prepayments\\\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=1766473037, 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=1607, total_tokens=1831, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Intercompany Loans\u0027, and \u0027Prepayments\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\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Intercompany Loans\u0027, and \u0027Prepayments\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.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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 multiple references to account codes, control accounts, and entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are clear indicators of a nominal ledger or general ledger. Additionally, there are no references to transactions, invoices, loans, mortgages, or other financial document-specific identifiers.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CpqcZLWoOLQ1E3nvYx3GoQJRsvTXs\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, control accounts, and entries such as \\\u0027Trade creditors\\\u0027, \\\u0027Wages and salaries control\\\u0027, \\\u0027Pension contributions unpaid\\\u0027, and \\\u0027Corporation tax control\\\u0027. These are clear indicators of a nominal ledger or general ledger. Additionally, there are no references to transactions, invoices, loans, mortgages, or other financial document-specific identifiers.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1766473039, 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=1570, total_tokens=1809, completion_tokens_details=CompletionToke"
},
"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, control accounts, and entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are clear indicators of a nominal ledger or general ledger. Additionally, there are no references to transactions, invoices, loans, mortgages, or other financial document-specific identifiers.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, control accounts, and entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are clear indicators of a nominal ledger or general ledger. Additionally, there are no references to transactions, invoices, loans, mortgages, or other financial document-specific identifiers.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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, 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-CpqcbObbWoNb1Fc1zwcD7m6x5PTsC\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, 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=1766473041, 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=1626, total_tokens=1849, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_pr"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains 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, 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 \u0027Payroll expenses booked\u0027, \u0027VAT Control account\u0027, \u0027Directors Loan Account\u0027, and \u0027Retained Earnings\u0027. These are clear 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.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
},
"payroll": {
"keyword_score": 0.05,
"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 (e.g., \u0027015\u0027, \u0027016\u0027, \u0027017\u0027), descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances. These are key indicators of a nominal ledger, which is used to record financial transactions and balances across accounts. There is no evidence of invoice numbers, loan references, or property details, which rules out other categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqccEHUSZhPHti1OP1rtQuvpQDPL\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 (e.g., \\\u0027015\\\u0027, \\\u0027016\\\u0027, \\\u0027017\\\u0027), descriptions of transactions (e.g., \\\u0027Extra dividend\\\u0027, \\\u0027Dividend Accounted\\\u0027), and balances. These are key indicators of a nominal ledger, which is used to record financial transactions and balances across accounts. There is no evidence of invoice numbers, loan references, or property details, which rules out other categories.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1766473042, 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=1079, total_tokens=1324, completion_tokens_details=CompletionTokens"
},
"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 (e.g., \u0027015\u0027, \u0027016\u0027, \u0027017\u0027), descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances. These are key indicators of a nominal ledger, which is used to record financial transactions and balances across accounts. There is no evidence of invoice numbers, loan references, or property details, which rules out other categories.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes (e.g., \u0027015\u0027, \u0027016\u0027, \u0027017\u0027), descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances. These are key indicators of a nominal ledger, which is used to record financial transactions and balances across accounts. There is no evidence of invoice numbers, loan references, or property details, which rules out other categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 20,
"text_length": 351
}
],
"start_page": 10
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "3.99%",
"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 is issued by a mortgage company (Fleet Mortgages Ltd), and it includes details about the mortgage account and property address.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\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-CpqceJQ1GOuZYd0qY8a8bIb2lKilk\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 is issued by a mortgage company (Fleet Mortgages Ltd), and it includes details about the mortgage account and property address.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\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=1766473044, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_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": "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 is issued by a mortgage company (Fleet Mortgages Ltd), and it includes details about the mortgage account and property address.",
"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 is issued by a mortgage company (Fleet Mortgages Ltd), and it includes details about the mortgage account and property address.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 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 contains key indicators of a mortgage statement, such as \u0027Your Mortgage Statement Summary,\u0027 \u0027Account number,\u0027 \u0027Repayment type,\u0027 \u0027Remaining mortgage term,\u0027 and \u0027Interest Rate Details.\u0027 It also mentions \u0027Interest Only\u0027 repayment type and provides details about the interest rate and remaining term, 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\": \"3.99%\",\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-Cpqcg3o1GNH7a9WkTyJjGnuP6gpIe\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 \\\u0027Your Mortgage Statement Summary,\\\u0027 \\\u0027Account number,\\\u0027 \\\u0027Repayment type,\\\u0027 \\\u0027Remaining mortgage term,\\\u0027 and \\\u0027Interest Rate Details.\\\u0027 It also mentions \\\u0027Interest Only\\\u0027 repayment type and provides details about the interest rate and remaining term, 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\": \"3.99%\",\\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=1766473046, 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=1107, total_tokens=1343, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "3.99%",
"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 contains key indicators of a mortgage statement, such as \u0027Your Mortgage Statement Summary,\u0027 \u0027Account number,\u0027 \u0027Repayment type,\u0027 \u0027Remaining mortgage term,\u0027 and \u0027Interest Rate Details.\u0027 It also mentions \u0027Interest Only\u0027 repayment type and provides details about the interest rate and remaining term, which are specific to mortgage statements.",
"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 \u0027Your Mortgage Statement Summary,\u0027 \u0027Account number,\u0027 \u0027Repayment type,\u0027 \u0027Remaining mortgage term,\u0027 and \u0027Interest Rate Details.\u0027 It also mentions \u0027Interest Only\u0027 repayment type and provides details about the interest rate and remaining term, 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\": \"3.99%\",\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 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 Due\u0027, \u0027Payment received by DD\u0027, and \u0027Balance\u0027. Additionally, it includes a breakdown of transactions related to a mortgage account over a specific period, which is typical 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\": \"\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-CpqcidRmVdBIguYM3PQvh93Zirn0h\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 Due\\\u0027, \\\u0027Payment received by DD\\\u0027, and \\\u0027Balance\\\u0027. Additionally, it includes a breakdown of transactions related to a mortgage account over a specific period, which is typical 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\": \"\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=1766473048, 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=1441, total_tokens=1692, completion_tokens_details=CompletionTokensDetails(accepted_prediction_to"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\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 Due\u0027, \u0027Payment received by DD\u0027, and \u0027Balance\u0027. Additionally, it includes a breakdown of transactions related to a mortgage account over a specific period, which is typical of a mortgage statement.",
"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 Due\u0027, \u0027Payment received by DD\u0027, and \u0027Balance\u0027. Additionally, it includes a breakdown of transactions related to a mortgage account over a specific period, which is typical 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\": \"\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 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 running balance and references to monthly payments and interest charges, which are typical of 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\": \"\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-Cpqcj1RzL3ZTQw6qlevbk6v6Bt2v5\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 running balance and references to monthly payments and interest charges, which are typical of 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\": \"\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=1766473049, 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=1424, total_tokens=1669, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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 running balance and references to monthly payments and interest charges, which are typical of mortgage statements.",
"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 running balance and references to monthly payments and interest charges, which are typical of 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\": \"\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 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 is issued by a mortgage company (Fleet Mortgages).\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\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-CpqclfR0FBYogudqAwXIaI00XF7iF\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 is issued by a mortgage company (Fleet Mortgages).\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\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=1766473051, 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=1118, total_tokens=1362, 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": "\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 is issued by a mortgage company (Fleet Mortgages).",
"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 is issued by a mortgage company (Fleet Mortgages).\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 25,
"text_length": 531
}
],
"start_page": 21
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": "date it is signed by Aldermore",
"amount_financed": "54,256.58",
"annual_interest_rate": "5% per annum above Finance House Base Rate",
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": "36",
"monthly_payment": "1,760.08",
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "hp_agreement",
"end_page": 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 indicators such as \u0027Agreement Number\u0027, \u0027Balance financed\u0027, \u0027Monthly payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements and not found in other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": \"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-Cpqcp5PUAZwz8axkmjC7fSACJzzIh\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Hire Purchase Agreement\\\u0027 and includes key indicators such as \\\u0027Agreement Number\\\u0027, \\\u0027Balance financed\\\u0027, \\\u0027Monthly payment\\\u0027, \\\u0027Hire Period\\\u0027, and \\\u0027Option to Purchase Fee\\\u0027. These are specific to hire purchase agreements and not found in other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": \"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=1766473055, 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=1687, total_tokens=1914, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), pro"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": "54,256.58",
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": "36",
"monthly_payment": "1,760.08",
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance financed\u0027, \u0027Monthly payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements and not found in other document types.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance financed\u0027, \u0027Monthly payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements and not found in other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": \"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 multiple references to a finance agreement, including terms like \u0027Agreement,\u0027 \u0027finance,\u0027 \u0027Supplier,\u0027 \u0027Equipment,\u0027 and \u0027settlement amount.\u0027 It also mentions the lender (Aldermore) and the borrower, which are key indicators of a hire purchase or finance agreement. Additionally, it includes references to business purposes and exemption declarations under financial regulations, 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-CpqcqqsqofuQFnf94JHCGYSun3MAL\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 a finance agreement, including terms like \\\u0027Agreement,\\\u0027 \\\u0027finance,\\\u0027 \\\u0027Supplier,\\\u0027 \\\u0027Equipment,\\\u0027 and \\\u0027settlement amount.\\\u0027 It also mentions the lender (Aldermore) and the borrower, which are key indicators of a hire purchase or finance agreement. Additionally, it includes references to business purposes and exemption declarations under financial regulations, 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=1766473056, 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=1558, total_tokens=1803, comp"
},
"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 a finance agreement, including terms like \u0027Agreement,\u0027 \u0027finance,\u0027 \u0027Supplier,\u0027 \u0027Equipment,\u0027 and \u0027settlement amount.\u0027 It also mentions the lender (Aldermore) and the borrower, which are key indicators of a hire purchase or finance agreement. Additionally, it includes references to business purposes and exemption declarations under financial regulations, 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 multiple references to a finance agreement, including terms like \u0027Agreement,\u0027 \u0027finance,\u0027 \u0027Supplier,\u0027 \u0027Equipment,\u0027 and \u0027settlement amount.\u0027 It also mentions the lender (Aldermore) and the borrower, which are key indicators of a hire purchase or finance agreement. Additionally, it includes references to business purposes and exemption declarations under financial regulations, 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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types such as invoices, bank statements, or loan/mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": \"date it is signed by Aldermore\",\n \"amount_financed\": null,\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcsL4PShOOzJCwjKHczfLoWtMiz\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \\\u0027Agreement\\\u0027, \\\u0027Hire\\\u0027, \\\u0027Equipment\\\u0027, \\\u0027Payment of Rentals\\\u0027, \\\u0027Direct Debit\\\u0027, \\\u0027amount financed\\\u0027, and \\\u0027monthly payment\\\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types such as invoices, bank statements, or loan/mortgage statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": \"date it is signed by Aldermore\",\\n \"amount_financed\": null,\\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1766473058, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_"
},
"document_identifiers": {
"agreement_date": "date it is signed by Aldermore",
"amount_financed": null,
"annual_interest_rate": "5% per annum above Finance House Base Rate",
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": "Rentals and any other payments specified on page 1",
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types such as invoices, bank statements, or loan/mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types such as invoices, bank statements, or loan/mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": \"date it is signed by Aldermore\",\n \"amount_financed\": null,\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.2374736842105263,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.2631578947368421,
"pattern_score": 0.1,
"total_score": 0.2374736842105263
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 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 references to terms such as \u0027Agreement\u0027, \u0027hiring of the Equipment\u0027, \u0027amount financed\u0027, \u0027monthly payments\u0027, and \u0027termination\u0027, which are key indicators of a hire purchase agreement. Additionally, it mentions insurance, total loss, and payment obligations, 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-CpqcvNpDjSJGRGcTokSfxj0E3juMN\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 references to terms such as \\\u0027Agreement\\\u0027, \\\u0027hiring of the Equipment\\\u0027, \\\u0027amount financed\\\u0027, \\\u0027monthly payments\\\u0027, and \\\u0027termination\\\u0027, which are key indicators of a hire purchase agreement. Additionally, it mentions insurance, total loss, and payment obligations, 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=1766473061, 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=1628, total_tokens=1853, 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": null,
"loan_tenure": 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 terms such as \u0027Agreement\u0027, \u0027hiring of the Equipment\u0027, \u0027amount financed\u0027, \u0027monthly payments\u0027, and \u0027termination\u0027, which are key indicators of a hire purchase agreement. Additionally, it mentions insurance, total loss, and payment obligations, 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 references to terms such as \u0027Agreement\u0027, \u0027hiring of the Equipment\u0027, \u0027amount financed\u0027, \u0027monthly payments\u0027, and \u0027termination\u0027, which are key indicators of a hire purchase agreement. Additionally, it mentions insurance, total loss, and payment obligations, 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.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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 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 \u0027Agreement\u0027, \u0027Option to Purchase\u0027, \u0027Rentals\u0027, \u0027Option to Purchase Fee\u0027, \u0027hiring of the Equipment\u0027, and \u0027amounts due under this Agreement\u0027. Additionally, it mentions terms like \u0027termination of the hiring of the Equipment\u0027 and \u0027amounts payable\u0027, which are indicative of a hire purchase or finance 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-CpqcwAQO16y6qIdx2REmENPUoBjvJ\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 \\\u0027Agreement\\\u0027, \\\u0027Option to Purchase\\\u0027, \\\u0027Rentals\\\u0027, \\\u0027Option to Purchase Fee\\\u0027, \\\u0027hiring of the Equipment\\\u0027, and \\\u0027amounts due under this Agreement\\\u0027. Additionally, it mentions terms like \\\u0027termination of the hiring of the Equipment\\\u0027 and \\\u0027amounts payable\\\u0027, which are indicative of a hire purchase or finance 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=1766473062, 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=1583, total_tokens=1828, completion_tokens_details=Co"
},
"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 \u0027Agreement\u0027, \u0027Option to Purchase\u0027, \u0027Rentals\u0027, \u0027Option to Purchase Fee\u0027, \u0027hiring of the Equipment\u0027, and \u0027amounts due under this Agreement\u0027. Additionally, it mentions terms like \u0027termination of the hiring of the Equipment\u0027 and \u0027amounts payable\u0027, which are indicative of a hire purchase or finance 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 \u0027Agreement\u0027, \u0027Option to Purchase\u0027, \u0027Rentals\u0027, \u0027Option to Purchase Fee\u0027, \u0027hiring of the Equipment\u0027, and \u0027amounts due under this Agreement\u0027. Additionally, it mentions terms like \u0027termination of the hiring of the Equipment\u0027 and \u0027amounts payable\u0027, which are indicative of a hire purchase or finance 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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.02564102564102564,
"total_score": 0.10897435897435898
}
},
"type": "property_statement"
}
},
"page_number": 31,
"text_length": 10817
}
],
"start_page": 27
},
{
"avg_confidence": 0.85,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "loan_statement",
"end_page": 32,
"pages": [
{
"confidence_score": 0.85,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical indicators of loan-related documentation. However, the document does not explicitly include specific loan details, which slightly reduces the confidence level.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-Cpqd3CXFTqu1OAK7lKtq8lcTshkwy\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"loan_statement\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical indicators of loan-related documentation. However, the document does not explicitly include specific loan details, which slightly reduces the confidence level.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1766473069, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=238, prompt_tokens=1536, total_tokens=177"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical indicators of loan-related documentation. However, the document does not explicitly include specific loan details, which slightly reduces the confidence level.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical indicators of loan-related documentation. However, the document does not explicitly include specific loan details, which slightly reduces the confidence level.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.07058823529411765,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.041666666666666664
}
},
"type": "bank_statement"
}
},
"page_number": 32,
"text_length": 7424
}
],
"start_page": 32
}
],
"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 such as transactions, balances, or other indicators 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-Cpqc50aZPS7QtRqNJkILGQUasUgnu\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 such as transactions, balances, or other indicators 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=1766473009, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=222, prompt_tokens=951, total_tokens=1173, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), pro"
},
"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 such as transactions, balances, or other indicators 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 such as transactions, balances, or other indicators 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.0,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 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 contains 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 includes a loan account reference number and details about payments made, which are typical of loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": \"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-Cpqc7X8nF9Eqw1ijFMDUuAgy2GY6n\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 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 includes a loan account reference number and details about payments made, which are typical of loan statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": \"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=1766473011, 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=1444, total_tokens=1689, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tok"
},
"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 contains 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 includes a loan account reference number and details about payments made, which are typical of loan statements.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and contains 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 includes a loan account reference number and details about payments made, which are typical of loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": \"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 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 financial institution, and mentions of fees and capital at risk. 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-Cpqc9s360t4aRPTYDFo3iBoOGrJzD\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 financial institution, and mentions of fees and capital at risk. 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=1766473013, 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=1088, total_tokens=1315, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predic"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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 financial institution, and mentions of fees and capital at risk. 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 financial institution, and mentions of fees and capital at risk. 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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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 key indicators such as \u0027Loan payments\u0027, \u0027Principal\u0027, \u0027Interest\u0027, \u0027Total Paid\u0027, and \u0027Balance\u0027. It also includes a detailed breakdown of loan repayment transactions, which is characteristic of a loan statement. Additionally, the document mentions \u0027LendingCrowd\u0027, a financial institution, and includes a clear record of loan balances and payments 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\": \"\u00a367,766.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\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcA8lgnSoTB4NPGNdZ3js0qOIx1\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 key indicators such as \\\u0027Loan payments\\\u0027, \\\u0027Principal\\\u0027, \\\u0027Interest\\\u0027, \\\u0027Total Paid\\\u0027, and \\\u0027Balance\\\u0027. It also includes a detailed breakdown of loan repayment transactions, which is characteristic of a loan statement. Additionally, the document mentions \\\u0027LendingCrowd\\\u0027, a financial institution, and includes a clear record of loan balances and payments 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\": \"\u00a367,766.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\": 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=1766473014, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=261, prompt_tokens=2031, total_tokens=2292, comple"
},
"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": "\u00a367,766.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 key indicators such as \u0027Loan payments\u0027, \u0027Principal\u0027, \u0027Interest\u0027, \u0027Total Paid\u0027, and \u0027Balance\u0027. It also includes a detailed breakdown of loan repayment transactions, which is characteristic of a loan statement. Additionally, the document mentions \u0027LendingCrowd\u0027, a financial institution, and includes a clear record of loan balances and payments over time.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Loan Statement\u0027 and contains key indicators such as \u0027Loan payments\u0027, \u0027Principal\u0027, \u0027Interest\u0027, \u0027Total Paid\u0027, and \u0027Balance\u0027. It also includes a detailed breakdown of loan repayment transactions, which is characteristic of a loan statement. Additionally, the document mentions \u0027LendingCrowd\u0027, a financial institution, and includes a clear record of loan balances and payments 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\": \"\u00a367,766.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\": null\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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 financial institution (LendingCrowd) 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\": \"\u00a32,399.83\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcC0mO00eiJxQ3Y90oI6kNPm9W9\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 financial institution (LendingCrowd) 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\": \"\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=1766473016, 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=1410, total_tokens=1655, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_to"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\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-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 financial institution (LendingCrowd) 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 financial institution (LendingCrowd) 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\": \"\u00a32,399.83\"\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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 balances. It also references a company name and provides a detailed breakdown of loan repayment schedules.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\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\": \"\u00a32,399.83\"\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcEPhb2APuBnLGsVSaRYgkHaWZx\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 balances. It also references a company name and provides a detailed breakdown of loan repayment schedules.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\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\": \"\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=1766473018, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=231, prompt_tokens=1916, total_tokens=2147, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0"
},
"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": "\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 balances. It also references a company name and provides a detailed breakdown of loan repayment schedules.",
"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 balances. It also references a company name and provides a detailed breakdown of loan repayment schedules.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\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\": \"\u00a32,399.83\"\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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 and \u0027loan\u0027, which are strong indicators of a loan-related document. However, the text is minimal and lacks specific details, so the confidence level is not absolute.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CpqcGoPDwgNYXnNgRFAmbjahrZTSn\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 and \\\u0027loan\\\u0027, which are strong indicators of a loan-related document. However, the text is minimal and lacks specific details, so the confidence level is not absolute.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1766473020, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=202, prompt_tokens=949, total_tokens=1151, 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=0)), prompt_filter_results=[{\u0027pr"
},
"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 and \u0027loan\u0027, which are strong indicators of a loan-related document. However, the text is minimal and lacks specific details, so the confidence level is not absolute.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document mentions \u0027Funding Circle\u0027 and \u0027loan\u0027, which are strong indicators of a loan-related document. However, the text is minimal and lacks specific details, so the confidence level is not absolute.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 7,
"text_length": 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 amount (\u00a3105,000.00), loan term (72 months), and a loan reference (BSCSAQUA2863D8). Additionally, it lists regular direct debit repayments, which are typical of loan repayment schedules. 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\": \"27/03/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-CpqcHaVi0VoGMh9DqKuDU5tlX175t\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 amount (\u00a3105,000.00), loan term (72 months), and a loan reference (BSCSAQUA2863D8). Additionally, it lists regular direct debit repayments, which are typical of loan repayment schedules. 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\": \"27/03/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=1766473021, 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=1654, total_tokens=1925, completion_tokens_details=CompletionT"
},
"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": "27/03/2023 to 28/07/2025",
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a loan statement, such as a loan amount (\u00a3105,000.00), loan term (72 months), and a loan reference (BSCSAQUA2863D8). Additionally, it lists regular direct debit repayments, which are typical of loan repayment schedules. 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 amount (\u00a3105,000.00), loan term (72 months), and a loan reference (BSCSAQUA2863D8). Additionally, it lists regular direct debit repayments, which are typical of loan repayment schedules. 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\": \"27/03/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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 8,
"text_length": 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), a loan amount (\u00a3105,000.00), a 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-CpqcJr1sp5aYnSUhedenqjysWXu9q\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), a loan amount (\u00a3105,000.00), a 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=1766473023, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=248, prompt_tokens=1254, total_tokens=1502, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejec"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": "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), a loan amount (\u00a3105,000.00), a 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), a loan amount (\u00a3105,000.00), a 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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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, \u0027Purchases\u0027, \u0027Wages and salaries\u0027, and \u0027Stock Adjustment\u0027 are typical of a general ledger or nominal ledger. There are no indicators of transactions, invoices, loans, 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-CpqcLEjxQ8fMvevrGRxIW9CDX7o9l\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, \\\u0027Purchases\\\u0027, \\\u0027Wages and salaries\\\u0027, and \\\u0027Stock Adjustment\\\u0027 are typical of a general ledger or nominal ledger. There are no indicators of transactions, invoices, loans, 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=1766473025, 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=1569, total_tokens=1810, completion_tokens_details=CompletionTokensDetails(accepted_pred"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains 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, \u0027Purchases\u0027, \u0027Wages and salaries\u0027, and \u0027Stock Adjustment\u0027 are typical of a general ledger or nominal ledger. There are no indicators of transactions, invoices, loans, or other financial documents.",
"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, \u0027Purchases\u0027, \u0027Wages and salaries\u0027, and \u0027Stock Adjustment\u0027 are typical of a general ledger or nominal ledger. There are no indicators of transactions, invoices, loans, 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.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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 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 typical indicators of a nominal ledger, which tracks financial transactions categorized by accounts. There are no indicators of invoices, payroll, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcN3FGXhQapCiok73SAM0hAIvgP\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, ledger entries, and descriptions such as \\\u0027Payroll expenses booked\\\u0027, \\\u0027Employers NI\\\u0027, \\\u0027Staff pensions\\\u0027, and \\\u0027Rent\\\u0027. These are typical indicators of a nominal ledger, which tracks financial transactions categorized by accounts. There are no indicators of invoices, payroll, or other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1766473027, 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=1568, total_tokens=1797, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reason"
},
"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, ledger entries, and descriptions such as \u0027Payroll expenses booked\u0027, \u0027Employers NI\u0027, \u0027Staff pensions\u0027, and \u0027Rent\u0027. These are typical indicators of a nominal ledger, which tracks financial transactions categorized by accounts. There are no indicators of invoices, payroll, or other document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains 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 typical indicators of a nominal ledger, which tracks financial transactions categorized by accounts. There are no indicators of invoices, payroll, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "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
},
"payroll": {
"keyword_score": 0.1,
"pattern_score": 0.0,
"total_score": 0.06
},
"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, categories such as \u0027Light, heat and power\u0027, \u0027Repairs and renewals\u0027, and \u0027Telephone and fax\u0027, as well as detailed entries for debits and credits. These are key indicators of a nominal ledger or general ledger 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-CpqcPBvQ3YzW0e7LffDJ9bg9pOMlB\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, categories such as \\\u0027Light, heat and power\\\u0027, \\\u0027Repairs and renewals\\\u0027, and \\\u0027Telephone and fax\\\u0027, as well as detailed entries for debits and credits. These are key indicators of a nominal ledger or general ledger 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=1766473029, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=221, prompt_tokens=1591, total_tokens=1812, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=Prom"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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, categories such as \u0027Light, heat and power\u0027, \u0027Repairs and renewals\u0027, and \u0027Telephone and fax\u0027, as well as detailed entries for debits and credits. These are key indicators of a nominal ledger or general ledger document.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, categories such as \u0027Light, heat and power\u0027, \u0027Repairs and renewals\u0027, and \u0027Telephone and fax\u0027, as well as detailed entries for debits and credits. These are key indicators of a nominal ledger or general ledger 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.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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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. There are no indicators of transactions, balances, or identifiers specific to other document types such as invoices, payroll, or loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CpqcQ5epJ8cyBnhjDBuGfMuuPMudM\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. There are no indicators of transactions, balances, or identifiers specific to other document types such as invoices, payroll, or loan statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1766473030, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=212, prompt_tokens=1608, total_tokens=1820, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptToken"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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. There are no indicators of transactions, balances, or identifiers specific to other document types such as invoices, payroll, or loan statements.",
"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. There are no indicators of transactions, balances, or identifiers specific to other document types such as invoices, payroll, or loan statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 13,
"text_length": 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 multiple entries with account codes, descriptions of expenses, and corresponding amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no references to invoices, loans, mortgages, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcSHqQsI9KepxyhsfzNYnaP84uc\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 of expenses, and corresponding amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no references to invoices, loans, mortgages, or other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1766473032, 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=1615, total_tokens=1833, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), "
},
"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 of expenses, and corresponding amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no references to invoices, loans, mortgages, or other document types.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple entries with account codes, descriptions of expenses, and corresponding amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no references to invoices, loans, mortgages, or other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"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, descriptions of transactions (e.g., depreciation, corporation tax, loan interest), and amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no specific identifiers or details that match other document types such as invoices, loan statements, or payroll.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcT257s6xHc5dIi26Xxk1O9bqbM\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 (e.g., depreciation, corporation tax, loan interest), and amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no specific identifiers or details that match other document types such as invoices, loan statements, or payroll.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1766473033, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=234, prompt_tokens=1602, total_tokens=1836, completion_tokens_details=CompletionTokensDetails(accepted_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes, descriptions of transactions (e.g., depreciation, corporation tax, loan interest), and amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no specific identifiers or details that match other document types such as invoices, loan statements, or payroll.",
"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 (e.g., depreciation, corporation tax, loan interest), and amounts. These are key indicators of a nominal ledger, which is used to record financial transactions categorized by accounts. There are no specific identifiers or details that match other document types such as invoices, loan statements, or payroll.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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, reclassifications, and journal entries, which are key indicators of a nominal ledger. Specific account codes (e.g., 580.00, 582.00, 600.00) and descriptions like \u0027Fixtures and fittings cost\u0027, \u0027accumulated depreciation\u0027, and \u0027reclassification\u0027 further confirm this classification. There are no indicators of transactions, invoices, payroll, 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-CpqcV73tFauyCzK3hyh0wyrHkdY5y\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, reclassifications, and journal entries, which are key indicators of a nominal ledger. Specific account codes (e.g., 580.00, 582.00, 600.00) and descriptions like \\\u0027Fixtures and fittings cost\\\u0027, \\\u0027accumulated depreciation\\\u0027, and \\\u0027reclassification\\\u0027 further confirm this classification. There are no indicators of transactions, invoices, payroll, 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=1766473035, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=254, prompt_tokens=1622, total_tokens=1876, completion_tokens_det"
},
"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, reclassifications, and journal entries, which are key indicators of a nominal ledger. Specific account codes (e.g., 580.00, 582.00, 600.00) and descriptions like \u0027Fixtures and fittings cost\u0027, \u0027accumulated depreciation\u0027, and \u0027reclassification\u0027 further confirm this classification. There are no indicators of transactions, invoices, payroll, 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, reclassifications, and journal entries, which are key indicators of a nominal ledger. Specific account codes (e.g., 580.00, 582.00, 600.00) and descriptions like \u0027Fixtures and fittings cost\u0027, \u0027accumulated depreciation\u0027, and \u0027reclassification\u0027 further confirm this classification. There are no indicators of transactions, invoices, payroll, 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.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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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, ledger entries, and descriptions such as \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Intercompany Loans\u0027, and \u0027Prepayments\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-CpqcXKbi5bV95ZLvZVGSKU7kHQjd7\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\\\u0027, \\\u0027Closing Stock\\\u0027, \\\u0027Opening Stock\\\u0027, \\\u0027Intercompany Loans\\\u0027, and \\\u0027Prepayments\\\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=1766473037, 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=1607, total_tokens=1831, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_t"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to account codes, ledger entries, and descriptions such as \u0027Depreciation\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Intercompany Loans\u0027, and \u0027Prepayments\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\u0027, \u0027Closing Stock\u0027, \u0027Opening Stock\u0027, \u0027Intercompany Loans\u0027, and \u0027Prepayments\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.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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 multiple references to account codes, control accounts, and entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are clear indicators of a nominal ledger or general ledger. Additionally, there are no references to transactions, invoices, loans, mortgages, or other financial document-specific identifiers.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-CpqcZLWoOLQ1E3nvYx3GoQJRsvTXs\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, control accounts, and entries such as \\\u0027Trade creditors\\\u0027, \\\u0027Wages and salaries control\\\u0027, \\\u0027Pension contributions unpaid\\\u0027, and \\\u0027Corporation tax control\\\u0027. These are clear indicators of a nominal ledger or general ledger. Additionally, there are no references to transactions, invoices, loans, mortgages, or other financial document-specific identifiers.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1766473039, 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=1570, total_tokens=1809, completion_tokens_details=CompletionToke"
},
"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, control accounts, and entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are clear indicators of a nominal ledger or general ledger. Additionally, there are no references to transactions, invoices, loans, mortgages, or other financial document-specific identifiers.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to account codes, control accounts, and entries such as \u0027Trade creditors\u0027, \u0027Wages and salaries control\u0027, \u0027Pension contributions unpaid\u0027, and \u0027Corporation tax control\u0027. These are clear indicators of a nominal ledger or general ledger. Additionally, there are no references to transactions, invoices, loans, mortgages, or other financial document-specific identifiers.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "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, 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-CpqcbObbWoNb1Fc1zwcD7m6x5PTsC\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, 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=1766473041, 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=1626, total_tokens=1849, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_pr"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains 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, 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 \u0027Payroll expenses booked\u0027, \u0027VAT Control account\u0027, \u0027Directors Loan Account\u0027, and \u0027Retained Earnings\u0027. These are clear 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.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
},
"payroll": {
"keyword_score": 0.05,
"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 (e.g., \u0027015\u0027, \u0027016\u0027, \u0027017\u0027), descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances. These are key indicators of a nominal ledger, which is used to record financial transactions and balances across accounts. There is no evidence of invoice numbers, loan references, or property details, which rules out other categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqccEHUSZhPHti1OP1rtQuvpQDPL\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 (e.g., \\\u0027015\\\u0027, \\\u0027016\\\u0027, \\\u0027017\\\u0027), descriptions of transactions (e.g., \\\u0027Extra dividend\\\u0027, \\\u0027Dividend Accounted\\\u0027), and balances. These are key indicators of a nominal ledger, which is used to record financial transactions and balances across accounts. There is no evidence of invoice numbers, loan references, or property details, which rules out other categories.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\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=1766473042, 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=1079, total_tokens=1324, completion_tokens_details=CompletionTokens"
},
"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 (e.g., \u0027015\u0027, \u0027016\u0027, \u0027017\u0027), descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances. These are key indicators of a nominal ledger, which is used to record financial transactions and balances across accounts. There is no evidence of invoice numbers, loan references, or property details, which rules out other categories.",
"raw_response": "```json\n{\n \"document_type\": \"nominal_ledger\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to account codes (e.g., \u0027015\u0027, \u0027016\u0027, \u0027017\u0027), descriptions of transactions (e.g., \u0027Extra dividend\u0027, \u0027Dividend Accounted\u0027), and balances. These are key indicators of a nominal ledger, which is used to record financial transactions and balances across accounts. There is no evidence of invoice numbers, loan references, or property details, which rules out other categories.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "nominal_ledger"
},
"method_used": "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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 is issued by a mortgage company (Fleet Mortgages Ltd), and it includes details about the mortgage account and property address.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\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-CpqceJQ1GOuZYd0qY8a8bIb2lKilk\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 is issued by a mortgage company (Fleet Mortgages Ltd), and it includes details about the mortgage account and property address.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\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=1766473044, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_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": "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 is issued by a mortgage company (Fleet Mortgages Ltd), and it includes details about the mortgage account and property address.",
"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 is issued by a mortgage company (Fleet Mortgages Ltd), and it includes details about the mortgage account and property address.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 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 contains key indicators of a mortgage statement, such as \u0027Your Mortgage Statement Summary,\u0027 \u0027Account number,\u0027 \u0027Repayment type,\u0027 \u0027Remaining mortgage term,\u0027 and \u0027Interest Rate Details.\u0027 It also mentions \u0027Interest Only\u0027 repayment type and provides details about the interest rate and remaining term, 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\": \"3.99%\",\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-Cpqcg3o1GNH7a9WkTyJjGnuP6gpIe\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 \\\u0027Your Mortgage Statement Summary,\\\u0027 \\\u0027Account number,\\\u0027 \\\u0027Repayment type,\\\u0027 \\\u0027Remaining mortgage term,\\\u0027 and \\\u0027Interest Rate Details.\\\u0027 It also mentions \\\u0027Interest Only\\\u0027 repayment type and provides details about the interest rate and remaining term, 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\": \"3.99%\",\\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=1766473046, 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=1107, total_tokens=1343, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": "3.99%",
"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 contains key indicators of a mortgage statement, such as \u0027Your Mortgage Statement Summary,\u0027 \u0027Account number,\u0027 \u0027Repayment type,\u0027 \u0027Remaining mortgage term,\u0027 and \u0027Interest Rate Details.\u0027 It also mentions \u0027Interest Only\u0027 repayment type and provides details about the interest rate and remaining term, which are specific to mortgage statements.",
"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 \u0027Your Mortgage Statement Summary,\u0027 \u0027Account number,\u0027 \u0027Repayment type,\u0027 \u0027Remaining mortgage term,\u0027 and \u0027Interest Rate Details.\u0027 It also mentions \u0027Interest Only\u0027 repayment type and provides details about the interest rate and remaining term, 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\": \"3.99%\",\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "mortgage_statement"
}
},
"page_number": 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 Due\u0027, \u0027Payment received by DD\u0027, and \u0027Balance\u0027. Additionally, it includes a breakdown of transactions related to a mortgage account over a specific period, which is typical 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\": \"\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-CpqcidRmVdBIguYM3PQvh93Zirn0h\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 Due\\\u0027, \\\u0027Payment received by DD\\\u0027, and \\\u0027Balance\\\u0027. Additionally, it includes a breakdown of transactions related to a mortgage account over a specific period, which is typical 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\": \"\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=1766473048, 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=1441, total_tokens=1692, completion_tokens_details=CompletionTokensDetails(accepted_prediction_to"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": "\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 Due\u0027, \u0027Payment received by DD\u0027, and \u0027Balance\u0027. Additionally, it includes a breakdown of transactions related to a mortgage account over a specific period, which is typical of a mortgage statement.",
"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 Due\u0027, \u0027Payment received by DD\u0027, and \u0027Balance\u0027. Additionally, it includes a breakdown of transactions related to a mortgage account over a specific period, which is typical 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\": \"\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 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 running balance and references to monthly payments and interest charges, which are typical of 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\": \"\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-Cpqcj1RzL3ZTQw6qlevbk6v6Bt2v5\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 running balance and references to monthly payments and interest charges, which are typical of 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\": \"\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=1766473049, 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=1424, total_tokens=1669, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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 running balance and references to monthly payments and interest charges, which are typical of mortgage statements.",
"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 running balance and references to monthly payments and interest charges, which are typical of 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\": \"\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 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 is issued by a mortgage company (Fleet Mortgages).\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\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-CpqclfR0FBYogudqAwXIaI00XF7iF\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 is issued by a mortgage company (Fleet Mortgages).\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\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=1766473051, 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=1118, total_tokens=1362, 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": "\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 is issued by a mortgage company (Fleet Mortgages).",
"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 is issued by a mortgage company (Fleet Mortgages).\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 25,
"text_length": 531
},
{
"confidence_score": 0.8,
"document_type": "unknown",
"features": {
"llm_based": {
"confidence": 0.8,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. However, it does not explicitly mention an invoice number or invoice-specific terms like \u0027Invoice Number\u0027 or \u0027Bill To\u0027. The presence of a valuation certificate and stock analysis suggests it is a specialized type of invoice related to stock valuation.\",\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-CpqcnxJLztZTt1ZcNtD1Kk8WImlEI\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"invoice\",\\n \"confidence\": 0.8,\\n \"reasoning\": \"The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. However, it does not explicitly mention an invoice number or invoice-specific terms like \\\u0027Invoice Number\\\u0027 or \\\u0027Bill To\\\u0027. The presence of a valuation certificate and stock analysis suggests it is a specialized type of invoice related to stock valuation.\",\\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=1766473053, 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=1351, total_tokens=1603, completion_tokens_details=CompletionToken"
},
"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. However, it does not explicitly mention an invoice number or invoice-specific terms like \u0027Invoice Number\u0027 or \u0027Bill To\u0027. The presence of a valuation certificate and stock analysis suggests it is a specialized type of invoice related to stock valuation.",
"raw_response": "```json\n{\n \"document_type\": \"invoice\",\n \"confidence\": 0.8,\n \"reasoning\": \"The document contains key indicators of an invoice, such as a total amount, a seller/company name (Stocktake UK), and a valuation total. However, it does not explicitly mention an invoice number or invoice-specific terms like \u0027Invoice Number\u0027 or \u0027Bill To\u0027. The presence of a valuation certificate and stock analysis suggests it is a specialized type of invoice related to stock valuation.\",\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": "uncertain",
"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 indicators such as \u0027Agreement Number\u0027, \u0027Balance financed\u0027, \u0027Monthly payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements and not found in other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": \"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-Cpqcp5PUAZwz8axkmjC7fSACJzzIh\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Hire Purchase Agreement\\\u0027 and includes key indicators such as \\\u0027Agreement Number\\\u0027, \\\u0027Balance financed\\\u0027, \\\u0027Monthly payment\\\u0027, \\\u0027Hire Period\\\u0027, and \\\u0027Option to Purchase Fee\\\u0027. These are specific to hire purchase agreements and not found in other document types.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": \"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=1766473055, 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=1687, total_tokens=1914, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), pro"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": "54,256.58",
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": "36",
"monthly_payment": "1,760.08",
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance financed\u0027, \u0027Monthly payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements and not found in other document types.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Hire Purchase Agreement\u0027 and includes key indicators such as \u0027Agreement Number\u0027, \u0027Balance financed\u0027, \u0027Monthly payment\u0027, \u0027Hire Period\u0027, and \u0027Option to Purchase Fee\u0027. These are specific to hire purchase agreements and not found in other document types.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": \"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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 multiple references to a finance agreement, including terms like \u0027Agreement,\u0027 \u0027finance,\u0027 \u0027Supplier,\u0027 \u0027Equipment,\u0027 and \u0027settlement amount.\u0027 It also mentions the lender (Aldermore) and the borrower, which are key indicators of a hire purchase or finance agreement. Additionally, it includes references to business purposes and exemption declarations under financial regulations, 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-CpqcqqsqofuQFnf94JHCGYSun3MAL\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 a finance agreement, including terms like \\\u0027Agreement,\\\u0027 \\\u0027finance,\\\u0027 \\\u0027Supplier,\\\u0027 \\\u0027Equipment,\\\u0027 and \\\u0027settlement amount.\\\u0027 It also mentions the lender (Aldermore) and the borrower, which are key indicators of a hire purchase or finance agreement. Additionally, it includes references to business purposes and exemption declarations under financial regulations, 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=1766473056, 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=1558, total_tokens=1803, comp"
},
"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 a finance agreement, including terms like \u0027Agreement,\u0027 \u0027finance,\u0027 \u0027Supplier,\u0027 \u0027Equipment,\u0027 and \u0027settlement amount.\u0027 It also mentions the lender (Aldermore) and the borrower, which are key indicators of a hire purchase or finance agreement. Additionally, it includes references to business purposes and exemption declarations under financial regulations, 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 multiple references to a finance agreement, including terms like \u0027Agreement,\u0027 \u0027finance,\u0027 \u0027Supplier,\u0027 \u0027Equipment,\u0027 and \u0027settlement amount.\u0027 It also mentions the lender (Aldermore) and the borrower, which are key indicators of a hire purchase or finance agreement. Additionally, it includes references to business purposes and exemption declarations under financial regulations, 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
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "nominal_ledger"
}
},
"page_number": 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 \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types such as invoices, bank statements, or loan/mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": \"date it is signed by Aldermore\",\n \"amount_financed\": null,\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-CpqcsL4PShOOzJCwjKHczfLoWtMiz\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"hp_agreement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \\\u0027Agreement\\\u0027, \\\u0027Hire\\\u0027, \\\u0027Equipment\\\u0027, \\\u0027Payment of Rentals\\\u0027, \\\u0027Direct Debit\\\u0027, \\\u0027amount financed\\\u0027, and \\\u0027monthly payment\\\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types such as invoices, bank statements, or loan/mortgage statements.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": \"date it is signed by Aldermore\",\\n \"amount_financed\": null,\\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027protected_material_text\u0027: {\u0027filtered\u0027: False, \u0027detected\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1766473058, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_"
},
"document_identifiers": {
"agreement_date": "date it is signed by Aldermore",
"amount_financed": null,
"annual_interest_rate": "5% per annum above Finance House Base Rate",
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": "Rentals and any other payments specified on page 1",
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types such as invoices, bank statements, or loan/mortgage statements.",
"raw_response": "```json\n{\n \"document_type\": \"hp_agreement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains key indicators of a hire purchase agreement, such as references to \u0027Agreement\u0027, \u0027Hire\u0027, \u0027Equipment\u0027, \u0027Payment of Rentals\u0027, \u0027Direct Debit\u0027, \u0027amount financed\u0027, and \u0027monthly payment\u0027. These terms are specific to hire purchase or finance agreements, and there is no mention of other document types such as invoices, bank statements, or loan/mortgage statements.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": \"date it is signed by Aldermore\",\n \"amount_financed\": null,\n \"monthly_payment\": \"Rentals and any other payments specified on page 1\",\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": \"5% per annum above Finance House Base Rate\",\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "hp_agreement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.2374736842105263,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.2631578947368421,
"pattern_score": 0.1,
"total_score": 0.2374736842105263
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.16666666666666666,
"pattern_score": 0.0,
"total_score": 0.09999999999999999
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 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 references to terms such as \u0027Agreement\u0027, \u0027hiring of the Equipment\u0027, \u0027amount financed\u0027, \u0027monthly payments\u0027, and \u0027termination\u0027, which are key indicators of a hire purchase agreement. Additionally, it mentions insurance, total loss, and payment obligations, 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-CpqcvNpDjSJGRGcTokSfxj0E3juMN\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 references to terms such as \\\u0027Agreement\\\u0027, \\\u0027hiring of the Equipment\\\u0027, \\\u0027amount financed\\\u0027, \\\u0027monthly payments\\\u0027, and \\\u0027termination\\\u0027, which are key indicators of a hire purchase agreement. Additionally, it mentions insurance, total loss, and payment obligations, 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=1766473061, 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=1628, total_tokens=1853, 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": null,
"loan_tenure": 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 terms such as \u0027Agreement\u0027, \u0027hiring of the Equipment\u0027, \u0027amount financed\u0027, \u0027monthly payments\u0027, and \u0027termination\u0027, which are key indicators of a hire purchase agreement. Additionally, it mentions insurance, total loss, and payment obligations, 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 references to terms such as \u0027Agreement\u0027, \u0027hiring of the Equipment\u0027, \u0027amount financed\u0027, \u0027monthly payments\u0027, and \u0027termination\u0027, which are key indicators of a hire purchase agreement. Additionally, it mentions insurance, total loss, and payment obligations, 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.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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 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 \u0027Agreement\u0027, \u0027Option to Purchase\u0027, \u0027Rentals\u0027, \u0027Option to Purchase Fee\u0027, \u0027hiring of the Equipment\u0027, and \u0027amounts due under this Agreement\u0027. Additionally, it mentions terms like \u0027termination of the hiring of the Equipment\u0027 and \u0027amounts payable\u0027, which are indicative of a hire purchase or finance 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-CpqcwAQO16y6qIdx2REmENPUoBjvJ\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 \\\u0027Agreement\\\u0027, \\\u0027Option to Purchase\\\u0027, \\\u0027Rentals\\\u0027, \\\u0027Option to Purchase Fee\\\u0027, \\\u0027hiring of the Equipment\\\u0027, and \\\u0027amounts due under this Agreement\\\u0027. Additionally, it mentions terms like \\\u0027termination of the hiring of the Equipment\\\u0027 and \\\u0027amounts payable\\\u0027, which are indicative of a hire purchase or finance 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=1766473062, 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=1583, total_tokens=1828, completion_tokens_details=Co"
},
"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 \u0027Agreement\u0027, \u0027Option to Purchase\u0027, \u0027Rentals\u0027, \u0027Option to Purchase Fee\u0027, \u0027hiring of the Equipment\u0027, and \u0027amounts due under this Agreement\u0027. Additionally, it mentions terms like \u0027termination of the hiring of the Equipment\u0027 and \u0027amounts payable\u0027, which are indicative of a hire purchase or finance 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 \u0027Agreement\u0027, \u0027Option to Purchase\u0027, \u0027Rentals\u0027, \u0027Option to Purchase Fee\u0027, \u0027hiring of the Equipment\u0027, and \u0027amounts due under this Agreement\u0027. Additionally, it mentions terms like \u0027termination of the hiring of the Equipment\u0027 and \u0027amounts payable\u0027, which are indicative of a hire purchase or finance 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
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.02564102564102564,
"total_score": 0.10897435897435898
}
},
"type": "property_statement"
}
},
"page_number": 31,
"text_length": 10817
},
{
"confidence_score": 0.85,
"document_type": "loan_statement",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical indicators of loan-related documentation. However, the document does not explicitly include specific loan details, which slightly reduces the confidence level.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-Cpqd3CXFTqu1OAK7lKtq8lcTshkwy\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"loan_statement\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical indicators of loan-related documentation. However, the document does not explicitly include specific loan details, which slightly reduces the confidence level.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_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=1766473069, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_b54fe76834\u0027, usage=CompletionUsage(completion_tokens=238, prompt_tokens=1536, total_tokens=177"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical indicators of loan-related documentation. However, the document does not explicitly include specific loan details, which slightly reduces the confidence level.",
"raw_response": "```json\n{\n \"document_type\": \"loan_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document discusses topics such as creditworthiness, financial history, account management, and debt recovery, which are commonly associated with loan statements. Additionally, it mentions the use of Credit Reference Agencies (CRAs) and ongoing exchange of financial information, which are typical indicators of loan-related documentation. However, the document does not explicitly include specific loan details, which slightly reduces the confidence level.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "loan_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.07058823529411765,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.038461538461538464,
"pattern_score": 0.0,
"total_score": 0.023076923076923078
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll": {
"keyword_score": 0.05,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.041666666666666664
}
},
"type": "bank_statement"
}
},
"page_number": 32,
"text_length": 7424
}
],
"processing_timestamp": "2025-12-23T06:57:52.739229"
}