Merged PDF Processing Results

Back to Dashboard
PDF Information
Original Filename: Bill_no_47948-4844085__PDF_-4859295_1774958186.PDF
Upload Date: March 31, 2026 at 11:58 AM
Total Pages: 3
Processing Status: Partial
Extraction Summary
Total Documents: 2
Invoices: 1
Property Statements: 1
Page Classification Results
Page 1

Invoice

95%
Page 2

Property Statement

85%
Page 3

Unknown

0%
Extracted Documents 2
Document Type Pages Confidence Processing Status Created Actions
Invoice 1 (1 page) 95% Processed 2026-03-31 11:58 View
Property Statement 2 (1 page) 85% Failed 2026-03-31 11:58 Processing...
{
  "document_groups": [
    {
      "avg_confidence": 0.95,
      "document_identifiers": {
        "agreement_date": null,
        "amount_financed": null,
        "annual_interest_rate": null,
        "invoice_date": "30-April-2025",
        "invoice_number": "47948",
        "loan_reference": null,
        "loan_tenure": null,
        "monthly_payment": null,
        "monthly_payment_amount": null,
        "mortgage_account_number": null,
        "outstanding_balance": null,
        "property_address": null,
        "remaining_term_months": null,
        "seller_name": "RDP Law Limited",
        "statement_period": null,
        "total_amount": "10,543.60"
      },
      "document_type": "invoice",
      "end_page": 1,
      "pages": [
        {
          "confidence_score": 0.95,
          "document_type": "invoice",
          "features": {
            "llm_based": {
              "confidence": 0.95,
              "features": {
                "api_response_debug": {
                  "content_preview": "```json\n{\n    \"document_type\": \"invoice\",\n    \"confidence\": 0.95,\n    \"reasoning\": \"The document contains key indicators of an invoice, such as \u0027VAT INVOICE\u0027, \u0027Invoice No\u0027, \u0027Date\u0027, \u0027Professional Charges\u0027, and a breakdown of costs, VAT, and total amount. Additionally, it includes payment instructions and a seller\u0027s name (RDP Law Limited).\",\n    \"document_identifiers\": {\n        \"invoice_number\": \"47948\",\n        \"seller_name\": \"RDP Law Limited\",\n        \"invoice_date\": \"30-April-2025\",\n        \"total_amount\": \"10,543.60\",\n        \"agreement_date\": null,\n        \"amount_financed\": null,\n        \"monthly_payment\": null,\n        \"loan_tenure\": null,\n        \"loan_reference\": null,\n        \"annual_interest_rate\": null,\n        \"outstanding_balance\": null,\n        \"statement_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-DPS1hmEj2Gs7aiIcgdTIrRyyHMir2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n    \"document_type\": \"invoice\",\\n    \"confidence\": 0.95,\\n    \"reasoning\": \"The document contains key indicators of an invoice, such as \\\u0027VAT INVOICE\\\u0027, \\\u0027Invoice No\\\u0027, \\\u0027Date\\\u0027, \\\u0027Professional Charges\\\u0027, and a breakdown of costs, VAT, and total amount. Additionally, it includes payment instructions and a seller\\\u0027s name (RDP Law Limited).\",\\n    \"document_identifiers\": {\\n        \"invoice_number\": \"47948\",\\n        \"seller_name\": \"RDP Law Limited\",\\n        \"invoice_date\": \"30-April-2025\",\\n        \"total_amount\": \"10,543.60\",\\n        \"agreement_date\": null,\\n        \"amount_financed\": null,\\n        \"monthly_payment\": null,\\n        \"loan_tenure\": null,\\n        \"loan_reference\": null,\\n        \"annual_interest_rate\": null,\\n        \"outstanding_balance\": null,\\n        \"statement_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=1774958305, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=235, prompt_tokens=1398, total_tokens=1633, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_detai"
                },
                "document_identifiers": {
                  "agreement_date": null,
                  "amount_financed": null,
                  "annual_interest_rate": null,
                  "invoice_date": "30-April-2025",
                  "invoice_number": "47948",
                  "loan_reference": null,
                  "loan_tenure": null,
                  "monthly_payment": null,
                  "monthly_payment_amount": null,
                  "mortgage_account_number": null,
                  "outstanding_balance": null,
                  "property_address": null,
                  "remaining_term_months": null,
                  "seller_name": "RDP Law Limited",
                  "statement_period": null,
                  "total_amount": "10,543.60"
                },
                "llm_reasoning": "The document contains key indicators of an invoice, such as \u0027VAT INVOICE\u0027, \u0027Invoice No\u0027, \u0027Date\u0027, \u0027Professional Charges\u0027, and a breakdown of costs, VAT, and total amount. Additionally, it includes payment instructions and a seller\u0027s name (RDP Law Limited).",
                "raw_response": "```json\n{\n    \"document_type\": \"invoice\",\n    \"confidence\": 0.95,\n    \"reasoning\": \"The document contains key indicators of an invoice, such as \u0027VAT INVOICE\u0027, \u0027Invoice No\u0027, \u0027Date\u0027, \u0027Professional Charges\u0027, and a breakdown of costs, VAT, and total amount. Additionally, it includes payment instructions and a seller\u0027s name (RDP Law Limited).\",\n    \"document_identifiers\": {\n        \"invoice_number\": \"47948\",\n        \"seller_name\": \"RDP Law Limited\",\n        \"invoice_date\": \"30-April-2025\",\n        \"total_amount\": \"10,543.60\",\n        \"agreement_date\": null,\n        \"amount_financed\": null,\n        \"monthly_payment\": null,\n        \"loan_tenure\": null,\n        \"loan_reference\": null,\n        \"annual_interest_rate\": null,\n        \"outstanding_balance\": null,\n        \"statement_period\": null,\n        \"mortgage_account_number\": null,\n        \"property_address\": null,\n        \"remaining_term_months\": null,\n        \"monthly_payment_amount\": null\n    }\n}\n```"
              },
              "type": "invoice"
            },
            "method_used": "both_agree",
            "pattern_based": {
              "confidence": 0.15,
              "features": {
                "bank_statement": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "corporation_tax": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "credit_card": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "financial_statement": {
                  "keyword_score": 0.05263157894736842,
                  "pattern_score": 0.0,
                  "total_score": 0.03789473684210525
                },
                "hp_agreement": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "invoice": {
                  "keyword_score": 0.16666666666666666,
                  "pattern_score": 0.125,
                  "total_score": 0.15
                },
                "loan_statement": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "mortgage_statement": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "nominal_ledger": {
                  "keyword_score": 0.08333333333333333,
                  "pattern_score": 0.14285714285714285,
                  "total_score": 0.1392857142857143
                },
                "p32_payroll": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "payroll_statement": {
                  "keyword_score": 0.013888888888888888,
                  "pattern_score": 0.030303030303030304,
                  "total_score": 0.03681818181818182
                },
                "property_statement": {
                  "keyword_score": 0.027777777777777776,
                  "pattern_score": 0.05128205128205128,
                  "total_score": 0.09294871794871795
                }
              },
              "type": "invoice"
            }
          },
          "page_number": 1,
          "text_length": 1144
        }
      ],
      "start_page": 1
    },
    {
      "avg_confidence": 0.85,
      "document_identifiers": {
        "agreement_date": null,
        "amount_financed": null,
        "annual_interest_rate": null,
        "completion_date": 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,
        "purchase_sale_price": null,
        "remaining_term_months": null,
        "seller_name": null,
        "statement_period": null,
        "total_amount": null
      },
      "document_type": "property_statement",
      "end_page": 2,
      "pages": [
        {
          "confidence_score": 0.85,
          "document_type": "property_statement",
          "features": {
            "llm_based": {
              "confidence": 0.85,
              "features": {
                "api_response_debug": {
                  "content_preview": "```json\n{\n    \"document_type\": \"property_statement\",\n    \"confidence\": 0.85,\n    \"reasoning\": \"The document references a \u0027bill of costs\u0027 and mentions terms related to legal and solicitor services, including the Solicitors Act 1974 and the Solicitors (Non-Contentious Business) Remuneration Order 1994. These are key indicators of a property completion or conveyancing statement, which often involves solicitor fees and legal notices.\",\n    \"document_identifiers\": {\n        \"invoice_number\": null,\n        \"seller_name\": null, \n        \"invoice_date\": null,\n        \"total_amount\": null,\n        \"agreement_date\": null,\n        \"amount_financed\": null,\n        \"monthly_payment\": null,\n        \"loan_tenure\": null,\n        \"loan_reference\": null,\n        \"annual_interest_rate\": null,\n        \"outstanding_balance\": null,\n        \"statement_period\": null,\n        \"mortgage_account_number\": null,\n        \"property_address\": null,\n        \"remaining_term_months\": null,\n        \"monthly_payment_amount\": null,\n        \"completion_date\": null,\n        \"purchase_sale_price\": null\n    }\n}\n```",
                  "response_repr": "ChatCompletion(id=\u0027chatcmpl-DPS1jUIkjbSXevpyItNiDBxfT8e6r\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n    \"document_type\": \"property_statement\",\\n    \"confidence\": 0.85,\\n    \"reasoning\": \"The document references a \\\u0027bill of costs\\\u0027 and mentions terms related to legal and solicitor services, including the Solicitors Act 1974 and the Solicitors (Non-Contentious Business) Remuneration Order 1994. These are key indicators of a property completion or conveyancing statement, which often involves solicitor fees and legal notices.\",\\n    \"document_identifiers\": {\\n        \"invoice_number\": null,\\n        \"seller_name\": null, \\n        \"invoice_date\": null,\\n        \"total_amount\": null,\\n        \"agreement_date\": null,\\n        \"amount_financed\": null,\\n        \"monthly_payment\": null,\\n        \"loan_tenure\": null,\\n        \"loan_reference\": null,\\n        \"annual_interest_rate\": null,\\n        \"outstanding_balance\": null,\\n        \"statement_period\": null,\\n        \"mortgage_account_number\": null,\\n        \"property_address\": null,\\n        \"remaining_term_months\": null,\\n        \"monthly_payment_amount\": null,\\n        \"completion_date\": null,\\n        \"purchase_sale_price\": null\\n    }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], 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=1774958307, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1506, total_tokens=1752, completion_tokens_details=CompletionToke"
                },
                "document_identifiers": {
                  "agreement_date": null,
                  "amount_financed": null,
                  "annual_interest_rate": null,
                  "completion_date": 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,
                  "purchase_sale_price": null,
                  "remaining_term_months": null,
                  "seller_name": null,
                  "statement_period": null,
                  "total_amount": null
                },
                "llm_reasoning": "The document references a \u0027bill of costs\u0027 and mentions terms related to legal and solicitor services, including the Solicitors Act 1974 and the Solicitors (Non-Contentious Business) Remuneration Order 1994. These are key indicators of a property completion or conveyancing statement, which often involves solicitor fees and legal notices.",
                "raw_response": "```json\n{\n    \"document_type\": \"property_statement\",\n    \"confidence\": 0.85,\n    \"reasoning\": \"The document references a \u0027bill of costs\u0027 and mentions terms related to legal and solicitor services, including the Solicitors Act 1974 and the Solicitors (Non-Contentious Business) Remuneration Order 1994. These are key indicators of a property completion or conveyancing statement, which often involves solicitor fees and legal notices.\",\n    \"document_identifiers\": {\n        \"invoice_number\": null,\n        \"seller_name\": null, \n        \"invoice_date\": null,\n        \"total_amount\": null,\n        \"agreement_date\": null,\n        \"amount_financed\": null,\n        \"monthly_payment\": null,\n        \"loan_tenure\": null,\n        \"loan_reference\": null,\n        \"annual_interest_rate\": null,\n        \"outstanding_balance\": null,\n        \"statement_period\": null,\n        \"mortgage_account_number\": null,\n        \"property_address\": null,\n        \"remaining_term_months\": null,\n        \"monthly_payment_amount\": null,\n        \"completion_date\": null,\n        \"purchase_sale_price\": null\n    }\n}\n```"
              },
              "type": "property_statement"
            },
            "method_used": "both_agree",
            "pattern_based": {
              "confidence": 0.10897435897435898,
              "features": {
                "bank_statement": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "corporation_tax": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "credit_card": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "financial_statement": {
                  "keyword_score": 0.05263157894736842,
                  "pattern_score": 0.0,
                  "total_score": 0.03789473684210525
                },
                "hp_agreement": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "invoice": {
                  "keyword_score": 0.16666666666666666,
                  "pattern_score": 0.0,
                  "total_score": 0.09999999999999999
                },
                "loan_statement": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "mortgage_statement": {
                  "keyword_score": 0.0,
                  "pattern_score": 0.0,
                  "total_score": 0.0
                },
                "nominal_ledger": {
                  "keyword_score": 0.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.05555555555555555,
                  "pattern_score": 0.02564102564102564,
                  "total_score": 0.10897435897435898
                }
              },
              "type": "property_statement"
            }
          },
          "page_number": 2,
          "text_length": 2212
        }
      ],
      "start_page": 2
    }
  ],
  "page_classifications": [
    {
      "confidence_score": 0.95,
      "document_type": "invoice",
      "features": {
        "llm_based": {
          "confidence": 0.95,
          "features": {
            "api_response_debug": {
              "content_preview": "```json\n{\n    \"document_type\": \"invoice\",\n    \"confidence\": 0.95,\n    \"reasoning\": \"The document contains key indicators of an invoice, such as \u0027VAT INVOICE\u0027, \u0027Invoice No\u0027, \u0027Date\u0027, \u0027Professional Charges\u0027, and a breakdown of costs, VAT, and total amount. Additionally, it includes payment instructions and a seller\u0027s name (RDP Law Limited).\",\n    \"document_identifiers\": {\n        \"invoice_number\": \"47948\",\n        \"seller_name\": \"RDP Law Limited\",\n        \"invoice_date\": \"30-April-2025\",\n        \"total_amount\": \"10,543.60\",\n        \"agreement_date\": null,\n        \"amount_financed\": null,\n        \"monthly_payment\": null,\n        \"loan_tenure\": null,\n        \"loan_reference\": null,\n        \"annual_interest_rate\": null,\n        \"outstanding_balance\": null,\n        \"statement_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-DPS1hmEj2Gs7aiIcgdTIrRyyHMir2\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n    \"document_type\": \"invoice\",\\n    \"confidence\": 0.95,\\n    \"reasoning\": \"The document contains key indicators of an invoice, such as \\\u0027VAT INVOICE\\\u0027, \\\u0027Invoice No\\\u0027, \\\u0027Date\\\u0027, \\\u0027Professional Charges\\\u0027, and a breakdown of costs, VAT, and total amount. Additionally, it includes payment instructions and a seller\\\u0027s name (RDP Law Limited).\",\\n    \"document_identifiers\": {\\n        \"invoice_number\": \"47948\",\\n        \"seller_name\": \"RDP Law Limited\",\\n        \"invoice_date\": \"30-April-2025\",\\n        \"total_amount\": \"10,543.60\",\\n        \"agreement_date\": null,\\n        \"amount_financed\": null,\\n        \"monthly_payment\": null,\\n        \"loan_tenure\": null,\\n        \"loan_reference\": null,\\n        \"annual_interest_rate\": null,\\n        \"outstanding_balance\": null,\\n        \"statement_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=1774958305, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=235, prompt_tokens=1398, total_tokens=1633, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_detai"
            },
            "document_identifiers": {
              "agreement_date": null,
              "amount_financed": null,
              "annual_interest_rate": null,
              "invoice_date": "30-April-2025",
              "invoice_number": "47948",
              "loan_reference": null,
              "loan_tenure": null,
              "monthly_payment": null,
              "monthly_payment_amount": null,
              "mortgage_account_number": null,
              "outstanding_balance": null,
              "property_address": null,
              "remaining_term_months": null,
              "seller_name": "RDP Law Limited",
              "statement_period": null,
              "total_amount": "10,543.60"
            },
            "llm_reasoning": "The document contains key indicators of an invoice, such as \u0027VAT INVOICE\u0027, \u0027Invoice No\u0027, \u0027Date\u0027, \u0027Professional Charges\u0027, and a breakdown of costs, VAT, and total amount. Additionally, it includes payment instructions and a seller\u0027s name (RDP Law Limited).",
            "raw_response": "```json\n{\n    \"document_type\": \"invoice\",\n    \"confidence\": 0.95,\n    \"reasoning\": \"The document contains key indicators of an invoice, such as \u0027VAT INVOICE\u0027, \u0027Invoice No\u0027, \u0027Date\u0027, \u0027Professional Charges\u0027, and a breakdown of costs, VAT, and total amount. Additionally, it includes payment instructions and a seller\u0027s name (RDP Law Limited).\",\n    \"document_identifiers\": {\n        \"invoice_number\": \"47948\",\n        \"seller_name\": \"RDP Law Limited\",\n        \"invoice_date\": \"30-April-2025\",\n        \"total_amount\": \"10,543.60\",\n        \"agreement_date\": null,\n        \"amount_financed\": null,\n        \"monthly_payment\": null,\n        \"loan_tenure\": null,\n        \"loan_reference\": null,\n        \"annual_interest_rate\": null,\n        \"outstanding_balance\": null,\n        \"statement_period\": null,\n        \"mortgage_account_number\": null,\n        \"property_address\": null,\n        \"remaining_term_months\": null,\n        \"monthly_payment_amount\": null\n    }\n}\n```"
          },
          "type": "invoice"
        },
        "method_used": "both_agree",
        "pattern_based": {
          "confidence": 0.15,
          "features": {
            "bank_statement": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "corporation_tax": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "credit_card": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "financial_statement": {
              "keyword_score": 0.05263157894736842,
              "pattern_score": 0.0,
              "total_score": 0.03789473684210525
            },
            "hp_agreement": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "invoice": {
              "keyword_score": 0.16666666666666666,
              "pattern_score": 0.125,
              "total_score": 0.15
            },
            "loan_statement": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "mortgage_statement": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "nominal_ledger": {
              "keyword_score": 0.08333333333333333,
              "pattern_score": 0.14285714285714285,
              "total_score": 0.1392857142857143
            },
            "p32_payroll": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "payroll_statement": {
              "keyword_score": 0.013888888888888888,
              "pattern_score": 0.030303030303030304,
              "total_score": 0.03681818181818182
            },
            "property_statement": {
              "keyword_score": 0.027777777777777776,
              "pattern_score": 0.05128205128205128,
              "total_score": 0.09294871794871795
            }
          },
          "type": "invoice"
        }
      },
      "page_number": 1,
      "text_length": 1144
    },
    {
      "confidence_score": 0.85,
      "document_type": "property_statement",
      "features": {
        "llm_based": {
          "confidence": 0.85,
          "features": {
            "api_response_debug": {
              "content_preview": "```json\n{\n    \"document_type\": \"property_statement\",\n    \"confidence\": 0.85,\n    \"reasoning\": \"The document references a \u0027bill of costs\u0027 and mentions terms related to legal and solicitor services, including the Solicitors Act 1974 and the Solicitors (Non-Contentious Business) Remuneration Order 1994. These are key indicators of a property completion or conveyancing statement, which often involves solicitor fees and legal notices.\",\n    \"document_identifiers\": {\n        \"invoice_number\": null,\n        \"seller_name\": null, \n        \"invoice_date\": null,\n        \"total_amount\": null,\n        \"agreement_date\": null,\n        \"amount_financed\": null,\n        \"monthly_payment\": null,\n        \"loan_tenure\": null,\n        \"loan_reference\": null,\n        \"annual_interest_rate\": null,\n        \"outstanding_balance\": null,\n        \"statement_period\": null,\n        \"mortgage_account_number\": null,\n        \"property_address\": null,\n        \"remaining_term_months\": null,\n        \"monthly_payment_amount\": null,\n        \"completion_date\": null,\n        \"purchase_sale_price\": null\n    }\n}\n```",
              "response_repr": "ChatCompletion(id=\u0027chatcmpl-DPS1jUIkjbSXevpyItNiDBxfT8e6r\u0027, choices=[Choice(finish_reason=\u0027stop\u0027, index=0, logprobs=None, message=ChatCompletionMessage(content=\u0027```json\\n{\\n    \"document_type\": \"property_statement\",\\n    \"confidence\": 0.85,\\n    \"reasoning\": \"The document references a \\\u0027bill of costs\\\u0027 and mentions terms related to legal and solicitor services, including the Solicitors Act 1974 and the Solicitors (Non-Contentious Business) Remuneration Order 1994. These are key indicators of a property completion or conveyancing statement, which often involves solicitor fees and legal notices.\",\\n    \"document_identifiers\": {\\n        \"invoice_number\": null,\\n        \"seller_name\": null, \\n        \"invoice_date\": null,\\n        \"total_amount\": null,\\n        \"agreement_date\": null,\\n        \"amount_financed\": null,\\n        \"monthly_payment\": null,\\n        \"loan_tenure\": null,\\n        \"loan_reference\": null,\\n        \"annual_interest_rate\": null,\\n        \"outstanding_balance\": null,\\n        \"statement_period\": null,\\n        \"mortgage_account_number\": null,\\n        \"property_address\": null,\\n        \"remaining_term_months\": null,\\n        \"monthly_payment_amount\": null,\\n        \"completion_date\": null,\\n        \"purchase_sale_price\": null\\n    }\\n}\\n```\u0027, refusal=None, role=\u0027assistant\u0027, annotations=[], 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=1774958307, model=\u0027gpt-4o-2024-11-20\u0027, object=\u0027chat.completion\u0027, service_tier=None, system_fingerprint=\u0027fp_af7f7349a4\u0027, usage=CompletionUsage(completion_tokens=246, prompt_tokens=1506, total_tokens=1752, completion_tokens_details=CompletionToke"
            },
            "document_identifiers": {
              "agreement_date": null,
              "amount_financed": null,
              "annual_interest_rate": null,
              "completion_date": 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,
              "purchase_sale_price": null,
              "remaining_term_months": null,
              "seller_name": null,
              "statement_period": null,
              "total_amount": null
            },
            "llm_reasoning": "The document references a \u0027bill of costs\u0027 and mentions terms related to legal and solicitor services, including the Solicitors Act 1974 and the Solicitors (Non-Contentious Business) Remuneration Order 1994. These are key indicators of a property completion or conveyancing statement, which often involves solicitor fees and legal notices.",
            "raw_response": "```json\n{\n    \"document_type\": \"property_statement\",\n    \"confidence\": 0.85,\n    \"reasoning\": \"The document references a \u0027bill of costs\u0027 and mentions terms related to legal and solicitor services, including the Solicitors Act 1974 and the Solicitors (Non-Contentious Business) Remuneration Order 1994. These are key indicators of a property completion or conveyancing statement, which often involves solicitor fees and legal notices.\",\n    \"document_identifiers\": {\n        \"invoice_number\": null,\n        \"seller_name\": null, \n        \"invoice_date\": null,\n        \"total_amount\": null,\n        \"agreement_date\": null,\n        \"amount_financed\": null,\n        \"monthly_payment\": null,\n        \"loan_tenure\": null,\n        \"loan_reference\": null,\n        \"annual_interest_rate\": null,\n        \"outstanding_balance\": null,\n        \"statement_period\": null,\n        \"mortgage_account_number\": null,\n        \"property_address\": null,\n        \"remaining_term_months\": null,\n        \"monthly_payment_amount\": null,\n        \"completion_date\": null,\n        \"purchase_sale_price\": null\n    }\n}\n```"
          },
          "type": "property_statement"
        },
        "method_used": "both_agree",
        "pattern_based": {
          "confidence": 0.10897435897435898,
          "features": {
            "bank_statement": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "corporation_tax": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "credit_card": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "financial_statement": {
              "keyword_score": 0.05263157894736842,
              "pattern_score": 0.0,
              "total_score": 0.03789473684210525
            },
            "hp_agreement": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "invoice": {
              "keyword_score": 0.16666666666666666,
              "pattern_score": 0.0,
              "total_score": 0.09999999999999999
            },
            "loan_statement": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "mortgage_statement": {
              "keyword_score": 0.0,
              "pattern_score": 0.0,
              "total_score": 0.0
            },
            "nominal_ledger": {
              "keyword_score": 0.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.05555555555555555,
              "pattern_score": 0.02564102564102564,
              "total_score": 0.10897435897435898
            }
          },
          "type": "property_statement"
        }
      },
      "page_number": 2,
      "text_length": 2212
    },
    {
      "confidence_score": 0.0,
      "document_type": "unknown",
      "features": {},
      "page_number": 3,
      "text_length": 0
    }
  ],
  "processing_timestamp": "2026-03-31T11:58:29.174872"
}