Generative AI Applications with Large Language Models
Generative artificial intelligence (AI) applications built around large language models (LLMs) have shown great potential in creating economic value for businesses. These applications cover a wide range of areas including conversational search, customer support, virtual assistants, content moderation, software development, security investigations, and more. As businesses explore the development of generative AI applications, it is essential to address security, privacy, and compliance concerns. By understanding and mitigating vulnerabilities, threats, and risks associated with LLMs, teams can maximize the benefits of generative AI while ensuring transparency and trust.
This post aims to provide guidance to AI/ML engineers, data scientists, solutions architects, security teams, and other stakeholders involved in developing generative AI applications using LLMs. It offers a common mental model and framework for applying security best practices, allowing teams to prioritize security without compromising speed. The post also discusses common security concerns identified by OWASP for LLM applications and demonstrates how AWS can enhance security posture and confidence in generative AI innovation.
Architecting Risk Management Strategies for Generative AI Applications
The post outlines three guided steps for architecting risk management strategies while developing generative AI applications using LLMs. It begins by exploring vulnerabilities, threats, and risks associated with LLM solutions during implementation, deployment, and use. It provides guidance on how to start innovating with security in mind. The post then emphasizes the importance of building on a secure foundation for generative AI. Finally, it presents an example LLM workload to illustrate an approach to architecting defense-in-depth security across trust boundaries.
By the end of the post, AI/ML engineers, data scientists, and security-minded technologists will be equipped with strategies to implement layered defenses, map OWASP Top 10 for LLMs security concerns to corresponding controls, and enhance security and privacy controls throughout the development lifecycle. The post also addresses common customer questions related to security and privacy risks, implementation of controls, and integration of operational and technical best practices.
Improving Security Outcomes for Generative AI Development
Developing generative AI with LLMs requires a security-first approach to build organizational resiliency and incorporate defense-in-depth security. Security is a shared responsibility between AWS and its customers, and the principles of the AWS Shared Responsibility Model apply to generative AI solutions. Organizations should prioritize security and compliance objectives throughout the entire lifecycle of generative AI applications, from inception to deployment and use.
Organizational resiliency is crucial for generative AI applications. Five of the top 10 risks identified by OWASP for LLM applications necessitate architectural and operational controls at an organizational scale. Organizations should foster a culture where AI, ML, and generative AI security are considered core business requirements. It is essential to extend existing security, assurance, compliance, and development programs to account for generative AI. This includes understanding the AI/ML security landscape, incorporating diverse perspectives in security strategies, taking proactive action for securing research and development activities, aligning incentives with organizational outcomes, and preparing for realistic security scenarios.
Threat Modeling and Organizational Resiliency
Threat modeling plays a vital role in the planning, development, and operations of generative AI workloads. Organizations should focus on risk management rather than risk elimination and develop a threat model for each application. This includes identifying acceptable risks and implementing foundational and application-level controls accordingly. Organizations should plan for rollback and recovery from security events and disruptions specific to generative AI, such as prompt injection, training data poisoning, model denial of service, and model theft. Understanding these risks and controls will inform the implementation approach and enable informed decision-making.
For those unfamiliar with the AI and ML workflow, it is recommended to review security controls for traditional AI/ML systems. Building a generative AI application involves going through various research and development lifecycle stages. The AWS Generative AI Security Scoping Matrix can assist in understanding the key security disciplines based on the selected generative AI solution.