Create AI apps with RAG model on AWS using FSx for NetApp ONTAP and Amazon Bedrock

SeniorTechInfo
3 Min Read

Revolutionizing Generative AI Applications with Amazon FSx for NetApp ONTAP and Amazon Bedrock

The post is co-written with Michael Shaul and Sasha Korman from NetApp.

Generative artificial intelligence (AI) applications are commonly built using a technique called Retrieval Augmented Generation (RAG) that provides foundation models (FMs) access to additional data they didn’t have during training. This data enriches the generative AI prompt to deliver more context-specific and accurate responses without continuously retraining the FM, while also improving transparency and minimizing hallucinations.

In this post, we introduce a cutting-edge solution that leverages Amazon FSx for NetApp ONTAP in conjunction with Amazon Bedrock to provide a RAG experience for generative AI applications on AWS. This innovative approach brings company-specific, unstructured user file data to Amazon Bedrock in a straightforward, fast, and secure manner.

Solution Overview

The solution provisions an FSx for ONTAP Multi-AZ file system with a storage virtual machine (SVM) joined to an AWS Managed Microsoft AD domain. An OpenSearch Serverless vector search collection provides a scalable and high-performance similarity search capability. The solution also implements a RAG Retrieval Lambda function that enriches the generative AI prompt using Amazon Bedrock APIs with company-specific data retrieved from OpenSearch Serverless.

With the use of AWS serverless services, such as AWS Lambda and Amazon API Gateway, the solution enables automatic scaling, event-driven compute, and API interfaces for seamless integration with generative AI applications. The diagram below illustrates the end-to-end flow of our innovative solution:

End-to-End Solution Diagram

Prerequisites

Before deploying the solution, ensure you have the following prerequisites:

  1. Access to Amazon Bedrock using Anthropic Claude v3 Sonnet
  2. Installation of AWS Command Line Interface (CLI)
  3. Installation of Docker
  4. Installation of Terraform

Deploy the Solution

The solution code is available on the GitHub repository. Simply clone the repository and deploy the solution using the provided Terraform template.

  1. Clone the repository and navigate to the Terraform folder:
  2. sudo yum install -y unzip
    git clone https://github.com/aws-samples/genai-bedrock-fsxontap.git
    cd genai-bedrock-fsxontap/terraform
  3. Deploy the solution using Terraform:
  4. terraform init
    terraform apply -auto-approve

Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *