diff --git a/AzuriteConfig b/AzuriteConfig new file mode 100644 index 0000000..6ae76e2 --- /dev/null +++ b/AzuriteConfig @@ -0,0 +1 @@ +{"instanceID":"50a9f039-867c-4fcc-8178-b0ca6c501d77"} \ No newline at end of file diff --git a/__azurite_db_queue__.json b/__azurite_db_queue__.json new file mode 100644 index 0000000..9457e9d --- /dev/null +++ b/__azurite_db_queue__.json @@ -0,0 +1 @@ +{"filename":"/workspaces/claims-processing-hack/__azurite_db_queue__.json","collections":[{"name":"$SERVICES_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{},"constraints":null,"uniqueNames":["accountName"],"transforms":{},"objType":"$SERVICES_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]},{"name":"$QUEUES_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{"accountName":{"name":"accountName","dirty":false,"values":[]},"name":{"name":"name","dirty":false,"values":[]}},"constraints":null,"uniqueNames":[],"transforms":{},"objType":"$QUEUES_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]},{"name":"$MESSAGES_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{"accountName":{"name":"accountName","dirty":false,"values":[]},"queueName":{"name":"queueName","dirty":false,"values":[]},"messageId":{"name":"messageId","dirty":false,"values":[]},"visibleTime":{"name":"visibleTime","dirty":false,"values":[]}},"constraints":null,"uniqueNames":[],"transforms":{},"objType":"$MESSAGES_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]}],"databaseVersion":1.5,"engineVersion":1.5,"autosave":true,"autosaveInterval":5000,"autosaveHandle":null,"throttledSaves":true,"options":{"persistenceMethod":"fs","autosave":true,"autosaveInterval":5000,"serializationMethod":"normal","destructureDelimiter":"$<\n"},"persistenceMethod":"fs","persistenceAdapter":null,"verbose":false,"events":{"init":[null],"loaded":[],"flushChanges":[],"close":[],"changes":[],"warning":[]},"ENV":"NODEJS"} \ No newline at end of file diff --git a/__azurite_db_queue_extent__.json b/__azurite_db_queue_extent__.json new file mode 100644 index 0000000..28bdd8d --- /dev/null +++ b/__azurite_db_queue_extent__.json @@ -0,0 +1 @@ +{"filename":"/workspaces/claims-processing-hack/__azurite_db_queue_extent__.json","collections":[{"name":"$EXTENTS_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{"id":{"name":"id","dirty":false,"values":[]}},"constraints":null,"uniqueNames":[],"transforms":{},"objType":"$EXTENTS_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]}],"databaseVersion":1.5,"engineVersion":1.5,"autosave":true,"autosaveInterval":5000,"autosaveHandle":null,"throttledSaves":true,"options":{"persistenceMethod":"fs","autosave":true,"autosaveInterval":5000,"serializationMethod":"normal","destructureDelimiter":"$<\n"},"persistenceMethod":"fs","persistenceAdapter":null,"verbose":false,"events":{"init":[null],"loaded":[],"flushChanges":[],"close":[],"changes":[],"warning":[]},"ENV":"NODEJS"} \ No newline at end of file diff --git a/__azurite_db_table__.json b/__azurite_db_table__.json new file mode 100644 index 0000000..64b87cd --- /dev/null +++ b/__azurite_db_table__.json @@ -0,0 +1 @@ +{"filename":"/workspaces/claims-processing-hack/__azurite_db_table__.json","collections":[{"name":"$TABLES_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{"account":{"name":"account","dirty":false,"values":[]},"table":{"name":"table","dirty":false,"values":[]}},"constraints":null,"uniqueNames":[],"transforms":{},"objType":"$TABLES_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]},{"name":"$SERVICES_COLLECTION$","data":[],"idIndex":null,"binaryIndices":{},"constraints":null,"uniqueNames":["accountName"],"transforms":{},"objType":"$SERVICES_COLLECTION$","dirty":false,"cachedIndex":null,"cachedBinaryIndex":null,"cachedData":null,"adaptiveBinaryIndices":true,"transactional":false,"cloneObjects":false,"cloneMethod":"parse-stringify","asyncListeners":false,"disableMeta":false,"disableChangesApi":true,"disableDeltaChangesApi":true,"autoupdate":false,"serializableIndices":true,"disableFreeze":true,"ttl":null,"maxId":0,"DynamicViews":[],"events":{"insert":[],"update":[],"pre-insert":[],"pre-update":[],"close":[],"flushbuffer":[],"error":[],"delete":[null],"warning":[null]},"changes":[],"dirtyIds":[]}],"databaseVersion":1.5,"engineVersion":1.5,"autosave":true,"autosaveInterval":5000,"autosaveHandle":null,"throttledSaves":true,"options":{"persistenceMethod":"fs","autosave":true,"autosaveInterval":5000,"serializationMethod":"normal","destructureDelimiter":"$<\n"},"persistenceMethod":"fs","persistenceAdapter":null,"verbose":false,"events":{"init":[null],"loaded":[],"flushChanges":[],"close":[],"changes":[],"warning":[]},"ENV":"NODEJS"} \ No newline at end of file diff --git a/challenge-0/data/statements/crash1_front_annotations.json b/challenge-0/data/statements/crash1_front_annotations.json index ba8902d..f96c4a9 100644 --- a/challenge-0/data/statements/crash1_front_annotations.json +++ b/challenge-0/data/statements/crash1_front_annotations.json @@ -1,16 +1,16 @@ { "extracted_data": { "claimant_name": "John Peterson", - "policy_number": "C1A8-AU1D-001", + "policy_number": "LIAB-AUTO-001", "claim_date": "July 17, 2025", "vehicle_info": { "year": "2004", "make": "Honda", "model": "Accord", - "vin": "1HGCM56404A123456", + "vin": "1HGCH56404A123456", "license_plate": "OH-GHR1984" }, - "incident_description": "On the morning of July 17, 2025, my vehicle was legally parked in a market parking space at 2325 Rain Street, Springfield. At approximately 8:30 AM, while I was inside a nearby store, I was notified by a witness that a gray pickup truck attempting to park beside my car, struck the front end and drive/side of my vehicle. The other car's driver failed to properly judge the distance and colluded with my vehicle, causing significant damage. The other driver left their information and waited for the police to arrive.", + "incident_description": "On the morning of July 17, 2025, my vehicle was legally parked in a market parking space at 2325 Main Street, Springfield. At approximately 8:30 AM, while I was inside a nearby store, I was notified by a witness that a gray pickup truck attempting to park beside my car, struck the front end and driver's side of my vehicle. The other car's driver failed to properly judge the distance and collided with my vehicle, causing significant damage. The other driver left their information and waited for the police to arrive.", "signature_present": false }, "annotations": [ @@ -22,9 +22,9 @@ }, { "field_name": "policy_number", - "value": "C1A8-AU1D-001", + "value": "LIAB-AUTO-001", "confidence": 0.9, - "raw_text": "C1A8-AU1D-001" + "raw_text": "LIAB-AUTO-001" }, { "field_name": "claim_date", @@ -52,9 +52,9 @@ }, { "field_name": "vehicle_info.vin", - "value": "1HGCM56404A123456", + "value": "1HGCH56404A123456", "confidence": 0.9, - "raw_text": "1HGCM56404A123456" + "raw_text": "1HGCH56404A123456" }, { "field_name": "vehicle_info.license_plate", @@ -64,9 +64,9 @@ }, { "field_name": "incident_description", - "value": "On the morning of July 17, 2025, my vehicle was legally parked in a market parking space at 2325 Rain Street, Springfield. At approximately 8:30 AM, while I was inside a nearby store, I was notified by a witness that a gray pickup truck attempting to park beside my car, struck the front end and drive/side of my vehicle. The other car's driver failed to properly judge the distance and colluded with my vehicle, causing significant damage. The other driver left their information and waited for the police to arrive.", + "value": "On the morning of July 17, 2025, my vehicle was legally parked in a market parking space at 2325 Main Street, Springfield. At approximately 8:30 AM, while I was inside a nearby store, I was notified by a witness that a gray pickup truck attempting to park beside my car, struck the front end and driver's side of my vehicle. The other car's driver failed to properly judge the distance and collided with my vehicle, causing significant damage. The other driver left their information and waited for the police to arrive.", "confidence": 0.9, - "raw_text": "On the morning of July 17, 2025, my vehicle was legally parked in a market parking space at 2325 Rain Street, Springfield. At approximately 8:30 AM, while I was inside a nearby store, I was notified by a witness that a gray pickup truck attempting to park beside my car, struck the front end and drive/side of my vehicle. The other car's driver failed to properly judge the distance and colluded with my vehicle, causing significant damage. The other driver left their information and waited for the police to arrive." + "raw_text": "On the morning of July 17, 2025, my vehicle was legally parked in a market parking space at 2325 Main Street, Springfield. At approximately 8:30 AM, while I was inside a nearby store, I was notified by a witness that a gray pickup truck attempting to park beside my car, struck the front end and driver's side of my vehicle. The other car's driver failed to properly judge the distance and collided with my vehicle, causing significant damage. The other driver left their information and waited for the police to arrive." }, { "field_name": "signature_present", @@ -79,7 +79,7 @@ "pages": [ { "page_number": 0, - "markdown": "# ACCIDENT STATEMENT FORM\n\n**Policyholder Information**\nName: John Peterson\nAddress: 1142 Pinecrest Avenue, Springfield, OH 45503\nPhone: (937) 555-2319\nEmail: john.peterson@email.com\nPolicy Number: C1A8-AU1D-001\nClaimant ID:\n\n**Vehicle Information**\nYear/Make/Model: 2004 Honda Accord\nColor: Silver\nVIN: 1HGCM56404A123456\nLicense Plate: OH-GHR1984\n\n**Accident Information**\nDate of Incident: July 17, 2025\nTime: 8:30 AM\nLocation: Parking Lot, 2325 Rain Street, Springfield,\nOH 45503\n\n**Description of Incident**\nOn the morning of July 17, 2025, my vehicle was legally\nparked in a market parking space at 2325 Rain Street,\nSpringfield. At approximately 8:30 AM, while I was inside a nearby\nstore, I was notified by a witness that a gray pickup truck\nattempting to park beside my car, struck the front end and drive/side\nof my vehicle. The other car's driver failed to properly judge the\ndistance and colluded with my vehicle, causing significant damage.\nThe other driver left their information and waited for the police\nto arrive.", + "markdown": "# ACCIDENT STATEMENT FORM\n\n## Policyholder Information\n\nName: John Peterson\nAddress: 1142 Pinecrest Avenue, Springfield, OH 45503\nPhone: (937) 555-2319\nEmail: john.peterson@email.com\nPolicy Number: LIAB-AUTO-001\nClaimant ID:\n\n## Vehicle Information\n\nYear/Make/Model: 2004 Honda Accord\nColor: Silver\nVIN: 1HGCH56404A123456\nLicense Plate: OH-GHR1984\n\n## Accident Information\n\nDate of Incident: July 17, 2025\nTime: 8:30 AM\nLocation: Parking Lot, 2325 Main Street, Springfield, OH 45503\n\n## Description of Incident\n\nOn the morning of July 17, 2025, my vehicle was legally parked in a market parking space at 2325 Main Street, Springfield. At approximately 8:30 AM, while I was inside a nearby store, I was notified by a witness that a gray pickup truck attempting to park beside my car, struck the front end and driver's side of my vehicle. The other car's driver failed to properly judge the distance and collided with my vehicle, causing significant damage. The other driver left their information and waited for the police to arrive.", "dimensions": { "dpi": 200, "height": 2048, @@ -89,9 +89,9 @@ } ], "metadata": { - "model": "mistral-document-ai-2505", - "processing_time_seconds": 1.45, - "file_path": "/workspaces/claims-processing-hack/challenge-1/statements_processing/../../challenge-0/data/statements/crash1_front.jpeg", + "model": "mistral-document-ai-2512", + "processing_time_seconds": 1.58, + "file_path": "../../challenge-0/data/statements/crash1_front.jpeg", "include_bboxes": true, "json_schema_provided": true, "schema_for_extraction": { @@ -170,5 +170,5 @@ ] } }, - "raw_text": "# ACCIDENT STATEMENT FORM\n\n**Policyholder Information**\nName: John Peterson\nAddress: 1142 Pinecrest Avenue, Springfield, OH 45503\nPhone: (937) 555-2319\nEmail: john.peterson@email.com\nPolicy Number: C1A8-AU1D-001\nClaimant ID:\n\n**Vehicle Information**\nYear/Make/Model: 2004 Honda Accord\nColor: Silver\nVIN: 1HGCM56404A123456\nLicense Plate: OH-GHR1984\n\n**Accident Information**\nDate of Incident: July 17, 2025\nTime: 8:30 AM\nLocation: Parking Lot, 2325 Rain Street, Springfield,\nOH 45503\n\n**Description of Incident**\nOn the morning of July 17, 2025, my vehicle was legally\nparked in a market parking space at 2325 Rain Street,\nSpringfield. At approximately 8:30 AM, while I was inside a nearby\nstore, I was notified by a witness that a gray pickup truck\nattempting to park beside my car, struck the front end and drive/side\nof my vehicle. The other car's driver failed to properly judge the\ndistance and colluded with my vehicle, causing significant damage.\nThe other driver left their information and waited for the police\nto arrive.\n\n" + "raw_text": "# ACCIDENT STATEMENT FORM\n\n## Policyholder Information\n\nName: John Peterson\nAddress: 1142 Pinecrest Avenue, Springfield, OH 45503\nPhone: (937) 555-2319\nEmail: john.peterson@email.com\nPolicy Number: LIAB-AUTO-001\nClaimant ID:\n\n## Vehicle Information\n\nYear/Make/Model: 2004 Honda Accord\nColor: Silver\nVIN: 1HGCH56404A123456\nLicense Plate: OH-GHR1984\n\n## Accident Information\n\nDate of Incident: July 17, 2025\nTime: 8:30 AM\nLocation: Parking Lot, 2325 Main Street, Springfield, OH 45503\n\n## Description of Incident\n\nOn the morning of July 17, 2025, my vehicle was legally parked in a market parking space at 2325 Main Street, Springfield. At approximately 8:30 AM, while I was inside a nearby store, I was notified by a witness that a gray pickup truck attempting to park beside my car, struck the front end and driver's side of my vehicle. The other car's driver failed to properly judge the distance and collided with my vehicle, causing significant damage. The other driver left their information and waited for the police to arrive.\n\n" } \ No newline at end of file diff --git a/challenge-1/scripts/imageprocessing.ipynb b/challenge-1/scripts/imageprocessing.ipynb index f96ee57..cc46c79 100644 --- a/challenge-1/scripts/imageprocessing.ipynb +++ b/challenge-1/scripts/imageprocessing.ipynb @@ -35,9 +35,17 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "βœ… All imports successful!\n" + ] + } + ], "source": [ "import os\n", "import json\n", @@ -70,9 +78,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "βœ… Configuration loaded successfully!\n", + "πŸ“ Policies directory: ../../challenge-0/data/policies\n", + "πŸ“ Statements directory: ../output/mistral\n", + "πŸ“ Claims directory: ../../challenge-0/data/images\n", + "πŸ€– OpenAI Deployment: gpt-4.1-mini\n", + "πŸ”§ API surface: Azure OpenAI v1 (GA)\n", + "βœ… Policies directory found: 5 files\n", + "βœ… Statements directory found: 10 files\n", + "βœ… Claims directory found: 5 image files\n" + ] + } + ], "source": [ "# Configuration\n", "class Config:\n", @@ -149,9 +173,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "πŸ”„ Reloaded environment variables\n", + "πŸ”§ API surface: Azure OpenAI v1 (GA)\n" + ] + } + ], "source": [ "# Force reload environment variables\n", "import importlib\n", @@ -180,9 +213,17 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "βœ… Azure clients initialized successfully!\n" + ] + } + ], "source": [ "# Initialize Azure clients\n", "def initialize_clients():\n", @@ -218,9 +259,36 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "πŸš€ Running enhanced container creation...\n", + "πŸ” Testing storage account connection...\n", + "βœ… Connected to storage account successfully\n", + " Account kind: StorageV2\n", + " SKU name: Standard_LRS\n", + "\n", + "πŸ” Checking existing containers...\n", + "βœ… Found 0 existing containers: []\n", + "πŸ”¨ Creating container 'policies'...\n", + "βœ… Container 'policies' created successfully\n", + "πŸ”¨ Creating container 'claims'...\n", + "βœ… Container 'claims' created successfully\n", + "πŸ”¨ Creating container 'statements'...\n", + "βœ… Container 'statements' created successfully\n", + "πŸ”¨ Creating container 'processed-documents'...\n", + "βœ… Container 'processed-documents' created successfully\n", + "\n", + "πŸ“Š Container Creation Summary:\n", + " Successful: 4 - ['policies', 'claims', 'statements', 'processed-documents']\n", + " Failed: 0 - []\n" + ] + } + ], "source": [ "# Enhanced container creation with multiple authentication methods and diagnostics\n", "def create_containers_enhanced(blob_service_client):\n", @@ -315,9 +383,17 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "βœ… Document uploader initialized!\n" + ] + } + ], "source": [ "class DocumentUploader:\n", " def __init__(self, blob_service_client):\n", @@ -396,9 +472,190 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "πŸ“„ Uploading Policy Documents...\n", + "==================================================\n", + "πŸ“€ Uploading 5 files from ../../challenge-0/data/policies to policies...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Uploading files: 60%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ | 3/5 [00:00<00:00, 24.55it/s]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "βœ… Uploaded: commercial_auto_policy.md β†’ policies/commercial_auto_policy.md\n", + "βœ… Uploaded: motorcycle_policy.md β†’ policies/motorcycle_policy.md\n", + "βœ… Uploaded: high_value_vehicle_policy.md β†’ policies/high_value_vehicle_policy.md\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Uploading files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5/5 [00:00<00:00, 25.51it/s]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "βœ… Uploaded: comprehensive_auto_policy.md β†’ policies/comprehensive_auto_policy.md\n", + "βœ… Uploaded: liability_only_policy.md β†’ policies/liability_only_policy.md\n", + "\n", + "πŸ“Š Upload Summary: 5/5 files uploaded successfully\n", + "\n", + "πŸ–ΌοΈ Uploading Claims Documents...\n", + "==================================================\n", + "πŸ“€ Uploading 5 files from ../../challenge-0/data/images to claims...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Uploading files: 0%| | 0/5 [00:00