Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS Serverless e Amazon Bedrock com bases de co...

weder96
February 12, 2025

AWS Serverless e Amazon Bedrock com bases de conhecimento, usando dados privados

AWS Serverless e Amazon Bedrock com bases de conhecimento, usando dados privados

weder96

February 12, 2025
Tweet

More Decks by weder96

Other Decks in Programming

Transcript

  1. Why Watch this talk? Cloud is the future Artificial Intelligence

    is the future Infrastructure as code is the future Your future is built in the present Serverless is the future
  2. Weder Mariano de Sousa Post Graduate in Midias UFG https://www.linkedin.com/in/wedermarianodesousa/

    AWS User Group Goiânia https://github.com/weder96 GOJava About the Speaker Specialist Senior Java - GFT Graduated Computer Science https://twitter.com/weder96 Post Graduate in Information Security https://dev.to/weder96 Technician System Development Serverless
  3. Agenda 1. Generative Artificial Intelligence (Gen AI) 2. Architecture AWS

    Bedrock 3. What is RAG (Retrieval-Augmented Generation)? 4. What will we build? 5. Knowledge bases 6. Deploy Infra and Application with CDK 7. AWS CDK For Java and Python 8. Next Steps
  4. Generative Artificial Intelligence (Gen AI) Generative artificial intelligence (Gen AI)

    refers to a subfield of artificial intelligence that focuses on creating systems capable of generating new, original content, such as text, images, music, or videos. Unlike traditional AI systems, which analyze and process existing data, Gen AI uses algorithms to produce novel outputs. This field has various applications, including language translation, image synthesis, and content creation. Google's researchers have made significant contributions to Gen AI, exploring its potential in tasks like generating human-like conversations and creating realistic multimedia content. The technology is still in its early stages of development. Generative artificial intelligence (Gen AI) is rapidly reshaping our world. According to McKinsey, Gen AI's influence on productivity might contribute trillions of dollars in value to the global economy annually. All industries have the opportunity to benefit from its capabilities, with new applications emerging daily. Gen AI is poised to have a profound effect on human life across a wide spectrum of sectors, including healthcare and life sciences. While its potential is undeniable, many organizations are still in the process of exploring possibilities and figuring out how to effectively integrate Gen AI to create meaningful impacts within their businesses. Gen AI is a powerful tool for business innovation. It is used to design new products, services, and solutions that satisfy customer needs and increase revenue. INCREASE REVENUE DECREASE COSTS ATTRACT AND RETAIN CUSTOMERS Gen AI is useful when applied to business optimizationopportunities. It can help automate tasks, improve efficiency, and reduce errors that cost time and money. Gen AI improves engagement through personalized experiences. This leads to attracting new customers along with an increase in brand loyalty and customer lifetime value.
  5. INPUTS COMPLEX OUTPUTS SIMPLE INPUTS COMPLEX OUTPUTS COMPLEX INPUTS SIMPLE

    OUTPUTS SIMPLE DEEP LEARNING FOUNDATION MODELS MACHINE LEARNING
  6. The easiest way to build and scale generative AI applications

    with foundation models Amazon Summarization, complex reasoning, writing, coding Contextual answers, summarization, paraphrasing High-quality images and art Text generation, search, classification Q&A and reading comprehension Text summarization, generation, Q&A, search, image generation Amazon Titan Text Premier Amazon Titan Text Lite Amazon Titan Text Express Amazon Titan Text Embeddings Amazon Titan Text Embeddings V2 Amazon Titan Multimodal Embeddings Amazon Titan Image Generator Claude 3 Opus Claude 3 Sonnet Claude 3 Haiku Claude 2.1 Claude 2 Claude Instant Llama 3 8B Llama 3 70B Llama 2 13B Llama 2 70B Command Command Light Embed English Embed Multilingual Command R+ Command R Stable Diffusion XL1.0 Stable Diffusion XL 0.8 Jurassic-2 Ultra Jurassic-2 Mid Mistral Large Mistral 7B Mixtral 8x7B Text summarization, Q&A, text classification, text completion, code generation
  7. How does a foundation model work? Data Text Images Speech

    Structured data 3D signals Pre-train *can take weeks or even months Fine-tune for specific tasks and domains *can take hours Gather data at scale Evaluate model Foundation model
  8. Amazon Bedrock Serveless Basic Architecture AWS Cloud AWS Lambda Amazon

    API Gateway Amazon Bedrock statics Pages Amazon S3 Statics Pages Text Generation Users
  9. Advantages of the Serverless Approach AWS Cloud Client Authenticate User

    Lambda function Extract Document Metadata Amazon S3 Statics Pages AWS Amplify Hosting React Application Amazon API Gateway Amazon Cognito Amazon SQS Queue Lambda function Embed Documents Amazon Bedrock Amazon DynamoDB Conversation Memory Lambda function Generate LLM Response Lambda function CRUD Operations Dump vector index Upload Document Get LLM Response Get vector Dump Get Conversation memory
  10. Advantages of the Serverless Approach Amplify Login Lambda function Amazon

    API Gateway Amazon Cognito Amazon Bedrock Get Answer U s er s Amazon S3 Amazon CloudFront origins use Amazon Polly text-to-speech React Voice By Microphone
  11. Architecture(ECS and Fargate) with Bedrock by Rossana Suarez AWS Cloud

    AWS Lambda ../kb_synchronizer.py Amazon Bedrock Knowledge Bases Amazon S3 (KB Source) https://github.com/aws-samples/well-architected-iac-analyzer Amazon S3 (Iac Templates) AWS Fargate (Amazon ECS) Applicatin Load Balancing Amazon Bedrock AWS Well-Architected Whitepapers AWS Well-Architected Tools ../wa_genal_iac_analyzer.py
  12. What is RAG (Retrieval-Augmented Generation)? In Technology there is a

    name that I consider a Genius and at the same time a visionary, who would this person be?
  13. What is RAG (Retrieval-Augmented Generation)? Linus Benedict Torvalds (Helsínquia, 28

    de dezembro de 1969) é um engenheiro de software, nascido na Finlândia e naturalizado estado-unidense em 2010 C r i a d o r, e p o r m u i t o t e m p o o desenvolvedor mais importante do núcleo Linux, sendo utilizado em importantes sistemas Linux, Android e Chrome OS. É também o criador do Git, sistema de c o n t r o l e d e v e r s ã o a m p l a m e n t e u t i l i z a d o , e o a p l i c a t i v o p a r a planejamento e registro de mergulho, Subsurface.
  14. AI A p p l i c a t i

    o n A r c h i t e c t u r e - RAG ? Argument Prompt Vector Store LLM Application https://triggo.ai/blog/o-que-e-retrieval-augmented-generation/
  15. Conceptual Flow of using RAG with LLMs Search Relevant Information

    Prompt + Query Prompt + Query + Enhanced Context Query Large Language Model EndPoint Knowledge Sources Generate Text Response Relevant Information Enhanced context 4 2 3 5 https://aws.amazon.com/pt/what-is/retrieval-augmented-generation/ 1
  16. Runtime Execution(Bedrock) https://docs.aws.amazon.com/bedrock/latest/userguide/kb-how-it-works.html Vector DB Text Model User Query Generate

    Embeddings Embedding Model Retrieve similar documents Argument User Query with retrieved documents Respond to User
  17. Amazon Bedrock Serveless Architecture AWS Cloud AWS Lambda Amazon API

    Gateway anthropic.claude-3- sonnet Files (Text) Amazon S3 DataSources Text Prompt Users Amazon OpenSearch Service Amazon Bedrock Knowledge Bases Titan Text Embeddings V2 Amazon Bedrock Knowledge Bases CDK(Java)
  18. Getting started Get started with Amazon Bedrock Discover features with

    a step-by-step tutorial Dive deep with a hands-on workshop
  19. Resources #Links (BedRock) https://www.ranthebuilder.cloud/post/automating-api-calls-with-agents-for-amazon-bedrock-with-powertools https://www.slightinsight.com/tech/developing-a-spring-boot-application-with-amazon-bedrock-api/ https://community.aws/content/2dhKdwyY1kzhFTg9CTLbaJ9MmTN/build-generative-ai-applications-with-amazon-bedrock https://www.eficode.com/blog/building-ai-on-aws-bedrock-brings-brilliant-building- blocks?utm_campaign=AWS&utm_content=189323971&utm_medium=social&utm_source=twitter&hss_channel=tw- 142208607 https://cloudacademy.com/learning-paths/integrating-aws-services-with-llms-and-other-fms-14068/

    https://www.youtube.com/watch?v=CE_-zrMvcuk&list=PLhr1KZpdzukfmv7jxvB0rL8SWoycA9TIM&index=5 https://programadriano.medium.com/conhecendo-o-amazon-bedrock-c687c7e9777f https://github.com/AWS-Cloud-Drops-Builders-Edition/show?tab=readme-ov-file https://levelup.gitconnected.com/ai-powered-video-summarizer-with-amazon-bedrock-and-anthropics-claude-9f1832f397dc https://catalog.workshops.aws/persona-based-access-genai-application/en-US/04-testing-application/01-updating-code https://dev.to/aws-builders/have-fun-with-aws-partyrock-3755 https://dev.to/aws-builders/build-serverless-generative-ai-api-service-with-aws-lambda-and-amazon-bedrock-3abc https://norahsakal.medium.com/how-to-use-aws-titans-ai-multimodal-embeddings-for-better-e-commerce- recommendations-b9f4adb60c02 #Importante https://www.linkedin.com/pulse/aplica%C3%A7%C3%B5es-serverless-llm-com-amazon-bedrock-diogo-santos-yjo3f/ https://aws.amazon.com/pt/blogs/aws-brasil/crie-aplicativos-de-ia-generativa-usando-o-aws-step-functions-e-o-amazon- bedrock/ https://community.aws/generative-ai https://aws.amazon.com/pt/what-is/retrieval-augmented-generation/
  20. https://cdkworkshop.com https://github.com/aws-samples/aws-cdk-examples Resources https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html https://aws.amazon.com/pt/developer/language/java/ https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/setup-toolkit.html https://aws.amazon.com/pt/intellij/ https://docs.aws.amazon.com/code-library/latest/ug/java_2_code_examples.html https://docs.aws.amazon.com/pt_br/prescriptive-guidance/latest/patterns/deploy-a-ci-cd- pipeline-for-java-microservices-on-amazon-ecs.html

    https://docs.aws.amazon.com/lambda/latest/dg/lambda-java.html https://aws.amazon.com/pt/blogs/compute/java-17-runtime-now-available-on-aws-lambda/ https://www.slideshare.net/AmazonWebServices/java-on-aws https://www.jrebel.com/blog/aws-java-application-setup https://www.slideshare.net/VadymKazulkin/adopting-java-for-the-serverless-world-at-jax- 2022 https://towardsaws.com/deploy-spring-boot-application-to-aws-ec2-using-docker- f359e7ad2026 https://aws.amazon.com/pt/blogs/developer/stepfunctions-fluent-api/ https://aws.amazon.com/blogs/compute/java-17-runtime-now-available-on-aws-lambda/ https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
  21. Weder Mariano de Sousa Post Graduate in Midias UFG https://www.linkedin.com/in/wedermarianodesousa/

    AWS User Group Goiânia https://github.com/weder96 GOJava About the Speaker Specialist Senior Java - GFT Graduated Computer Science https://twitter.com/weder96 Post Graduate in Information Security https://dev.to/weder96 Technician System Development Serverless Q & A