Aetion developed a Measures Assistant to help healthcare professionals translate complex scientific queries into actionable analytics measures using generative AI. By implementing Amazon Bedrock with Claude 3 Haiku and a custom RAG system, they created a production system that allows users to express scientific intent in natural language and receive immediate guidance on implementing complex healthcare data analyses. This reduced the time required to implement measures from days to minutes while maintaining high accuracy and security standards.
Aetion's implementation of LLMs in production represents a sophisticated approach to solving a complex healthcare analytics challenge. This case study demonstrates how careful consideration of model selection, architecture, and guardrails can create a robust production system that maintains both performance and reliability.
## Company and Use Case Overview
Aetion is a healthcare software provider that specializes in generating real-world evidence for medications and clinical interventions. Their platform serves major pharmaceutical companies, regulatory agencies, and healthcare payers. The specific challenge they addressed was the need to translate complex scientific queries about patient data into technical measures within their analytics platform. Previously, this required specialized training and support staff, often taking days to implement.
## Technical Implementation
The solution architecture combines several key LLMOps practices and technologies:
### Model Selection and Infrastructure
* They chose Amazon Bedrock as their primary LLM infrastructure, specifically selecting Anthropic's Claude 3 Haiku model after evaluation of alternatives
* The system is deployed as a microservice within a Kubernetes on AWS environment
* All data transmission uses TLS 1.2 encryption, showing strong attention to security requirements in healthcare
### Prompt Engineering and Knowledge Integration
Their prompt engineering approach uses a sophisticated hybrid system:
* Static templates providing core instructions and guardrails
* Dynamic components that incorporate relevant question-answer pairs based on semantic similarity
* Integration of AEP documentation and measure-specific knowledge
* In-context learning through carefully selected examples
### RAG Implementation
They implemented a streamlined RAG system using:
* A local knowledge base containing expert-validated question-answer pairs
* Fine-tuned Mixedbread's mxbai-embed-large-v1 Sentence Transformer for generating embeddings
* Cosine similarity calculations for matching user queries to relevant examples
* Continuous refinement of the knowledge base through expert testing and validation
### Production Safeguards
The system includes several important production safeguards:
* Guardrails ensuring responses align with valid AEP operations
* Expert-curated knowledge base to compensate for potential model reasoning errors
* Secure API communication pathways
* Human-in-the-loop validation for knowledge base updates
### System Integration
The Measures Assistant is deeply integrated into their existing platform:
* REST API interface for seamless integration with their main application
* Stateful conversation handling to maintain context
* Integration with their existing data transformation pipeline
* Real-time response generation for interactive use
## Operational Considerations
The production deployment shows careful attention to several key operational aspects:
### Performance and Scaling
* The system is designed to handle real-time interactions
* Kubernetes deployment enables flexible scaling
* Local knowledge base approach reduces latency compared to full RAG implementations
### Quality Assurance
* Continuous testing by subject matter experts
* Feedback loop for improving the knowledge base
* Validation of generated measures against known good implementations
### Security and Compliance
* Healthcare-grade security measures throughout
* Encrypted data transmission
* Controlled access to sensitive information
## Results and Impact
The implementation has achieved significant operational improvements:
* Reduction in measure implementation time from days to minutes
* Elimination of the need for specialized support staff for many common queries
* Maintained accuracy through careful guardrails and knowledge base integration
* Improved user experience through natural language interaction
## Lessons and Best Practices
Several key lessons emerge from this implementation:
### Model Selection
* Choosing the right model balance between performance and cost (Claude 3 Haiku in this case)
* Using Amazon Bedrock for simplified model access and management
### Knowledge Integration
* Hybrid approach combining static and dynamic knowledge
* Importance of expert validation in knowledge base construction
* Continuous refinement based on real usage
### Production Architecture
* Microservice architecture for flexibility
* Strong security measures throughout
* Integration with existing systems and workflows
### Quality Control
* Multiple layers of guardrails
* Expert validation processes
* Continuous monitoring and improvement
This case study demonstrates how careful attention to LLMOps best practices can create a robust production system that delivers real business value while maintaining high standards of accuracy and security. The combination of modern LLM technology with domain-specific knowledge and proper operational controls has enabled Aetion to significantly improve their user experience while maintaining the rigorous standards required in healthcare analytics.
Start your new ML Project today with ZenML Pro
Join 1,000s of members already deploying models with ZenML.