Use AWS Generative AI CDK constructs to speed up app development
Assemble and deploy the infrastructure for a RAG solution using AWS CDK for Python
- Knowledge Bases for Amazon Bedrock: This is the foundation for the RAG solution.
- OpenSearch Serverless collection: It supports the vector search collection type that provides similarity search capability.
- An S3 bucket: This will act as the data source for the Knowledge Base.
- AWS Lambda function (written in Python) along with an API Gateway that uses the RetrieveAndGenerate API to query the knowledge base and generate responses from the information it retrieves.

- L1 constructs are the lowest-level construct and offer no abstraction. Each L1 construct maps directly to a single AWS CloudFormation resource.
- L2 constructs provide a higher-level abstraction along with helper methods for most resources that make it simpler to define resources.
- L3 constructs, also known as patterns, are the highest-level of abstraction, and are used to create entire AWS architectures for particular use cases in your application.

/query
at the end of the API Gateway URL. I had uploaded the Amazon 2022 shareholder document and asked the following question: "What is Amazon doing in the field of generative AI?"RetrieveAndGenerate
API:query
endpoint:Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.