Automated Company Summary Report Generation Platform

Project Overview

This project presents an enterprise-grade Automated Company Summary Report Generation Platform designed to streamline the extraction, analysis, and synthesis of corporate intelligence from raw regulatory filings and financial data. Built on top of AWS Step Functions and leveraging Claude 3.7 Sonnet via Amazon Bedrock, the platform automates the end-to-end lifecycle—from initial document ingestion to generating polished HTML executive reports stored in Amazon S3.


1. Project Scope

In Scope

  • Automated Data Ingestion: Triggered by a unique Companies House registration number (e.g., from Salesforce CRM or API requests).
  • Document Extraction & OCR: Ingestion of PDF annual reports, utilizing AWS Textract for structural layout analysis, text extraction, and table parsing into clean Markdown (.md) format.
  • API Data Processing: Automated fetching of structured financial data, shareholder details, and company charges from external data providers (Fullcircl API).
  • Parallel Execution Architecture: High-throughput concurrent execution of document OCR and API data fetching using AWS Step Functions parallel states.
  • Database Storage: Storing intermediate and parsed structured data into Amazon DynamoDB for low-latency retrieval.
  • GenAI Intelligence Engine: Implementation of advanced Prompt Chaining using Claude 3.7 Sonnet on Amazon Bedrock to systematically evaluate business performance, risks, liabilities, and expansion plans.
  • Output Generation & Storage: Mapping extracted insights into structured dictionary data, converting them to responsive HTML summary reports, and saving the final documents to an Amazon S3 bucket.

Out of Scope / Future Roadmap

  • Direct real-time editing of generated HTML reports within the web UI.
  • Multi-language translation of international corporate reports.
  • Historical trend comparison across more than 5 consecutive filing years in a single run.

2. Technical Architecture & End-to-End Workflow

[ Salesforce / API Request ]
          │
          ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│                            AWS STEP FUNCTION                                │
│                                                                             │
│  1. INITIALIZATION & DATA PREPROCESSING (PARALLEL STATE)                    │
│  ┌──────────────────────────────┬────────────────────────────────────────┐  │
│  │   Companies House Report     │      Fullcircl Financial API           │  │
│  │   ──────────────────────     │      ─────────────────────────         │  │
│  │   • Ingest PDF Annual Report │      • Fetch Financial Data            │  │
│  │   • Run AWS Textract OCR     │      • Fetch Shareholder Information   │  │
│  │   • Extract Text & Tables    │      • Fetch Charges & Liabilities     │  │
│  │   • Save as Markdown (.md)   │      • Format JSON Payload             │  │
│  └──────────────┬───────────────┴───────────────────┬────────────────────┘  │
│                 │                                   │                       │
│                 └─────────────────┬─────────────────┘                       │
│                                   ▼                                         │
│                      [ Save to Amazon DynamoDB ]                            │
│                                   │                                         │
│  2. GENAI ANALYSIS ENGINE (PROMPT CHAINING WITH CLAUDE 3.7 SONNET)          │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │ Step A: Business Overview & Performance Analysis                      │  │
│  │   │                                                                   │  │
│  │   ▼                                                                   │  │
│  │ Step B: Risk Identification & Risk Assessment                         │  │
│  │   │                                                                   │  │
│  │   ▼                                                                   │  │
│  │ Step C: Financial Liabilities & Debt Structure Evaluation             │  │
│  │   │                                                                   │  │
│  │   ▼                                                                   │  │
│  │ Step D: Business Expansion & Growth Strategy Extraction               │  │
│  └────────────────────────────────┬──────────────────────────────────────┘  │
│                                   │                                         │
│  3. REPORT SYNTHESIS & OUTPUT                                               │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │ • Extract Insights into Structured Python/JSON Dictionary             │  │
│  │ • Render Structured Dictionary into Formatted HTML Executive Report   │  │
│  │ • Upload Final HTML Report to Amazon S3 Bucket                        │  │
│  └────────────────────────────────┬──────────────────────────────────────┘  │
└───────────────────────────────────┼─────────────────────────────────────────┘
                                    ▼
                         [ Amazon S3 Report Bucket ]

3. Project Process Steps

Step 1: Orchestration & Trigger

  1. An incoming request containing the Companies House Registration Number initiates the AWS Step Function workflow (e.g., triggered via a Salesforce integration or REST API call).
  2. The Step Function initializes execution state machine parameters and sets up environment tracking variables.

Step 2: Data Preprocessing & Ingestion (Parallel Branching)

The workflow splits into two primary parallel execution paths to minimize total latency:

  • Branch A — Annual Report OCR Pipeline:
  • Downloads the annual report PDF from regulatory repositories.
  • Submits the document to AWS Textract using asynchronous document analysis.
  • Processes extracted key-value pairs, tables, and narrative text.
  • Transforms the raw text into structured Markdown (.md) format for contextual alignment with LLM context windows.

  • Branch B — API Integration Pipeline (Fullcircl):

  • Issues authenticated API requests to Fullcircl.
  • Retrieves official corporate filings, shareholder breakdown, ownership hierarchies, and mortgage/charge registers.
  • Normalizes the API payload into structured JSON.

  • Data Aggregation:

  • Outputs from both branches are merged and persisted in Amazon DynamoDB as a single source of truth for the processing run.

Step 3: GenAI Intelligence Engine (Prompt Chaining)

Using Claude 3.7 Sonnet on Amazon Bedrock, the platform runs a sequential 4-step prompt chain. Each step builds upon the contextual output of previous steps:

  1. Step 1 — Business Overview & Performance Analysis: Evaluates revenue trends, operational highlights, core products/services, and executive commentary.
  2. Step 2 — Risk Assessment: Extracts primary strategic, operational, credit, and regulatory risks disclosed in the financial notes and strategic reports.
  3. Step 3 — Financial Liabilities & Obligations: Analyzes balance sheet items, short-term and long-term debt, contingent liabilities, and registered charges.
  4. Step 4 — Business Expansion & Outlook: Maps out future growth vectors, strategic investments, merger/acquisition activity, and R&D directions.

Step 4: Dictionary Mapping & HTML Report Conversion

  1. The unstructured LLM outputs from the prompt chain are formatted into a clean, key-value structured Data Dictionary.
  2. A specialized rendering module converts the dictionary into a responsive, styled HTML Report.
  3. The generated HTML file is published directly to a designated Amazon S3 Bucket, generating a secure access URL for downstream consumers.

4. Technologies & Techniques Used

Category Technology / Technique Functional Role
Orchestration AWS Step Functions Workflow coordination, state transition management, retries, and parallel branching.
Generative AI Claude 3.7 Sonnet (Amazon Bedrock) Core LLM reasoning engine for deep text processing, narrative synthesis, and strategic extraction.
Document Processing AWS Textract Optical Character Recognition (OCR), document layout parsing, and tabular extraction.
Data Ingestion Fullcircl API Ingestion of official company filings, shareholding structures, and financial data.
Storage & Persistence Amazon DynamoDB Low-latency NoSQL storage for preprocessed documents, intermediate JSON, and state logs.
Object Storage Amazon S3 Secure storage for raw PDFs, intermediate Markdown files, and final HTML summary reports.
Prompt Architecture Prompt Chaining Multi-pass LLM pipeline dividing complex analysis into granular, targeted extraction steps.
Execution Pattern Parallel Processing Concurrent processing of unstructured OCR documents and structured financial APIs.
Data Transformation Markdown & HTML Parsing Conversion of raw OCR to Markdown for optimal LLM context, and final dictionary mapping to HTML.

Summary of Results & Value Delivered

  • Reduced Processing Time: Parallel processing cuts data preparation time by over 60% compared to sequential processing.
  • Enhanced Accuracy: Prompt chaining reduces hallucinations by isolating specific domain questions (Performance, Risk, Liabilities, Growth) rather than asking for a single-pass summary.
  • Standardized Reporting: Transforms disparate, unstructured annual report PDFs into clean, interactive, and uniform executive HTML dashboards stored securely in S3.

Ask about my work

Ask about my career, education, projects, or blog posts.