Transforming Clinical Note Generation:
Scalable Migration from OpenAI to AWS Bedrock

Business Problem

  • Lack of control and flexibility in the existing OpenAI-powered prompt orchestration.
  • Inconsistent clinical note structures and accuracy challenges in generated outputs.
  • No error handling or benchmarking for validating the results.
  • Inability to support multi-agent logic or scalable prompt chaining workflows.
  • Existing system lacked robust monitoring and compliance-ready infrastructure.

About

Mariana.AI is a cutting-edge healthcare innovation company focused on automating clinical documentation and patient engagement. To modernize its systems, Mariana.AI partnered with goML to migrate its clinical note generation and medical coding workflows from OpenAI to AWS Bedrock. The goal was to enhance performance, improve prompt engineering, and establish a scalable, compliant backend for future expansion into real-time and voice-based clinical support.

Explore Now

Solution

goML proposed a 4-week AWS-native PoC leveraging Claude Sonnet 3.5 on AWS Bedrock, integrated via Portkey and Langchain for advanced multi-agent prompt orchestration. The solution automates clinical note generation and medical coding workflows with strong schema validation and performance monitoring.

Architecture

  • User Access & Security
    • IAM, Security Analyzer, AWS Shield: Provides user-level and infrastructure-level protection.
    • Secured Token Access: Ensures only authorized access to sensitive client data.
  • Data Layer & Knowledge Creation
    • Client Database: Stores customer data.
    • Docker + CI/CD: Code is deployed securely through a CI/CD pipeline.
    • Data Preprocessing & Knowledge Base Creation: Raw data is cleaned and structured for vectorization and AI processing.
  • Vectorization & Storage
    Vectorizer + Worker AI: Transforms processed data into vector embeddings.
    OpenSearch Vector DB: Stores vectorized content for semantic search and retrieval.
  • RAG (Retrieval Augmented Generation) Pipeline
    • Uses the vector DB to fetch relevant context and augment prompts.
    • Powers responses in the consumption layer (agents, chatbots).
  • AI Agent Ecosystem
    • Multiple Lambda-based AI Agents, each specialized in medical domains:
    – Oncology, Gastroenterology, Urology, Cardiology, Geriatrics, Dermatology, Neurology, Orthopedics.
    • These agents are powered by Claude 3.5 Sonnet via Amazon Bedrock, ensuring domain-specific insights.
  • Validation & Explainability
    • Explainability Validator: Ensures the clinical relevance and traceability of AI responses.
    • Chief Medical Officer Agent: A higher-order agent to review and approve outputs.
  • User Interaction & Output Handling
    • CloudFront + Nginx: Manages user-facing endpoints.
    • FAQ Chatbot & Document Generator: Provides two modes of interaction.
    • Query Processing → API Gateway → Agents: Routes user inputs for processing via Portkey and Bedrock.
  • Storage & Monitoring
    • S3 Bucket: Stores generated documents and clinical validations.
    • CloudWatch: Logs system activities and metrics.
    • SNS + Security Modules: Provides notifications and alerting with AWS-native security posture.
Transforming Clinical Note Generation: Scalable Migration from OpenAI to AWS Bedrock
Outcomes

0%

Prompt Migration completed from OpenAI to
Claude Sonnet 3.5 via Bedrock

0%

Reduction in manual validation efforts through
automated schema checks

0%

Improvement in structured output accuracy
for clinical notes

0%

Prompt Consistency on predefined
templates