| Original Filename: | Purpose2_Property_Accounts_and_Corp_Tax_2024_signed_1777349035.pdf |
| Upload Date: | April 28, 2026 at 04:06 AM |
| Total Pages: | 35 |
| Processing Status: | Completed |
| Total Documents: | 11 |
| Financial Statements: | 6 |
| Corporation Taxs: | 5 |
Financial Statement
90%Financial Statement
95%Financial Statement
85%Financial Statement
95%Financial Statement
95%Financial Statement
95%Financial Statement
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
98%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Corporation Tax
95%Financial Statement
95%Financial Statement
95%Corporation Tax
95%Corporation Tax
95%Financial Statement
90%| Document Type | Pages | Confidence | Processing Status | Created | Actions |
|---|---|---|---|---|---|
| Financial Statement | 1-2 (2 pages) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Financial Statement | 3-4 (2 pages) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Financial Statement | 5-7 (3 pages) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Financial Statement | 31 (1 page) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Financial Statement | 32 (1 page) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Corporation Tax | 33 (1 page) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Corporation Tax | 33 (1 page) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Corporation Tax | 33-34 (2 pages) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Corporation Tax | 34 (1 page) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Corporation Tax | 34 (1 page) | 95% | Processed | 2026-04-28 04:06 | No view available |
| Financial Statement | 35 (1 page) | 90% | Processed | 2026-04-28 04:06 | No view available |
{
"document_groups": [
{
"avg_confidence": 0.9285714285714286,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "financial_statement",
"end_page": 7,
"pages": [
{
"confidence_score": 0.9,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains the title \u0027Micro Entity Accounts\u0027 and references a company name and a specific date, which are key indicators of a financial statement. There is no mention of transactions, invoices, loans, mortgages, or other specific financial products, 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-DZTzcq3gnz88M1ZwcZ77k3LbigFcv\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains the title \\\u0027Micro Entity Accounts\\\u0027 and references a company name and a specific date, which are key indicators of a financial statement. There is no mention of transactions, invoices, loans, mortgages, or other specific financial products, 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349144, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=217, prompt_tokens=1039, total_tokens=1256, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prom"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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 the title \u0027Micro Entity Accounts\u0027 and references a company name and a specific date, which are key indicators of a financial statement. There is no mention of transactions, invoices, loans, mortgages, or other specific financial products, which rules out other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains the title \u0027Micro Entity Accounts\u0027 and references a company name and a specific date, which are key indicators of a financial statement. There is no mention of transactions, invoices, loans, mortgages, or other specific financial products, 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": "financial_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 1,
"text_length": 148
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains financial information such as fixed assets, current assets, liabilities, capital, and reserves. It also references compliance with the Companies Act 2006 and FRS 105, which are specific to financial reporting. These are key indicators of a financial statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTzeFqzq8oJeYrFdW3p1QKI01w2b\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Balance Sheet\\\u0027 and contains financial information such as fixed assets, current assets, liabilities, capital, and reserves. It also references compliance with the Companies Act 2006 and FRS 105, which are specific to financial reporting. These are key indicators of a financial statement.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349146, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=223, prompt_tokens=1463, total_tokens=1686, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predict"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Balance Sheet\u0027 and contains financial information such as fixed assets, current assets, liabilities, capital, and reserves. It also references compliance with the Companies Act 2006 and FRS 105, which are specific to financial reporting. These are key indicators of a financial statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains financial information such as fixed assets, current assets, liabilities, capital, and reserves. It also references compliance with the Companies Act 2006 and FRS 105, which are specific to financial reporting. These are key indicators of a financial statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.3713684210526315,
"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.3157894736842105,
"pattern_score": 0.3,
"total_score": 0.3713684210526315
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 2,
"text_length": 1807
},
{
"confidence_score": 0.85,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document mentions \u0027Accounts\u0027 and a specific date (\u002731 August 2024\u0027), which are key indicators of a financial statement. Additionally, the document references a registered company (\u0027PURPOSE2PROPERTY LIMITED\u0027) and its registered number (\u002711510774\u0027), which are typical elements of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the 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-DZTzfzNQdWd00IdGrOUfZKgPiw9iE\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document mentions \\\u0027Accounts\\\u0027 and a specific date (\\\u002731 August 2024\\\u0027), which are key indicators of a financial statement. Additionally, the document references a registered company (\\\u0027PURPOSE2PROPERTY LIMITED\\\u0027) and its registered number (\\\u002711510774\\\u0027), which are typical elements of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349147, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=239, prompt_tokens=1037, total_tokens=1276, completion_tokens_details=Completion"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document mentions \u0027Accounts\u0027 and a specific date (\u002731 August 2024\u0027), which are key indicators of a financial statement. Additionally, the document references a registered company (\u0027PURPOSE2PROPERTY LIMITED\u0027) and its registered number (\u002711510774\u0027), which are typical elements of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document mentions \u0027Accounts\u0027 and a specific date (\u002731 August 2024\u0027), which are key indicators of a financial statement. Additionally, the document references a registered company (\u0027PURPOSE2PROPERTY LIMITED\u0027) and its registered number (\u002711510774\u0027), which are typical elements of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the 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": "financial_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 3,
"text_length": 135
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Profit and Loss Account, Balance Sheet, and the preparation of accounts, which are key components of financial statements. Additionally, it mentions compliance with the Companies Act 2006 and the responsibility for preparing accounts that give a true and fair view of the company\u0027s financial state, further indicating it is a financial statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTzhYiK3dRaleyrfaBI6qkon7d5V\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a Profit and Loss Account, Balance Sheet, and the preparation of accounts, which are key components of financial statements. Additionally, it mentions compliance with the Companies Act 2006 and the responsibility for preparing accounts that give a true and fair view of the company\\\u0027s financial state, further indicating it is a financial statement.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349149, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=230, prompt_tokens=1247, total_tokens=1477, completion_tokens_details=CompletionTokensDetails(accepted_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 references to a Profit and Loss Account, Balance Sheet, and the preparation of accounts, which are key components of financial statements. Additionally, it mentions compliance with the Companies Act 2006 and the responsibility for preparing accounts that give a true and fair view of the company\u0027s financial state, further indicating it is a financial statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Profit and Loss Account, Balance Sheet, and the preparation of accounts, which are key components of financial statements. Additionally, it mentions compliance with the Companies Act 2006 and the responsibility for preparing accounts that give a true and fair view of the company\u0027s financial state, further indicating it is a financial statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.13389473684210526,
"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.05263157894736842,
"pattern_score": 0.2,
"total_score": 0.13389473684210526
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 4,
"text_length": 1151
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Profit and Loss Account\u0027 and includes financial metrics such as turnover, staff costs, depreciation, other charges, and profit before taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss account. There are no indicators of transactions, balances, or other details that would classify it as a bank statement, credit card statement, invoice, or 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-DZTzi4VgLF6FoMKIiItVBqOmyt6qv\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Profit and Loss Account\\\u0027 and includes financial metrics such as turnover, staff costs, depreciation, other charges, and profit before taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss account. There are no indicators of transactions, balances, or other details that would classify it as a bank statement, credit card statement, invoice, or 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349150, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=243, prompt_tokens=1121, total_tokens=1364, c"
},
"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 \u0027Profit and Loss Account\u0027 and includes financial metrics such as turnover, staff costs, depreciation, other charges, and profit before taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss account. There are no indicators of transactions, balances, or other details that would classify it as a bank statement, credit card statement, invoice, or other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Profit and Loss Account\u0027 and includes financial metrics such as turnover, staff costs, depreciation, other charges, and profit before taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss account. There are no indicators of transactions, balances, or other details that would classify it as a bank statement, credit card statement, invoice, or 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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.12378947368421052,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.1,
"total_score": 0.12378947368421052
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 5,
"text_length": 353
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a balance sheet, which is a key component of financial statements. It includes details about fixed assets, current assets, liabilities, and capital reserves. Additionally, it mentions compliance with the Companies Act 2006 and FRS 105, which are relevant to financial reporting. There are no indicators of transactions, invoices, payroll, loans, or property-related details that would classify it under 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-DZTzjKVsqsZqVRNPD9XxMh3baJU2y\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is a balance sheet, which is a key component of financial statements. It includes details about fixed assets, current assets, liabilities, and capital reserves. Additionally, it mentions compliance with the Companies Act 2006 and FRS 105, which are relevant to financial reporting. There are no indicators of transactions, invoices, payroll, loans, or property-related details that would classify it under 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349151, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=244, prompt_tokens=1461, total_tokens=1705, completion_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is a balance sheet, which is a key component of financial statements. It includes details about fixed assets, current assets, liabilities, and capital reserves. Additionally, it mentions compliance with the Companies Act 2006 and FRS 105, which are relevant to financial reporting. There are no indicators of transactions, invoices, payroll, loans, or property-related details that would classify it under other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a balance sheet, which is a key component of financial statements. It includes details about fixed assets, current assets, liabilities, and capital reserves. Additionally, it mentions compliance with the Companies Act 2006 and FRS 105, which are relevant to financial reporting. There are no indicators of transactions, invoices, payroll, loans, or property-related details that would classify it under 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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.3713684210526315,
"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.3157894736842105,
"pattern_score": 0.3,
"total_score": 0.3713684210526315
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 6,
"text_length": 1807
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed profit and loss account with line items such as sales, staff costs, depreciation, premises costs, administrative expenses, legal and professional costs, and interest payable. These are key indicators of a financial statement, specifically a profit and loss account. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific details, payroll information, or property-related data.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-DZTzljQhowJ6vVkxGrLwHQsF9jGZW\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed profit and loss account with line items such as sales, staff costs, depreciation, premises costs, administrative expenses, legal and professional costs, and interest payable. These are key indicators of a financial statement, specifically a profit and loss account. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific details, payroll information, or property-related data.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349153, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsa"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed profit and loss account with line items such as sales, staff costs, depreciation, premises costs, administrative expenses, legal and professional costs, and interest payable. These are key indicators of a financial statement, specifically a profit and loss account. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific details, payroll information, or property-related data.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed profit and loss account with line items such as sales, staff costs, depreciation, premises costs, administrative expenses, legal and professional costs, and interest payable. These are key indicators of a financial statement, specifically a profit and loss account. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific details, payroll information, or property-related data.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.1616842105263158,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.15789473684210525,
"pattern_score": 0.1,
"total_score": 0.1616842105263158
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 7,
"text_length": 1021
}
],
"start_page": 1
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "financial_statement",
"end_page": 32,
"pages": [
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a profit and loss statement for a company (Purpose2 Property Ltd) for the year ending 31 August 2024. It includes financial data such as turnover, cost of sales, administrative costs, and profit before and after taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss 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-DZU0JCqyap7ukC8PFlZAxYcCvPGw9\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is a profit and loss statement for a company (Purpose2 Property Ltd) for the year ending 31 August 2024. It includes financial data such as turnover, cost of sales, administrative costs, and profit before and after taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349187, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=232, prompt_tokens=1546, total_tokens=1778, 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": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is a profit and loss statement for a company (Purpose2 Property Ltd) for the year ending 31 August 2024. It includes financial data such as turnover, cost of sales, administrative costs, and profit before and after taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a profit and loss statement for a company (Purpose2 Property Ltd) for the year ending 31 August 2024. It includes financial data such as turnover, cost of sales, administrative costs, and profit before and after taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.12378947368421052,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.1,
"total_score": 0.12378947368421052
},
"hp_agreement": {
"keyword_score": 0.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.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.06
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 31,
"text_length": 1448
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains detailed financial information such as fixed assets, current assets, creditors, net assets, and capital reserves. These are key components of a financial statement, specifically a balance sheet. There are no indicators of transactions, invoices, payroll, loans, mortgages, 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-DZU0L0oQt90g2rxUFinHgTe77jq6u\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Balance Sheet\\\u0027 and contains detailed financial information such as fixed assets, current assets, creditors, net assets, and capital reserves. These are key components of a financial statement, specifically a balance sheet. There are no indicators of transactions, invoices, payroll, loans, mortgages, 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349189, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=231, prompt_tokens=1654, total_tokens=1885, completion_tokens_details=CompletionTokensDetails(accepted_predict"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Balance Sheet\u0027 and contains detailed financial information such as fixed assets, current assets, creditors, net assets, and capital reserves. These are key components of a financial statement, specifically a balance sheet. There are no indicators of transactions, invoices, payroll, loans, mortgages, or property details, which rules out other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains detailed financial information such as fixed assets, current assets, creditors, net assets, and capital reserves. These are key components of a financial statement, specifically a balance sheet. There are no indicators of transactions, invoices, payroll, loans, mortgages, 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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.3233684210526316,
"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.3157894736842105,
"pattern_score": 0.2,
"total_score": 0.3233684210526316
},
"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.0,
"total_score": 0.06
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.02564102564102564,
"total_score": 0.06730769230769232
}
},
"type": "financial_statement"
}
},
"page_number": 32,
"text_length": 1791
}
],
"start_page": 31
},
{
"avg_confidence": 0.95,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "corporation_tax",
"end_page": 34,
"pages": [
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Corporation Tax Return (CT600), a UTR (Unique Taxpayer Reference) number, and mentions \u0027Corporation Tax\u0027 explicitly in the document text. Additionally, the document includes references to financial statements such as \u0027Profit and Loss\u0027 and \u0027Balance Sheet,\u0027 which are typically part of a corporation tax filing.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-DZU0MX5Qbcl5GOeB35LKfzbZgwUNY\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a Corporation Tax Return (CT600), a UTR (Unique Taxpayer Reference) number, and mentions \\\u0027Corporation Tax\\\u0027 explicitly in the document text. Additionally, the document includes references to financial statements such as \\\u0027Profit and Loss\\\u0027 and \\\u0027Balance Sheet,\\\u0027 which are typically part of a corporation tax filing.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349190, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=231, prompt_tokens=2042, total_tokens=2273, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to a Corporation Tax Return (CT600), a UTR (Unique Taxpayer Reference) number, and mentions \u0027Corporation Tax\u0027 explicitly in the document text. Additionally, the document includes references to financial statements such as \u0027Profit and Loss\u0027 and \u0027Balance Sheet,\u0027 which are typically part of a corporation tax filing.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Corporation Tax Return (CT600), a UTR (Unique Taxpayer Reference) number, and mentions \u0027Corporation Tax\u0027 explicitly in the document text. Additionally, the document includes references to financial statements such as \u0027Profit and Loss\u0027 and \u0027Balance Sheet,\u0027 which are typically part of a corporation tax filing.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.030303030303030304,
"total_score": 0.021818181818181823
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 33,
"text_length": 3223
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Return\u0027, \u0027CT600\u0027, and \u0027Profit and Loss\u0027 as well as \u0027Balance Sheet\u0027, which are key indicators of a corporation tax document. Additionally, the document mentions \u0027Purpose2Property VT Micro Accounts 2024\u0027, which aligns with financial reporting for corporate tax purposes.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-DZU0O5JvfgbaJ5nkYvbw4VQYNowib\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to \\\u0027Corporation Tax Return\\\u0027, \\\u0027CT600\\\u0027, and \\\u0027Profit and Loss\\\u0027 as well as \\\u0027Balance Sheet\\\u0027, which are key indicators of a corporation tax document. Additionally, the document mentions \\\u0027Purpose2Property VT Micro Accounts 2024\\\u0027, which aligns with financial reporting for corporate tax purposes.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349192, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=228, prompt_tokens=2144, total_tokens=2372, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rej"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to \u0027Corporation Tax Return\u0027, \u0027CT600\u0027, and \u0027Profit and Loss\u0027 as well as \u0027Balance Sheet\u0027, which are key indicators of a corporation tax document. Additionally, the document mentions \u0027Purpose2Property VT Micro Accounts 2024\u0027, which aligns with financial reporting for corporate tax purposes.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Return\u0027, \u0027CT600\u0027, and \u0027Profit and Loss\u0027 as well as \u0027Balance Sheet\u0027, which are key indicators of a corporation tax document. Additionally, the document mentions \u0027Purpose2Property VT Micro Accounts 2024\u0027, which aligns with financial reporting for corporate tax purposes.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 34,
"text_length": 5156
}
],
"start_page": 33
},
{
"avg_confidence": 0.9,
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"document_type": "financial_statement",
"end_page": 35,
"pages": [
{
"confidence_score": 0.9,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document references a \u0027Balance Sheet\u0027 in its name (\u0027Purpose2Property_Ltd_-_Balance_Sheet.pdf\u0027), which is a key indicator of a financial statement. Additionally, there are no indicators of transactions, invoices, payroll, loans, or other specific document types in the provided 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-DZU0PqnJT93yPlrv3MgGQBDjM6M8F\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document references a \\\u0027Balance Sheet\\\u0027 in its name (\\\u0027Purpose2Property_Ltd_-_Balance_Sheet.pdf\\\u0027), which is a key indicator of a financial statement. Additionally, there are no indicators of transactions, invoices, payroll, loans, or other specific document types in the provided 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349193, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=221, prompt_tokens=1893, total_tokens=2114, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document references a \u0027Balance Sheet\u0027 in its name (\u0027Purpose2Property_Ltd_-_Balance_Sheet.pdf\u0027), which is a key indicator of a financial statement. Additionally, there are no indicators of transactions, invoices, payroll, loans, or other specific document types in the provided text.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document references a \u0027Balance Sheet\u0027 in its name (\u0027Purpose2Property_Ltd_-_Balance_Sheet.pdf\u0027), which is a key indicator of a financial statement. Additionally, there are no indicators of transactions, invoices, payroll, loans, or other specific document types in the provided 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": "financial_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03529411764705882,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 35,
"text_length": 2279
}
],
"start_page": 35
}
],
"page_classifications": [
{
"confidence_score": 0.9,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains the title \u0027Micro Entity Accounts\u0027 and references a company name and a specific date, which are key indicators of a financial statement. There is no mention of transactions, invoices, loans, mortgages, or other specific financial products, 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-DZTzcq3gnz88M1ZwcZ77k3LbigFcv\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document contains the title \\\u0027Micro Entity Accounts\\\u0027 and references a company name and a specific date, which are key indicators of a financial statement. There is no mention of transactions, invoices, loans, mortgages, or other specific financial products, 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349144, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=217, prompt_tokens=1039, total_tokens=1256, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prom"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": 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 the title \u0027Micro Entity Accounts\u0027 and references a company name and a specific date, which are key indicators of a financial statement. There is no mention of transactions, invoices, loans, mortgages, or other specific financial products, which rules out other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document contains the title \u0027Micro Entity Accounts\u0027 and references a company name and a specific date, which are key indicators of a financial statement. There is no mention of transactions, invoices, loans, mortgages, or other specific financial products, 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": "financial_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 1,
"text_length": 148
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains financial information such as fixed assets, current assets, liabilities, capital, and reserves. It also references compliance with the Companies Act 2006 and FRS 105, which are specific to financial reporting. These are key indicators of a financial statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTzeFqzq8oJeYrFdW3p1QKI01w2b\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Balance Sheet\\\u0027 and contains financial information such as fixed assets, current assets, liabilities, capital, and reserves. It also references compliance with the Companies Act 2006 and FRS 105, which are specific to financial reporting. These are key indicators of a financial statement.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349146, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=223, prompt_tokens=1463, total_tokens=1686, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predict"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Balance Sheet\u0027 and contains financial information such as fixed assets, current assets, liabilities, capital, and reserves. It also references compliance with the Companies Act 2006 and FRS 105, which are specific to financial reporting. These are key indicators of a financial statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains financial information such as fixed assets, current assets, liabilities, capital, and reserves. It also references compliance with the Companies Act 2006 and FRS 105, which are specific to financial reporting. These are key indicators of a financial statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.3713684210526315,
"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.3157894736842105,
"pattern_score": 0.3,
"total_score": 0.3713684210526315
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 2,
"text_length": 1807
},
{
"confidence_score": 0.85,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.85,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document mentions \u0027Accounts\u0027 and a specific date (\u002731 August 2024\u0027), which are key indicators of a financial statement. Additionally, the document references a registered company (\u0027PURPOSE2PROPERTY LIMITED\u0027) and its registered number (\u002711510774\u0027), which are typical elements of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the 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-DZTzfzNQdWd00IdGrOUfZKgPiw9iE\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.85,\\n \"reasoning\": \"The document mentions \\\u0027Accounts\\\u0027 and a specific date (\\\u002731 August 2024\\\u0027), which are key indicators of a financial statement. Additionally, the document references a registered company (\\\u0027PURPOSE2PROPERTY LIMITED\\\u0027) and its registered number (\\\u002711510774\\\u0027), which are typical elements of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349147, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=239, prompt_tokens=1037, total_tokens=1276, completion_tokens_details=Completion"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document mentions \u0027Accounts\u0027 and a specific date (\u002731 August 2024\u0027), which are key indicators of a financial statement. Additionally, the document references a registered company (\u0027PURPOSE2PROPERTY LIMITED\u0027) and its registered number (\u002711510774\u0027), which are typical elements of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.85,\n \"reasoning\": \"The document mentions \u0027Accounts\u0027 and a specific date (\u002731 August 2024\u0027), which are key indicators of a financial statement. Additionally, the document references a registered company (\u0027PURPOSE2PROPERTY LIMITED\u0027) and its registered number (\u002711510774\u0027), which are typical elements of financial statements. There is no mention of transactions, loans, mortgages, or other indicators of the 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": "financial_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 3,
"text_length": 135
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Profit and Loss Account, Balance Sheet, and the preparation of accounts, which are key components of financial statements. Additionally, it mentions compliance with the Companies Act 2006 and the responsibility for preparing accounts that give a true and fair view of the company\u0027s financial state, further indicating it is a financial statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTzhYiK3dRaleyrfaBI6qkon7d5V\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a Profit and Loss Account, Balance Sheet, and the preparation of accounts, which are key components of financial statements. Additionally, it mentions compliance with the Companies Act 2006 and the responsibility for preparing accounts that give a true and fair view of the company\\\u0027s financial state, further indicating it is a financial statement.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349149, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=230, prompt_tokens=1247, total_tokens=1477, completion_tokens_details=CompletionTokensDetails(accepted_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 references to a Profit and Loss Account, Balance Sheet, and the preparation of accounts, which are key components of financial statements. Additionally, it mentions compliance with the Companies Act 2006 and the responsibility for preparing accounts that give a true and fair view of the company\u0027s financial state, further indicating it is a financial statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Profit and Loss Account, Balance Sheet, and the preparation of accounts, which are key components of financial statements. Additionally, it mentions compliance with the Companies Act 2006 and the responsibility for preparing accounts that give a true and fair view of the company\u0027s financial state, further indicating it is a financial statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.13389473684210526,
"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.05263157894736842,
"pattern_score": 0.2,
"total_score": 0.13389473684210526
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 4,
"text_length": 1151
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Profit and Loss Account\u0027 and includes financial metrics such as turnover, staff costs, depreciation, other charges, and profit before taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss account. There are no indicators of transactions, balances, or other details that would classify it as a bank statement, credit card statement, invoice, or 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-DZTzi4VgLF6FoMKIiItVBqOmyt6qv\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Profit and Loss Account\\\u0027 and includes financial metrics such as turnover, staff costs, depreciation, other charges, and profit before taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss account. There are no indicators of transactions, balances, or other details that would classify it as a bank statement, credit card statement, invoice, or 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349150, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=243, prompt_tokens=1121, total_tokens=1364, c"
},
"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 \u0027Profit and Loss Account\u0027 and includes financial metrics such as turnover, staff costs, depreciation, other charges, and profit before taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss account. There are no indicators of transactions, balances, or other details that would classify it as a bank statement, credit card statement, invoice, or other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Profit and Loss Account\u0027 and includes financial metrics such as turnover, staff costs, depreciation, other charges, and profit before taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss account. There are no indicators of transactions, balances, or other details that would classify it as a bank statement, credit card statement, invoice, or 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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.12378947368421052,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.1,
"total_score": 0.12378947368421052
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 5,
"text_length": 353
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a balance sheet, which is a key component of financial statements. It includes details about fixed assets, current assets, liabilities, and capital reserves. Additionally, it mentions compliance with the Companies Act 2006 and FRS 105, which are relevant to financial reporting. There are no indicators of transactions, invoices, payroll, loans, or property-related details that would classify it under 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-DZTzjKVsqsZqVRNPD9XxMh3baJU2y\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is a balance sheet, which is a key component of financial statements. It includes details about fixed assets, current assets, liabilities, and capital reserves. Additionally, it mentions compliance with the Companies Act 2006 and FRS 105, which are relevant to financial reporting. There are no indicators of transactions, invoices, payroll, loans, or property-related details that would classify it under 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349151, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=244, prompt_tokens=1461, total_tokens=1705, completion_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is a balance sheet, which is a key component of financial statements. It includes details about fixed assets, current assets, liabilities, and capital reserves. Additionally, it mentions compliance with the Companies Act 2006 and FRS 105, which are relevant to financial reporting. There are no indicators of transactions, invoices, payroll, loans, or property-related details that would classify it under other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a balance sheet, which is a key component of financial statements. It includes details about fixed assets, current assets, liabilities, and capital reserves. Additionally, it mentions compliance with the Companies Act 2006 and FRS 105, which are relevant to financial reporting. There are no indicators of transactions, invoices, payroll, loans, or property-related details that would classify it under 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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.3713684210526315,
"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.3157894736842105,
"pattern_score": 0.3,
"total_score": 0.3713684210526315
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 6,
"text_length": 1807
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed profit and loss account with line items such as sales, staff costs, depreciation, premises costs, administrative expenses, legal and professional costs, and interest payable. These are key indicators of a financial statement, specifically a profit and loss account. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific details, payroll information, or property-related data.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-DZTzljQhowJ6vVkxGrLwHQsF9jGZW\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains a detailed profit and loss account with line items such as sales, staff costs, depreciation, premises costs, administrative expenses, legal and professional costs, and interest payable. These are key indicators of a financial statement, specifically a profit and loss account. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific details, payroll information, or property-related data.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349153, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsa"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains a detailed profit and loss account with line items such as sales, staff costs, depreciation, premises costs, administrative expenses, legal and professional costs, and interest payable. These are key indicators of a financial statement, specifically a profit and loss account. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific details, payroll information, or property-related data.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains a detailed profit and loss account with line items such as sales, staff costs, depreciation, premises costs, administrative expenses, legal and professional costs, and interest payable. These are key indicators of a financial statement, specifically a profit and loss account. There are no indicators of transactions, balances, or account numbers (bank_statement, credit_card, loan_statement, etc.), nor are there any invoice-specific details, payroll information, or property-related data.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.1616842105263158,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.15789473684210525,
"pattern_score": 0.1,
"total_score": 0.1616842105263158
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 7,
"text_length": 1021
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return for Period ending 31/08/2024\u0027 and references HM Revenue \u0026 Customs, tax return entries, and the need to file the return with HMRC. These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTzm65kFuHAbKn9JnZDRKrlWMJdY\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Corporation Tax Return for Period ending 31/08/2024\\\u0027 and references HM Revenue \u0026 Customs, tax return entries, and the need to file the return with HMRC. These are clear indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349154, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=216, prompt_tokens=1296, total_tokens=1512, 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,"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document explicitly mentions \u0027Corporation Tax Return for Period ending 31/08/2024\u0027 and references HM Revenue \u0026 Customs, tax return entries, and the need to file the return with HMRC. These are clear indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return for Period ending 31/08/2024\u0027 and references HM Revenue \u0026 Customs, tax return entries, and the need to file the return with HMRC. These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.22305882352941178,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.2,
"total_score": 0.22305882352941178
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.1,
"total_score": 0.08589473684210526
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.041666666666666664,
"pattern_score": 0.0,
"total_score": 0.045
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 8,
"text_length": 1206
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Adjustment of Profits Computation,\u0027 \u0027Turnover from Trade or Profession,\u0027 \u0027Profit Per Accounts,\u0027 and \u0027Adjusted Trading Profits,\u0027 which are key indicators of a corporation tax document. Additionally, the presence of a UTR (Unique Taxpayer Reference) and the mention of a specific tax period (01/09/2023 to 31/08/2024) further confirm this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTznOLoM2kfMFIRJLxpZPXm3AxgR\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to \\\u0027Adjustment of Profits Computation,\\\u0027 \\\u0027Turnover from Trade or Profession,\\\u0027 \\\u0027Profit Per Accounts,\\\u0027 and \\\u0027Adjusted Trading Profits,\\\u0027 which are key indicators of a corporation tax document. Additionally, the presence of a UTR (Unique Taxpayer Reference) and the mention of a specific tax period (01/09/2023 to 31/08/2024) further confirm this classification.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349155, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=249, prompt_tokens=1136, total_tokens=1385, completion_tokens_details=CompletionTokensDetails(acce"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to \u0027Adjustment of Profits Computation,\u0027 \u0027Turnover from Trade or Profession,\u0027 \u0027Profit Per Accounts,\u0027 and \u0027Adjusted Trading Profits,\u0027 which are key indicators of a corporation tax document. Additionally, the presence of a UTR (Unique Taxpayer Reference) and the mention of a specific tax period (01/09/2023 to 31/08/2024) further confirm this classification.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Adjustment of Profits Computation,\u0027 \u0027Turnover from Trade or Profession,\u0027 \u0027Profit Per Accounts,\u0027 and \u0027Adjusted Trading Profits,\u0027 which are key indicators of a corporation tax document. Additionally, the presence of a UTR (Unique Taxpayer Reference) and the mention of a specific tax period (01/09/2023 to 31/08/2024) further confirm this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 9,
"text_length": 420
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Calculation,\u0027 \u0027Profits Chargeable to Corporation Tax,\u0027 \u0027Group Relief,\u0027 and \u0027Losses/Deficits used in this Computation,\u0027 which are key indicators of a corporation tax document. Additionally, the document mentions a specific period (01/09/2023 to 31/08/2024), which aligns with tax reporting periods.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-DZTzpB41OH2o42SNlqx0Ax2QeVlIK\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to \\\u0027Corporation Tax Calculation,\\\u0027 \\\u0027Profits Chargeable to Corporation Tax,\\\u0027 \\\u0027Group Relief,\\\u0027 and \\\u0027Losses/Deficits used in this Computation,\\\u0027 which are key indicators of a corporation tax document. Additionally, the document mentions a specific period (01/09/2023 to 31/08/2024), which aligns with tax reporting periods.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349157, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=242, prompt_tokens=1353, total_tokens=1595, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to \u0027Corporation Tax Calculation,\u0027 \u0027Profits Chargeable to Corporation Tax,\u0027 \u0027Group Relief,\u0027 and \u0027Losses/Deficits used in this Computation,\u0027 which are key indicators of a corporation tax document. Additionally, the document mentions a specific period (01/09/2023 to 31/08/2024), which aligns with tax reporting periods.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Calculation,\u0027 \u0027Profits Chargeable to Corporation Tax,\u0027 \u0027Group Relief,\u0027 and \u0027Losses/Deficits used in this Computation,\u0027 which are key indicators of a corporation tax document. Additionally, the document mentions a specific period (01/09/2023 to 31/08/2024), which aligns with tax reporting periods.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.0757894736842105,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.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.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 10,
"text_length": 1190
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to corporation tax, including terms like \u0027Corporation Tax Payable,\u0027 \u0027Rate of tax,\u0027 \u0027Marginal relief,\u0027 \u0027Corporation Tax Chargeable,\u0027 and \u0027CT600.\u0027 Additionally, it includes details about tax years, losses, and group relief, which are specific to corporation tax computations. The presence of a UTR (Unique Taxpayer Reference) and references to HMRC-related terms further confirm this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTzqvXg1XwBISJZyBgeVu5bca4Wp\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to corporation tax, including terms like \\\u0027Corporation Tax Payable,\\\u0027 \\\u0027Rate of tax,\\\u0027 \\\u0027Marginal relief,\\\u0027 \\\u0027Corporation Tax Chargeable,\\\u0027 and \\\u0027CT600.\\\u0027 Additionally, it includes details about tax years, losses, and group relief, which are specific to corporation tax computations. The presence of a UTR (Unique Taxpayer Reference) and references to HMRC-related terms further confirm this classification.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349158, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=251, prompt_tokens=1359, total_tokens=1610, 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 corporation tax, including terms like \u0027Corporation Tax Payable,\u0027 \u0027Rate of tax,\u0027 \u0027Marginal relief,\u0027 \u0027Corporation Tax Chargeable,\u0027 and \u0027CT600.\u0027 Additionally, it includes details about tax years, losses, and group relief, which are specific to corporation tax computations. The presence of a UTR (Unique Taxpayer Reference) and references to HMRC-related terms further confirm this classification.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to corporation tax, including terms like \u0027Corporation Tax Payable,\u0027 \u0027Rate of tax,\u0027 \u0027Marginal relief,\u0027 \u0027Corporation Tax Chargeable,\u0027 and \u0027CT600.\u0027 Additionally, it includes details about tax years, losses, and group relief, which are specific to corporation tax computations. The presence of a UTR (Unique Taxpayer Reference) and references to HMRC-related terms further confirm this classification.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.13270588235294117,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.1,
"total_score": 0.13270588235294117
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.030303030303030304,
"total_score": 0.03681818181818182
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 11,
"text_length": 1022
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax, such as \u0027Qualifying profits: Post 1 April 2017 profits chargeable to corporation tax,\u0027 \u0027Deductions allowance,\u0027 and \u0027Calculation of Brought Forward Losses Restriction.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) and mentions a specific tax period (\u0027For period 01/09/2023 to 31/08/2024\u0027), which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/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-DZTzsj4tZ9mofkRQz16GIBixi69IB\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to corporation tax, such as \\\u0027Qualifying profits: Post 1 April 2017 profits chargeable to corporation tax,\\\u0027 \\\u0027Deductions allowance,\\\u0027 and \\\u0027Calculation of Brought Forward Losses Restriction.\\\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) and mentions a specific tax period (\\\u0027For period 01/09/2023 to 31/08/2024\\\u0027), which are key indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01/09/2023 to 31/08/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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349160, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=273, prompt_tokens=1309, total_tokens=1582, completi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01/09/2023 to 31/08/2024",
"total_amount": null
},
"llm_reasoning": "The document contains references to corporation tax, such as \u0027Qualifying profits: Post 1 April 2017 profits chargeable to corporation tax,\u0027 \u0027Deductions allowance,\u0027 and \u0027Calculation of Brought Forward Losses Restriction.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) and mentions a specific tax period (\u0027For period 01/09/2023 to 31/08/2024\u0027), which are key indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax, such as \u0027Qualifying profits: Post 1 April 2017 profits chargeable to corporation tax,\u0027 \u0027Deductions allowance,\u0027 and \u0027Calculation of Brought Forward Losses Restriction.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) and mentions a specific tax period (\u0027For period 01/09/2023 to 31/08/2024\u0027), which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.13270588235294117,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.1,
"total_score": 0.13270588235294117
},
"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.125,
"total_score": 0.11666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.030303030303030304,
"total_score": 0.021818181818181823
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 12,
"text_length": 904
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a UTR (Unique Taxpayer Reference), an IRmark, and a Capital Allowances Summary, which are key indicators of a corporation tax document. Additionally, it includes details about allowances, pools, and tax-related terms such as \u0027AIA Claimed,\u0027 \u0027WDA Claimed,\u0027 and \u0027Balancing Allowance,\u0027 which are specific to corporation tax computations.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/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-DZTzupTeBh7KcfK8h3mxtMyHUonzA\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a UTR (Unique Taxpayer Reference), an IRmark, and a Capital Allowances Summary, which are key indicators of a corporation tax document. Additionally, it includes details about allowances, pools, and tax-related terms such as \\\u0027AIA Claimed,\\\u0027 \\\u0027WDA Claimed,\\\u0027 and \\\u0027Balancing Allowance,\\\u0027 which are specific to corporation tax computations.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01/09/2023 to 31/08/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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349162, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=256, prompt_tokens=1187, total_tokens=1443, completion_tokens_details=CompletionTokensDetails(acc"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01/09/2023 to 31/08/2024",
"total_amount": null
},
"llm_reasoning": "The document contains references to a UTR (Unique Taxpayer Reference), an IRmark, and a Capital Allowances Summary, which are key indicators of a corporation tax document. Additionally, it includes details about allowances, pools, and tax-related terms such as \u0027AIA Claimed,\u0027 \u0027WDA Claimed,\u0027 and \u0027Balancing Allowance,\u0027 which are specific to corporation tax computations.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a UTR (Unique Taxpayer Reference), an IRmark, and a Capital Allowances Summary, which are key indicators of a corporation tax document. Additionally, it includes details about allowances, pools, and tax-related terms such as \u0027AIA Claimed,\u0027 \u0027WDA Claimed,\u0027 and \u0027Balancing Allowance,\u0027 which are specific to corporation tax computations.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.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.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 13,
"text_length": 550
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return (Small)\u0027 and includes details such as UTR (Unique Taxpayer Reference), IRmark, and accounting period. It also contains sections related to capital allowances, plant and machinery, and tax computations, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTzv6OzJT1fTuCV7hGxLi2XUHZYj\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Corporation Tax Return (Small)\\\u0027 and includes details such as UTR (Unique Taxpayer Reference), IRmark, and accounting period. It also contains sections related to capital allowances, plant and machinery, and tax computations, which are key indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349163, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=223, prompt_tokens=1400, total_tokens=1623, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_predictio"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document explicitly mentions \u0027Corporation Tax Return (Small)\u0027 and includes details such as UTR (Unique Taxpayer Reference), IRmark, and accounting period. It also contains sections related to capital allowances, plant and machinery, and tax computations, which are key indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return (Small)\u0027 and includes details such as UTR (Unique Taxpayer Reference), IRmark, and accounting period. It also contains sections related to capital allowances, plant and machinery, and tax computations, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.31341176470588233,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.3,
"total_score": 0.31341176470588233
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 14,
"text_length": 947
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return (Small)\u0027 and includes details such as UTR (Unique Taxpayer Reference), accounting period, and capital allowances, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTzwrD4UDxLtTZc3qIzvXoWVscP0\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Corporation Tax Return (Small)\\\u0027 and includes details such as UTR (Unique Taxpayer Reference), accounting period, and capital allowances, which are key indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349164, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=206, prompt_tokens=1184, total_tokens=1390, 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))"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document explicitly mentions \u0027Corporation Tax Return (Small)\u0027 and includes details such as UTR (Unique Taxpayer Reference), accounting period, and capital allowances, which are key indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return (Small)\u0027 and includes details such as UTR (Unique Taxpayer Reference), accounting period, and capital allowances, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.31341176470588233,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.3,
"total_score": 0.31341176470588233
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 15,
"text_length": 526
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return (Small)\u0027 and includes terms such as \u0027Accounting Period,\u0027 \u0027UTR,\u0027 and \u0027Capital Allowances,\u0027 which are key indicators of a corporation tax document. Additionally, it references a UTR (Unique Taxpayer Reference) and is prepared by a business adviser, further confirming its classification as a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZTzyezBNe2o6itLhsCyhD2R1siRi\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Corporation Tax Return (Small)\\\u0027 and includes terms such as \\\u0027Accounting Period,\\\u0027 \\\u0027UTR,\\\u0027 and \\\u0027Capital Allowances,\\\u0027 which are key indicators of a corporation tax document. Additionally, it references a UTR (Unique Taxpayer Reference) and is prepared by a business adviser, further confirming its classification as a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349166, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=236, prompt_tokens=1286, total_tokens=1522, completion_tokens_details=CompletionTokensDetails(accepted_prediction_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document explicitly mentions \u0027Corporation Tax Return (Small)\u0027 and includes terms such as \u0027Accounting Period,\u0027 \u0027UTR,\u0027 and \u0027Capital Allowances,\u0027 which are key indicators of a corporation tax document. Additionally, it references a UTR (Unique Taxpayer Reference) and is prepared by a business adviser, further confirming its classification as a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return (Small)\u0027 and includes terms such as \u0027Accounting Period,\u0027 \u0027UTR,\u0027 and \u0027Capital Allowances,\u0027 which are key indicators of a corporation tax document. Additionally, it references a UTR (Unique Taxpayer Reference) and is prepared by a business adviser, further confirming its classification as a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.31341176470588233,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.3,
"total_score": 0.31341176470588233
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 16,
"text_length": 734
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a UTR (Unique Taxpayer Reference), income from UK land and buildings, profit chargeable to tax, and other tax-related terms such as \u0027capital allowances\u0027 and \u0027other deductions.\u0027 These are key indicators of a corporation tax document, specifically a tax computation or return.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-DZTzzX5iVtTzjEcYyJUIKy9pCtS2b\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a UTR (Unique Taxpayer Reference), income from UK land and buildings, profit chargeable to tax, and other tax-related terms such as \\\u0027capital allowances\\\u0027 and \\\u0027other deductions.\\\u0027 These are key indicators of a corporation tax document, specifically a tax computation or return.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349167, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=224, prompt_tokens=1346, total_tokens=1570, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to a UTR (Unique Taxpayer Reference), income from UK land and buildings, profit chargeable to tax, and other tax-related terms such as \u0027capital allowances\u0027 and \u0027other deductions.\u0027 These are key indicators of a corporation tax document, specifically a tax computation or return.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a UTR (Unique Taxpayer Reference), income from UK land and buildings, profit chargeable to tax, and other tax-related terms such as \u0027capital allowances\u0027 and \u0027other deductions.\u0027 These are key indicators of a corporation tax document, specifically a tax computation or return.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.09999999999999999,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.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.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.047619047619047616,
"total_score": 0.05573934837092731
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 17,
"text_length": 1041
},
{
"confidence_score": 0.98,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.98,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.98,\n \"reasoning\": \"The document is identified as a Company Tax Return (CT600) for HMRC, which is explicitly mentioned in the text. It includes references to corporation tax, tax return periods, tax reference numbers, and other details specific to corporation tax filings. These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZU00Ie4pVc9kUmrCSSbrUdDtRbPF\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.98,\\n \"reasoning\": \"The document is identified as a Company Tax Return (CT600) for HMRC, which is explicitly mentioned in the text. It includes references to corporation tax, tax return periods, tax reference numbers, and other details specific to corporation tax filings. These are clear indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349168, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=222, prompt_tokens=1462, total_tokens=1684, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_token"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is identified as a Company Tax Return (CT600) for HMRC, which is explicitly mentioned in the text. It includes references to corporation tax, tax return periods, tax reference numbers, and other details specific to corporation tax filings. These are clear indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.98,\n \"reasoning\": \"The document is identified as a Company Tax Return (CT600) for HMRC, which is explicitly mentioned in the text. It includes references to corporation tax, tax return periods, tax reference numbers, and other details specific to corporation tax filings. These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.403764705882353,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.29411764705882354,
"pattern_score": 0.4,
"total_score": 0.403764705882353
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.0,
"total_score": 0.0757894736842105
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 18,
"text_length": 1788
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to CT600 forms, which are specific to corporation tax returns in the UK. It also includes details such as UTR (Unique Taxpayer Reference), IRmark, and tax-related calculations like turnover and trading profits, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZU02VWT5h2iFLm1nb3MsckDnR9lO\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to CT600 forms, which are specific to corporation tax returns in the UK. It also includes details such as UTR (Unique Taxpayer Reference), IRmark, and tax-related calculations like turnover and trading profits, which are key indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349170, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=222, prompt_tokens=1458, total_tokens=1680, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to CT600 forms, which are specific to corporation tax returns in the UK. It also includes details such as UTR (Unique Taxpayer Reference), IRmark, and tax-related calculations like turnover and trading profits, which are key indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to CT600 forms, which are specific to corporation tax returns in the UK. It also includes details such as UTR (Unique Taxpayer Reference), IRmark, and tax-related calculations like turnover and trading profits, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.22305882352941178,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.2,
"total_score": 0.22305882352941178
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.02631578947368421,
"pattern_score": 0.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 19,
"text_length": 1814
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027Corporation Tax,\u0027 \u0027Income from a property business,\u0027 \u0027Chargeable gains,\u0027 \u0027Profits before deductions and reliefs,\u0027 and \u0027Deductions and reliefs.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and mentions a specific accounting period, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/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-DZU03C7PletWO0NacqhYRyZcYaGzj\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \\\u0027Corporation Tax,\\\u0027 \\\u0027Income from a property business,\\\u0027 \\\u0027Chargeable gains,\\\u0027 \\\u0027Profits before deductions and reliefs,\\\u0027 and \\\u0027Deductions and reliefs.\\\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and mentions a specific accounting period, which are key indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01/09/2023 to 31/08/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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349171, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=255, prompt_tokens=1362, total_tokens=1617, completion_tokens_details=Completi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01/09/2023 to 31/08/2024",
"total_amount": null
},
"llm_reasoning": "The document contains references to corporation tax-related terms such as \u0027Corporation Tax,\u0027 \u0027Income from a property business,\u0027 \u0027Chargeable gains,\u0027 \u0027Profits before deductions and reliefs,\u0027 and \u0027Deductions and reliefs.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and mentions a specific accounting period, which are key indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027Corporation Tax,\u0027 \u0027Income from a property business,\u0027 \u0027Chargeable gains,\u0027 \u0027Profits before deductions and reliefs,\u0027 and \u0027Deductions and reliefs.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and mentions a specific accounting period, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.21741176470588236,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.1,
"total_score": 0.21741176470588236
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.21052631578947367,
"pattern_score": 0.0,
"total_score": 0.151578947368421
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 20,
"text_length": 1479
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027Corporation Tax\u0027, \u0027Profits chargeable to Corporation Tax\u0027, \u0027Group relief\u0027, \u0027Qualifying donations\u0027, and \u0027Tax calculation\u0027. Additionally, it includes specific tax-related boxes and calculations, as well as a UTR (Unique Taxpayer Reference) number, which is a key indicator of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZU05YPn29jfhqfKFXphoL6n6SQbZ\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \\\u0027Corporation Tax\\\u0027, \\\u0027Profits chargeable to Corporation Tax\\\u0027, \\\u0027Group relief\\\u0027, \\\u0027Qualifying donations\\\u0027, and \\\u0027Tax calculation\\\u0027. Additionally, it includes specific tax-related boxes and calculations, as well as a UTR (Unique Taxpayer Reference) number, which is a key indicator of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349173, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=239, prompt_tokens=1426, total_tokens=1665, completion_tokens_details=CompletionTokensDetails(accepted_predi"
},
"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 corporation tax-related terms such as \u0027Corporation Tax\u0027, \u0027Profits chargeable to Corporation Tax\u0027, \u0027Group relief\u0027, \u0027Qualifying donations\u0027, and \u0027Tax calculation\u0027. Additionally, it includes specific tax-related boxes and calculations, as well as a UTR (Unique Taxpayer Reference) number, which is a key indicator of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027Corporation Tax\u0027, \u0027Profits chargeable to Corporation Tax\u0027, \u0027Group relief\u0027, \u0027Qualifying donations\u0027, and \u0027Tax calculation\u0027. Additionally, it includes specific tax-related boxes and calculations, as well as a UTR (Unique Taxpayer Reference) number, which is a key indicator of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.17505882352941174,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.1,
"total_score": 0.17505882352941174
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.15789473684210525,
"pattern_score": 0.0,
"total_score": 0.11368421052631578
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.125,
"total_score": 0.11666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.047368421052631574
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.030303030303030304,
"total_score": 0.05181818181818182
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 21,
"text_length": 1564
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to Corporation Tax, including terms like \u0027Corporation Tax chargeable,\u0027 \u0027Marginal relief,\u0027 \u0027Double Taxation Relief,\u0027 \u0027CT600,\u0027 and \u0027Tax calculation.\u0027 Additionally, it includes specific tax-related boxes and calculations, as well as a reference to a tax period (01/09/2023 to 31/08/2024). These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZU062fAW5L3MP9wqYUIl80EDJstI\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to Corporation Tax, including terms like \\\u0027Corporation Tax chargeable,\\\u0027 \\\u0027Marginal relief,\\\u0027 \\\u0027Double Taxation Relief,\\\u0027 \\\u0027CT600,\\\u0027 and \\\u0027Tax calculation.\\\u0027 Additionally, it includes specific tax-related boxes and calculations, as well as a reference to a tax period (01/09/2023 to 31/08/2024). These are clear indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349174, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=249, prompt_tokens=1410, total_tokens=1659, completion_tokens_details=CompletionTokensDetails(accep"
},
"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 Corporation Tax, including terms like \u0027Corporation Tax chargeable,\u0027 \u0027Marginal relief,\u0027 \u0027Double Taxation Relief,\u0027 \u0027CT600,\u0027 and \u0027Tax calculation.\u0027 Additionally, it includes specific tax-related boxes and calculations, as well as a reference to a tax period (01/09/2023 to 31/08/2024). These are clear indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to Corporation Tax, including terms like \u0027Corporation Tax chargeable,\u0027 \u0027Marginal relief,\u0027 \u0027Double Taxation Relief,\u0027 \u0027CT600,\u0027 and \u0027Tax calculation.\u0027 Additionally, it includes specific tax-related boxes and calculations, as well as a reference to a tax period (01/09/2023 to 31/08/2024). These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.17505882352941174,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.1,
"total_score": 0.17505882352941174
},
"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.125,
"total_score": 0.11666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.030303030303030304,
"total_score": 0.05181818181818182
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 22,
"text_length": 1520
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027CFC tax,\u0027 \u0027bank levy,\u0027 \u0027self-assessment of tax payable,\u0027 \u0027Research and Development credit,\u0027 and \u0027CT600-like structure.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and mentions a specific tax period, which are strong indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/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-DZU08otLvNXxnwWR0sFp6LxXryuqw\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \\\u0027CFC tax,\\\u0027 \\\u0027bank levy,\\\u0027 \\\u0027self-assessment of tax payable,\\\u0027 \\\u0027Research and Development credit,\\\u0027 and \\\u0027CT600-like structure.\\\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and mentions a specific tax period, which are strong indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01/09/2023 to 31/08/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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349176, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=250, prompt_tokens=1409, total_tokens=1659, completion_tokens_details=CompletionTokensDetails(accepted_pre"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01/09/2023 to 31/08/2024",
"total_amount": null
},
"llm_reasoning": "The document contains references to corporation tax-related terms such as \u0027CFC tax,\u0027 \u0027bank levy,\u0027 \u0027self-assessment of tax payable,\u0027 \u0027Research and Development credit,\u0027 and \u0027CT600-like structure.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and mentions a specific tax period, which are strong indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027CFC tax,\u0027 \u0027bank levy,\u0027 \u0027self-assessment of tax payable,\u0027 \u0027Research and Development credit,\u0027 and \u0027CT600-like structure.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and mentions a specific tax period, which are strong indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.11666666666666667,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.125,
"total_score": 0.11666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.0,
"total_score": 0.065
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.030303030303030304,
"total_score": 0.03681818181818182
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "invoice"
}
},
"page_number": 23,
"text_length": 1509
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to Corporation Tax terms such as \u0027Corporation Tax\u0027, \u0027CT600\u0027, \u0027tax reconciliation\u0027, \u0027tax credit payable\u0027, \u0027tax outstanding\u0027, and \u0027tax overpaid\u0027. Additionally, it includes specific tax-related boxes and calculations, as well as references to HMRC and group tax refunds, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZU09SNmWsDDKMrd3ae91hRmsJqr6\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to Corporation Tax terms such as \\\u0027Corporation Tax\\\u0027, \\\u0027CT600\\\u0027, \\\u0027tax reconciliation\\\u0027, \\\u0027tax credit payable\\\u0027, \\\u0027tax outstanding\\\u0027, and \\\u0027tax overpaid\\\u0027. Additionally, it includes specific tax-related boxes and calculations, as well as references to HMRC and group tax refunds, which are key indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349177, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=235, prompt_tokens=1473, total_tokens=1708, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, au"
},
"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 Corporation Tax terms such as \u0027Corporation Tax\u0027, \u0027CT600\u0027, \u0027tax reconciliation\u0027, \u0027tax credit payable\u0027, \u0027tax outstanding\u0027, and \u0027tax overpaid\u0027. Additionally, it includes specific tax-related boxes and calculations, as well as references to HMRC and group tax refunds, which are key indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to Corporation Tax terms such as \u0027Corporation Tax\u0027, \u0027CT600\u0027, \u0027tax reconciliation\u0027, \u0027tax credit payable\u0027, \u0027tax outstanding\u0027, and \u0027tax overpaid\u0027. Additionally, it includes specific tax-related boxes and calculations, as well as references to HMRC and group tax refunds, which are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.13270588235294117,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.1,
"total_score": 0.13270588235294117
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.05263157894736842,
"pattern_score": 0.0,
"total_score": 0.03789473684210525
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 24,
"text_length": 1928
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027UTR\u0027, \u0027R\u0026D claim\u0027, \u0027capital allowances\u0027, \u0027trading profits and losses\u0027, and \u0027CT600\u0027. These are key indicators of a corporation tax document. Additionally, the document includes specific tax-related boxes and fields, which are typical of corporation tax returns or related forms.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/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-DZU0BMoKJPF0dPgzrHY8o3W9XS4x0\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \\\u0027UTR\\\u0027, \\\u0027R\u0026D claim\\\u0027, \\\u0027capital allowances\\\u0027, \\\u0027trading profits and losses\\\u0027, and \\\u0027CT600\\\u0027. These are key indicators of a corporation tax document. Additionally, the document includes specific tax-related boxes and fields, which are typical of corporation tax returns or related forms.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01/09/2023 to 31/08/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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349179, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=247, prompt_tokens=1476, total_tokens=1723, completion_tokens_details=CompletionTokensDetails(accepted_predict"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01/09/2023 to 31/08/2024",
"total_amount": null
},
"llm_reasoning": "The document contains references to corporation tax-related terms such as \u0027UTR\u0027, \u0027R\u0026D claim\u0027, \u0027capital allowances\u0027, \u0027trading profits and losses\u0027, and \u0027CT600\u0027. These are key indicators of a corporation tax document. Additionally, the document includes specific tax-related boxes and fields, which are typical of corporation tax returns or related forms.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027UTR\u0027, \u0027R\u0026D claim\u0027, \u0027capital allowances\u0027, \u0027trading profits and losses\u0027, and \u0027CT600\u0027. These are key indicators of a corporation tax document. Additionally, the document includes specific tax-related boxes and fields, which are typical of corporation tax returns or related forms.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.1111111111111111,
"pattern_score": 0.0,
"total_score": 0.06666666666666667
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 25,
"text_length": 1899
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to allowances, charges, and capital allowances, which are key components of corporation tax calculations. Additionally, it mentions a UTR (Unique Taxpayer Reference), which is specific to UK tax documents, and the period for which the calculations apply. These are strong indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/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-DZU0Ch7yT81A2LZjMJHwBUvM6t4wR\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to allowances, charges, and capital allowances, which are key components of corporation tax calculations. Additionally, it mentions a UTR (Unique Taxpayer Reference), which is specific to UK tax documents, and the period for which the calculations apply. These are strong indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01/09/2023 to 31/08/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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349180, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=240, prompt_tokens=1263, total_tokens=1503, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, au"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01/09/2023 to 31/08/2024",
"total_amount": null
},
"llm_reasoning": "The document contains references to allowances, charges, and capital allowances, which are key components of corporation tax calculations. Additionally, it mentions a UTR (Unique Taxpayer Reference), which is specific to UK tax documents, and the period for which the calculations apply. These are strong indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to allowances, charges, and capital allowances, which are key components of corporation tax calculations. Additionally, it mentions a UTR (Unique Taxpayer Reference), which is specific to UK tax documents, and the period for which the calculations apply. These are strong indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 26,
"text_length": 960
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027Qualifying expenditure,\u0027 \u0027Losses, deficits and excess amounts,\u0027 \u0027group relief,\u0027 \u0027UK property business losses,\u0027 \u0027Overseas property business losses,\u0027 and \u0027Management expenses.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and a specific period (01/09/2023 to 31/08/2024), which are common in corporation tax documents like CT600 forms.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-DZU0EoUzdrMzsz1V4aY4JhO4tfXS8\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \\\u0027Qualifying expenditure,\\\u0027 \\\u0027Losses, deficits and excess amounts,\\\u0027 \\\u0027group relief,\\\u0027 \\\u0027UK property business losses,\\\u0027 \\\u0027Overseas property business losses,\\\u0027 and \\\u0027Management expenses.\\\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and a specific period (01/09/2023 to 31/08/2024), which are common in corporation tax documents like CT600 forms.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349182, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=258, prompt_tokens=1304, total_tokens=1562, completi"
},
"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 corporation tax-related terms such as \u0027Qualifying expenditure,\u0027 \u0027Losses, deficits and excess amounts,\u0027 \u0027group relief,\u0027 \u0027UK property business losses,\u0027 \u0027Overseas property business losses,\u0027 and \u0027Management expenses.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and a specific period (01/09/2023 to 31/08/2024), which are common in corporation tax documents like CT600 forms.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to corporation tax-related terms such as \u0027Qualifying expenditure,\u0027 \u0027Losses, deficits and excess amounts,\u0027 \u0027group relief,\u0027 \u0027UK property business losses,\u0027 \u0027Overseas property business losses,\u0027 and \u0027Management expenses.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number and a specific period (01/09/2023 to 31/08/2024), which are common in corporation tax documents like CT600 forms.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.11368421052631578,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.15789473684210525,
"pattern_score": 0.0,
"total_score": 0.11368421052631578
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 27,
"text_length": 1199
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to corporation tax-related terms such as \u0027Corporation Tax,\u0027 \u0027Company Tax Return Guide,\u0027 \u0027Repayment of Corporation Tax,\u0027 \u0027Payable Research and Development tax credit,\u0027 and \u0027Payable creatives tax credit.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number, which is specific to tax documents, and mentions a specific tax period (01/09/2023 to 31/08/2024). These are strong indicators that the document is related to corporation tax.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/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-DZU0FAgoNLkX6He65mvwcF2zwmba7\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains multiple references to corporation tax-related terms such as \\\u0027Corporation Tax,\\\u0027 \\\u0027Company Tax Return Guide,\\\u0027 \\\u0027Repayment of Corporation Tax,\\\u0027 \\\u0027Payable Research and Development tax credit,\\\u0027 and \\\u0027Payable creatives tax credit.\\\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number, which is specific to tax documents, and mentions a specific tax period (01/09/2023 to 31/08/2024). These are strong indicators that the document is related to corporation tax.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": \"01/09/2023 to 31/08/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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349183, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=Completi"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": "01/09/2023 to 31/08/2024",
"total_amount": null
},
"llm_reasoning": "The document contains multiple references to corporation tax-related terms such as \u0027Corporation Tax,\u0027 \u0027Company Tax Return Guide,\u0027 \u0027Repayment of Corporation Tax,\u0027 \u0027Payable Research and Development tax credit,\u0027 and \u0027Payable creatives tax credit.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number, which is specific to tax documents, and mentions a specific tax period (01/09/2023 to 31/08/2024). These are strong indicators that the document is related to corporation tax.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains multiple references to corporation tax-related terms such as \u0027Corporation Tax,\u0027 \u0027Company Tax Return Guide,\u0027 \u0027Repayment of Corporation Tax,\u0027 \u0027Payable Research and Development tax credit,\u0027 and \u0027Payable creatives tax credit.\u0027 Additionally, it includes a UTR (Unique Taxpayer Reference) number, which is specific to tax documents, and mentions a specific tax period (01/09/2023 to 31/08/2024). These are strong indicators that the document is related to corporation tax.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": \"01/09/2023 to 31/08/2024\",\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.22305882352941178,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.2,
"total_score": 0.22305882352941178
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.030303030303030304,
"total_score": 0.05181818181818182
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 28,
"text_length": 1531
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Company Tax Return, CT600 Guide, UTR (Unique Taxpayer Reference), and mentions tax-related terms such as \u0027R\u0026D payable credit,\u0027 \u0027repayment,\u0027 and \u0027tax payable.\u0027 These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZU0H1ghEjTbMnvymVEyGwpOWKu8t\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a Company Tax Return, CT600 Guide, UTR (Unique Taxpayer Reference), and mentions tax-related terms such as \\\u0027R\u0026D payable credit,\\\u0027 \\\u0027repayment,\\\u0027 and \\\u0027tax payable.\\\u0027 These are clear indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349185, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=218, prompt_tokens=1389, total_tokens=1607, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(a"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to a Company Tax Return, CT600 Guide, UTR (Unique Taxpayer Reference), and mentions tax-related terms such as \u0027R\u0026D payable credit,\u0027 \u0027repayment,\u0027 and \u0027tax payable.\u0027 These are clear indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Company Tax Return, CT600 Guide, UTR (Unique Taxpayer Reference), and mentions tax-related terms such as \u0027R\u0026D payable credit,\u0027 \u0027repayment,\u0027 and \u0027tax payable.\u0027 These are clear indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.27105882352941174,
"features": {
"bank_statement": {
"keyword_score": 0.11764705882352941,
"pattern_score": 0.0,
"total_score": 0.07058823529411765
},
"corporation_tax": {
"keyword_score": 0.17647058823529413,
"pattern_score": 0.3,
"total_score": 0.27105882352941174
},
"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.0,
"total_score": 0.025263157894736838
},
"nominal_ledger": {
"keyword_score": 0.08333333333333333,
"pattern_score": 0.14285714285714285,
"total_score": 0.1392857142857143
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 29,
"text_length": 1419
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return\u0027 and includes details such as UTR, IRmark, tax payment schedule, and a balancing payment date. These are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```",
"response_repr": "ChatCompletion(id=\u0027chatcmpl-DZU0I04Cb1HAjWqOBOj7TjUO3gJCl\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document explicitly mentions \\\u0027Corporation Tax Return\\\u0027 and includes details such as UTR, IRmark, tax payment schedule, and a balancing payment date. These are key indicators of a corporation tax document.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349186, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=205, prompt_tokens=1176, total_tokens=1381, 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_res"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document explicitly mentions \u0027Corporation Tax Return\u0027 and includes details such as UTR, IRmark, tax payment schedule, and a balancing payment date. These are key indicators of a corporation tax document.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document explicitly mentions \u0027Corporation Tax Return\u0027 and includes details such as UTR, IRmark, tax payment schedule, and a balancing payment date. These are key indicators of a corporation tax document.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.26541176470588235,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.23529411764705882,
"pattern_score": 0.2,
"total_score": 0.26541176470588235
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.030303030303030304,
"total_score": 0.05181818181818182
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 30,
"text_length": 541
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a profit and loss statement for a company (Purpose2 Property Ltd) for the year ending 31 August 2024. It includes financial data such as turnover, cost of sales, administrative costs, and profit before and after taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss 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-DZU0JCqyap7ukC8PFlZAxYcCvPGw9\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is a profit and loss statement for a company (Purpose2 Property Ltd) for the year ending 31 August 2024. It includes financial data such as turnover, cost of sales, administrative costs, and profit before and after taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349187, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=232, prompt_tokens=1546, total_tokens=1778, 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": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is a profit and loss statement for a company (Purpose2 Property Ltd) for the year ending 31 August 2024. It includes financial data such as turnover, cost of sales, administrative costs, and profit before and after taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss statement.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is a profit and loss statement for a company (Purpose2 Property Ltd) for the year ending 31 August 2024. It includes financial data such as turnover, cost of sales, administrative costs, and profit before and after taxation. These are key indicators of a financial statement, specifically an income statement or profit and loss statement.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.12378947368421052,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.10526315789473684,
"pattern_score": 0.1,
"total_score": 0.12378947368421052
},
"hp_agreement": {
"keyword_score": 0.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.06666666666666667,
"pattern_score": 0.0,
"total_score": 0.06
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.0,
"total_score": 0.03
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "financial_statement"
}
},
"page_number": 31,
"text_length": 1448
},
{
"confidence_score": 0.95,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains detailed financial information such as fixed assets, current assets, creditors, net assets, and capital reserves. These are key components of a financial statement, specifically a balance sheet. There are no indicators of transactions, invoices, payroll, loans, mortgages, 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-DZU0L0oQt90g2rxUFinHgTe77jq6u\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document is titled \\\u0027Balance Sheet\\\u0027 and contains detailed financial information such as fixed assets, current assets, creditors, net assets, and capital reserves. These are key components of a financial statement, specifically a balance sheet. There are no indicators of transactions, invoices, payroll, loans, mortgages, 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349189, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=231, prompt_tokens=1654, total_tokens=1885, completion_tokens_details=CompletionTokensDetails(accepted_predict"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document is titled \u0027Balance Sheet\u0027 and contains detailed financial information such as fixed assets, current assets, creditors, net assets, and capital reserves. These are key components of a financial statement, specifically a balance sheet. There are no indicators of transactions, invoices, payroll, loans, mortgages, or property details, which rules out other categories.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document is titled \u0027Balance Sheet\u0027 and contains detailed financial information such as fixed assets, current assets, creditors, net assets, and capital reserves. These are key components of a financial statement, specifically a balance sheet. There are no indicators of transactions, invoices, payroll, loans, mortgages, 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": "financial_statement"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.3233684210526316,
"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.3157894736842105,
"pattern_score": 0.2,
"total_score": 0.3233684210526316
},
"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.0,
"total_score": 0.06
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.013888888888888888,
"pattern_score": 0.0,
"total_score": 0.015
},
"property_statement": {
"keyword_score": 0.027777777777777776,
"pattern_score": 0.02564102564102564,
"total_score": 0.06730769230769232
}
},
"type": "financial_statement"
}
},
"page_number": 32,
"text_length": 1791
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Corporation Tax Return (CT600), a UTR (Unique Taxpayer Reference) number, and mentions \u0027Corporation Tax\u0027 explicitly in the document text. Additionally, the document includes references to financial statements such as \u0027Profit and Loss\u0027 and \u0027Balance Sheet,\u0027 which are typically part of a corporation tax filing.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-DZU0MX5Qbcl5GOeB35LKfzbZgwUNY\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to a Corporation Tax Return (CT600), a UTR (Unique Taxpayer Reference) number, and mentions \\\u0027Corporation Tax\\\u0027 explicitly in the document text. Additionally, the document includes references to financial statements such as \\\u0027Profit and Loss\\\u0027 and \\\u0027Balance Sheet,\\\u0027 which are typically part of a corporation tax filing.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null,\\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349190, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=231, prompt_tokens=2042, total_tokens=2273, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, re"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to a Corporation Tax Return (CT600), a UTR (Unique Taxpayer Reference) number, and mentions \u0027Corporation Tax\u0027 explicitly in the document text. Additionally, the document includes references to financial statements such as \u0027Profit and Loss\u0027 and \u0027Balance Sheet,\u0027 which are typically part of a corporation tax filing.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to a Corporation Tax Return (CT600), a UTR (Unique Taxpayer Reference) number, and mentions \u0027Corporation Tax\u0027 explicitly in the document text. Additionally, the document includes references to financial statements such as \u0027Profit and Loss\u0027 and \u0027Balance Sheet,\u0027 which are typically part of a corporation tax filing.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null,\n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.125,
"total_score": 0.08333333333333334
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.030303030303030304,
"total_score": 0.021818181818181823
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 33,
"text_length": 3223
},
{
"confidence_score": 0.95,
"document_type": "corporation_tax",
"features": {
"llm_based": {
"confidence": 0.95,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Return\u0027, \u0027CT600\u0027, and \u0027Profit and Loss\u0027 as well as \u0027Balance Sheet\u0027, which are key indicators of a corporation tax document. Additionally, the document mentions \u0027Purpose2Property VT Micro Accounts 2024\u0027, which aligns with financial reporting for corporate tax purposes.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_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-DZU0O5JvfgbaJ5nkYvbw4VQYNowib\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"corporation_tax\",\\n \"confidence\": 0.95,\\n \"reasoning\": \"The document contains references to \\\u0027Corporation Tax Return\\\u0027, \\\u0027CT600\\\u0027, and \\\u0027Profit and Loss\\\u0027 as well as \\\u0027Balance Sheet\\\u0027, which are key indicators of a corporation tax document. Additionally, the document mentions \\\u0027Purpose2Property VT Micro Accounts 2024\\\u0027, which aligns with financial reporting for corporate tax purposes.\",\\n \"document_identifiers\": {\\n \"invoice_number\": null,\\n \"seller_name\": null, \\n \"invoice_date\": null,\\n \"total_amount\": null,\\n \"agreement_date\": null,\\n \"amount_financed\": null,\\n \"monthly_payment\": null,\\n \"loan_tenure\": null,\\n \"loan_reference\": null,\\n \"annual_interest_rate\": null,\\n \"outstanding_balance\": null,\\n \"statement_period\": null,\\n \"mortgage_account_number\": null,\\n \"property_address\": null,\\n \"remaining_term_months\": null,\\n \"monthly_payment_amount\": null\\n }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], audio=None, function_call=None, tool_calls=None), content_filter_results={\u0027hate\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027protected_material_code\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349192, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=228, prompt_tokens=2144, total_tokens=2372, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rej"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document contains references to \u0027Corporation Tax Return\u0027, \u0027CT600\u0027, and \u0027Profit and Loss\u0027 as well as \u0027Balance Sheet\u0027, which are key indicators of a corporation tax document. Additionally, the document mentions \u0027Purpose2Property VT Micro Accounts 2024\u0027, which aligns with financial reporting for corporate tax purposes.",
"raw_response": "```json\n{\n \"document_type\": \"corporation_tax\",\n \"confidence\": 0.95,\n \"reasoning\": \"The document contains references to \u0027Corporation Tax Return\u0027, \u0027CT600\u0027, and \u0027Profit and Loss\u0027 as well as \u0027Balance Sheet\u0027, which are key indicators of a corporation tax document. Additionally, the document mentions \u0027Purpose2Property VT Micro Accounts 2024\u0027, which aligns with financial reporting for corporate tax purposes.\",\n \"document_identifiers\": {\n \"invoice_number\": null,\n \"seller_name\": null, \n \"invoice_date\": null,\n \"total_amount\": null,\n \"agreement_date\": null,\n \"amount_financed\": null,\n \"monthly_payment\": null,\n \"loan_tenure\": null,\n \"loan_reference\": null,\n \"annual_interest_rate\": null,\n \"outstanding_balance\": null,\n \"statement_period\": null,\n \"mortgage_account_number\": null,\n \"property_address\": null,\n \"remaining_term_months\": null,\n \"monthly_payment_amount\": null\n }\n}\n```"
},
"type": "corporation_tax"
},
"method_used": "both_agree",
"pattern_based": {
"confidence": 0.0903529411764706,
"features": {
"bank_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"corporation_tax": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.1,
"total_score": 0.0903529411764706
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.05555555555555555,
"pattern_score": 0.0,
"total_score": 0.03333333333333333
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "corporation_tax"
}
},
"page_number": 34,
"text_length": 5156
},
{
"confidence_score": 0.9,
"document_type": "financial_statement",
"features": {
"llm_based": {
"confidence": 0.9,
"features": {
"api_response_debug": {
"content_preview": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document references a \u0027Balance Sheet\u0027 in its name (\u0027Purpose2Property_Ltd_-_Balance_Sheet.pdf\u0027), which is a key indicator of a financial statement. Additionally, there are no indicators of transactions, invoices, payroll, loans, or other specific document types in the provided 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-DZU0PqnJT93yPlrv3MgGQBDjM6M8F\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n \"document_type\": \"financial_statement\",\\n \"confidence\": 0.9,\\n \"reasoning\": \"The document references a \\\u0027Balance Sheet\\\u0027 in its name (\\\u0027Purpose2Property_Ltd_-_Balance_Sheet.pdf\\\u0027), which is a key indicator of a financial statement. Additionally, there are no indicators of transactions, invoices, payroll, loans, or other specific document types in the provided 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: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027protected_material_text\u0027: {\u0027detected\u0027: False, \u0027filtered\u0027: False}, \u0027self_harm\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027sexual\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}, \u0027violence\u0027: {\u0027filtered\u0027: False, \u0027severity\u0027: \u0027safe\u0027}})], created=1777349193, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=\u0027default\u0027, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=221, prompt_tokens=1893, total_tokens=2114, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_toke"
},
"document_identifiers": {
"agreement_date": null,
"amount_financed": null,
"annual_interest_rate": null,
"invoice_date": null,
"invoice_number": null,
"loan_reference": null,
"loan_tenure": null,
"monthly_payment": null,
"monthly_payment_amount": null,
"mortgage_account_number": null,
"outstanding_balance": null,
"property_address": null,
"remaining_term_months": null,
"seller_name": null,
"statement_period": null,
"total_amount": null
},
"llm_reasoning": "The document references a \u0027Balance Sheet\u0027 in its name (\u0027Purpose2Property_Ltd_-_Balance_Sheet.pdf\u0027), which is a key indicator of a financial statement. Additionally, there are no indicators of transactions, invoices, payroll, loans, or other specific document types in the provided text.",
"raw_response": "```json\n{\n \"document_type\": \"financial_statement\",\n \"confidence\": 0.9,\n \"reasoning\": \"The document references a \u0027Balance Sheet\u0027 in its name (\u0027Purpose2Property_Ltd_-_Balance_Sheet.pdf\u0027), which is a key indicator of a financial statement. Additionally, there are no indicators of transactions, invoices, payroll, loans, or other specific document types in the provided 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": "financial_statement"
},
"method_used": "llm_preferred",
"pattern_based": {
"confidence": 0.03529411764705882,
"features": {
"bank_statement": {
"keyword_score": 0.058823529411764705,
"pattern_score": 0.0,
"total_score": 0.03529411764705882
},
"corporation_tax": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"credit_card": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"financial_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"hp_agreement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"invoice": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"loan_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"mortgage_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"nominal_ledger": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"p32_payroll": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"payroll_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
},
"property_statement": {
"keyword_score": 0.0,
"pattern_score": 0.0,
"total_score": 0.0
}
},
"type": "bank_statement"
}
},
"page_number": 35,
"text_length": 2279
}
],
"processing_timestamp": "2026-04-28T04:06:34.941003"
}