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

Build your first generative AI application with Amazon Bedrock - AWS re:Invent re:Cap Medan 2024

Build your first generative AI application with Amazon Bedrock - AWS re:Invent re:Cap Medan 2024

Fikih Firmansyah

February 24, 2024
Tweet

More Decks by Fikih Firmansyah

Other Decks in Technology

Transcript

  1. Build your first generative AI application with Amazon Bedrock Universitas

    Pelita Harapan, 24 Februari 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1
  2. Introduction Fikih Firmansyah Backend Engineer at Xtend Indonesia © 2024,

    Amazon Web Services, Inc. or its affiliates. All rights reserved. 2
  3. Agenda • Introduction to generative AI • Amazon Bedrock •

    Demo • Use cases • Start your generative AI journey © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 3
  4. Generative AI © 2024, Amazon Web Services, Inc. or its

    affiliates. All rights reserved. 4
  5. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 5 Generative AI History
  6. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 6 Turn-back untuk implementasi Generative AI • Pertumbuhan data yang sangat besar • Ketersediaan kapasitas komputasi yang dapat diskalakan. • Inovasi machine learning.
  7. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 7 Apa itu Generative AI? AI yang dapat menghasilkan konten asli yang mirip dengan karya manusia untuk digunakan dalam tugas-tugas dunia nyata. Ditunjang oleh foundation models yang telah dilatih sebelumnya pada dataset besar dengan ratusan miliar parameter. Berlaku untuk banyak kasus penggunaan seperti text summarization, question answering, digital art creation, code generation, dan sebagainya.
  8. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Machine Learning, Deep Learning, Generative AI? 1. Artificial intelligence (AI) Teknik apa pun yang memungkinkan komputer meniru kecerdasan manusia dengan menggunakan logika, pernyataan if-else, dan pembelajaran mesin. 2. Machine learning (ML) Bagian dari kecerdasan buatan yang menggunakan mesin untuk mencari pola dalam data guna membangun model logika secara otomatis. 3. Deep learning (DL) Metode dalam machine learning yang menggunakan neural networks dengan banyak lapisan untuk mempelajari representasi data yang semakin kompleks. 4. Generative AI Sub bidang AI yang berkaitan dengan pengembangan sistem yang mampu menghasilkan konten baru dan realistis, seperti gambar, musik, atau teks, menggunakan teknik seperti Generative Adversarial Networks (GANs).
  9. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Complex Inputs Simple Outputs Deep learning Complex Inputs Complex Outputs Generative AI Simple Inputs Simple Outputs Machin e learning AI © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  10. © 2023, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Generative AI is powered by foundation models (FMs) Summarization Information extraction Q&A Chatbot Pretrain Adapt Tasks Unlabeled data Foundation model Traditional ML models Text generation Summarization Information extraction Q&A Chatbot Train Deploy Tasks ML models … … … … Labeled data … … … … © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Text generation Foundation models
  11. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tipe foundation models Text-to-text Generate text from natural language prompts Text-to-embeddings Generate numerical representation of text “Rangkuman artikel tentang dampak berjalan kaki terhadap kesehatan jantung” “foto seorang astronot menunggang kuda di mars” Multimodal Create and edit images using natural language prompts “sabun tangan” Representasi numerik dari "Isi ulang sabun tangan Dispenser sabun tangan Antibakteri sabun tangan” “Sepuluh ribu langkah per hari adalah optimal untuk menjaga kesehatan jantung” Input Output FM
  12. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Meningkatkan Produktivitas dengan aplikasi dan layanan Generative AI Menggunakan Data Sendiri di environments yang aman dan pribadi Mudah dengan foundation models terkemuka. Most performant, low cost infrastruktur untuk meningkatkan Generative AI Semua yang diperlukan untuk Implementasi Generative AI
  13. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Membangun aplikasi Generative AI merupakan hal yang menantang Customizing FMs Menjaga privasi dan keamanan data Mengakses beberapa Foundation Models dan versi yang lebih baru Menghubungkan ke sumber data Mengelola infrastruktur Membuat FMs untuk melaksanakan tugas
  14. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Bedrock Cara termudah untuk membangun dan menskalakan aplikasi Generative AI dengan Foundation Models Akses berbagai Foundation Models terkemuka melalui satu API Membuat agen yang menjalankan task yang kompleks dengan memanggil API secara dinamis. Sesuaikan Foundation Models secara pribadi menggunakan data Internal/Perusahaan sendiri. TERSEDIA SECARA UMUM Keamanan dan kepatuhan data Perluas kekuatan FM dengan data Internal/Perusahaan menggunakan Retrieval Augmented Generation (RAG)
  15. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Bagaimana cara kerja Amazon Bedrock? *Data tidak digunakan untuk meningkatkan foundation models dan tidak dibagikan dengan penyedia model pihak ketiga. Amazon Bedrock Cara termudah untuk membangun dan menskalakan aplikasi Generative AI dengan Foundation Models Pilih dari FMs terkemuka Akses berbagai FM teratas menggunakan satu API Sesuaikan dengan data Internal /Perusahaan* Menyempurnakan FM secara pribadi dengan data Internal. Menghubungkan sumber data Menghubungkan FM dengan sumber data untuk RAG Enable task execution Mengonfigurasi Agent untuk call API secara dinamis
  16. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Demo (Amazon Bedrock)
  17. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Data adalah pembeda. MENYESUAIKAN FOUNDATION MODELS SECARA PRIBADI MENGGUNAKAN DATA INTERNAL / PERUSAHAAN Sejumlah kecil data berlabel Memaksimalkan akurasi untuk tugas tertentu Fine-tune Tujuan Kebutuhan data
  18. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Foundation Models saja tidak dapat menjalankan task
  19. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Menggunakan foundation models to menyelesaikan task 1 Menetapkan instructions dan orchestration 2 Mengonfigurasi FMs untuk mengakses sumber data 3 Menyelesaikan actions dengan calling API 4 Manage cloud hosting and security
  20. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Agents for Amazon Bedrock MENGGUNAKAN APLIKASI GENERATIVE AI UNTUK MENYELESAIKAN TASK HANYA DALAM BEBERAPA LANGKAH CEPAT | Memecah dan mengatur tugas-tugas | | Mengakses dan mengambil data perusahaan dengan aman | | Melakukan actions dengan menjalankan panggilan API | | Menyediakan infrastruktur yang dikelola sepenuhnya | Pilih Foundations Models Berikan instruksi dasar Pilih sumber data yang relevan Tentukan actions yang tersedia 1 2 3 4
  21. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Knowledge base for Amazon Bedrock MENGGUNAKAN RETRIEVAL AUGMENTED GENERATION (RAG) Menghubungkan FMs ke sumber data termasuk vector engine pada Amazon OpenSearch Serverless, Pinecone, dan Redis Enterprise Cloud Mengaktifkan deteksi sumber data otomatis Memberikan kutipan/citation ANSWER Q U E S T I O N VECTOR DATABASE BEDROCK FOUNDATION MODEL
  22. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Demo (Agent for Amazon Bedrock)
  23. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Sample architecture App users Apps Calculator Load Transactions Geolocator Service (ext.) API Services Internal data repositories Client query (prompt) Response Agents for Amazon Bedrock Prompt Response Knowledge Bases for Amazon Bedrock Amazon Bedrock Foundational Model Task orchestration read data from repositories
  24. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Your customization journey Prompt Engineering Retrieval Augmented Generation (RAG) Fine-tuning Customization, Complexity, and Cost
  25. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Inference options On-demand Pay-as-you-go, no commitment • Penetapan harga berdasarkan jumlah token input dan output untuk FMs. • Cocok untuk pembuatan prototipe, POC, beban kerja kecil dengan persyaratan yang lebih longgar untuk throughput dan latency. • Permintaan per menit (RPM) dan batas token per menit (TPM) diberlakukan. Provisioned throughput Menyediakan throughput yang cukup untuk memenuhi performance requirements. • Hasil yang stabil dengan biaya tetap, • Hasil produksi yang lebih tinggi tersedia • Jangka waktu komitmen yang fleksibel 1 bulan atau 6 bulan. • Bayar tarif per jam, diskon untuk perpanjangan berkomitmen. • Cocok untuk beban kerja produksi, atau pada model khusus
  26. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. • Konektivitas pribadi antara Amazon Bedrock dan Amazon Virtual Private Cloud (Amazon VPC) • Data selalu dienkripsi saat transit dan saat tidak aktif, dan juga dapat menggunakan kunci untuk mengenkripsi data • Dukungan untuk standar, termasuk kepatuhan GDPR dan Kelayakan HIPAA • Data Internal/Perusahaan tidak digunakan untuk meningkatkan Foundation Models dan tidak dibagikan dengan penyedia model pihak ketiga Security and privacy
  27. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. • Kemampuan pemantauan dan pencatatan yang komprehensif. • Gunakan Amazon CloudWatch untuk melacak metrik penggunaan dan membangun dasbor. • Gunakan AWS CloudTrail untuk memantau aktivitas API dan troubleshoot issues. • Menyimpan metadata, request, dan response dalam bucket Amazon Simple Storage Service (Amazon S3) Governance and auditability
  28. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Creativity and content creation Writing Media Design Modeling Improve business operations Document processing Process optimization Cybersecurity Data augmentation Enhance customer experience Chatbots Virtual assistants AI-powered contact center Personalization Boost employee productivity Conversational search Summarization Code generation Data to insights Use cases
  29. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Industry use cases Financial services Retail Healthcare and life sciences Telecom Automotive Energy Manufacturing Travel and hospitality Media and entertainment Consumer packaged goods
  30. Thank you Fikih Firmansyah © 2024, Amazon Web Services, Inc.

    or its affiliates. All rights reserved. 31