The Art of Designing Bedrock Agents: Parallels with Traditional API Design
Learn how time-tested API design principles are crucial in building robust Amazon Bedrock Agents and shaping the future of AI-powered agents.
Explore the basics of GenAI, the necessary skills needed to utilize it, resources you need to build your own AI apps, and how to use Amazon Bedrock to reduce the initial investments towards getting started.
There’s a huge demand right now for generative AI apps, and they have the potential to revolutionize many industries - but how do you get started with minimal upfront investment?
In this blog post, we will discuss the basics of GenAI and what skills you will need to get started. We will also introduce Amazon Bedrock, the new managed service AWS offers in this space.
Generative AI is a rapidly growing field of artificial intelligence that is capable of generating new content, including text, images, audio, and video. This technology has the potential to revolutionize many industries, from healthcare to manufacturing to entertainment.
This innovative form of AI works by using data models to learn the patterns and relationships in existing data. Once the model has learned these patterns, it can be used to generate new data that is similar to the original data. For example, a model trained on a dataset of text can be used to generate new text, such as poems, code, or scripts.
There are many potential use cases, some of the most promising include:
A recent survey by PWC found that 70% of executives believe that AI has the potential to add as much as $15.7 trillion to the worldwide economy by 2030. Out of this sum, around $6.6 trillion might be attributed to enhanced productivity, while about $9.1 trillion could arise from effects on the consumer side.
McKinsey estimates that this technology could add $4.4 trillion of value to the economy by 2030. This growth is being driven by the increasing availability of data, the advances in machine learning algorithms, and the growing demand for AI-powered applications.
This powerful new technology has the potential to revolutionize many industries, however there are still challenges that need to be addressed such as:
With that said, the benefits of generative AI are being widely recognized and are likely to have a major impact for organizations willing to innovate.
Building AI apps is a great way to introduce new functionality and product value to your customers through personalization, automation, improved decision making, or new product development. These apps can be standalone with a targeted use case, or embedded into a larger platform to extend their capabilities.
To build your own AI apps, you will need the following:
Amazon Bedrock is a serverless service that makes it easy to adopt and customize foundation models with your own data. You can use AWS tools and services, such as AWS Lambda, Amazon SageMaker AI, Amazon Kendra, and Amazon OpenSearch Vector Store, to create applications like chatbots, document processors, and document generators.
AWS is regularly adding new large language models to Bedrock, such as the Claude 2 and Stable Diffusion XL 1.0 models. They are also adding new foundation model providers, such as Titan, AI21 Labs, and Stability AI. In the future, we can expect to see new tools and services built on Bedrock, such as:
Amazon Bedrock offers many advantages to application developers to ease the burden of infrastructure management, application development, and scaling to meet your needs. Some of these benefits include:
When deciding to develop applications backed by generative AI, there will be several challenges that you will need to consider. These challenges can be both technical and non-technical in nature. They will require legal considerations and technical expertise related to Data Science, ML Ops, and data preparation. Additionally, you will need to consider the time investment required to identify the optimal model, train and tune that model, operationalize it, and finally monitor it. This cyclical process can take many iterations to reach a state that meets your application’s needs.
The following are some examples of the challenges that you may encounter and how you might go about resolving them:
Challenge: Legal and ethical concerns exist about the ownership of the content generated by models.
Solution: There is no “one size fits all” solution currently, as this is a complex subject, and it is constantly evolving. That doesn’t mean that you can’t navigate this challenge effectively. Some considerations that need to be considered are transparency, accountability, and consent. Being transparent about how you use generative AI is more than simply saying you are using it. You should also be clear about how you manage the generated content and what sources contribute to the model training. Being accountable for the content generated means constantly monitoring the content for bias, harmful or derogatory output, and accuracy. AI is not perfect and can sometimes make up answers to questions even if it doesn’t know the answer, also known as the hallucination problem. Finally, you need to receive consent from your users to use their information in model training.
—
Challenge: Getting high-quality data to train your model(s)
Solution: Data for model training is critical as the quality of a model’s output is tied to the quality of the data used to train it, also known as GIGO or “Garbage In, Garbage Out.” You can manage this using already prepared datasets like those on the AWS Data Exchange or datasets procured from other available public or private sources. You must be sure however that you are using the data in a way that aligns with any licensing requirements, or business regulations. Additionally, you can incorporate in-house data, which requires a heavy focus on having a governed data platform that constantly monitors and validates the quality of the data, the transformations that occur, and the lineage while also having processes in place to manage any issues that may arise in the data preparation, transformation, movement, and storage.
—
Challenge: Generative AI Solutions, even when using managed services like Amazon Bedrock, require specialized skills to develop and maintain. Not all businesses have these skills in-house.
Solution: There are a couple of reasonably straightforward solutions to this problem. You can hire new employees or contractors with the skillset, though be prepared to pay a premium as skills on the leading edge of technology tend to command higher pay. You can train existing team members, though be aware of the time commitment and set expectations that you need to have Data Scientists or Machine Learning Engineers on staff to avoid a steep learning curve. And lastly, you can find a company that offers services that support these solutions’ development, deployment, and integration.
As with many of the AWS services, you can expect regular updates to the features and functionality of Amazon Bedrock. As of the writing of this article, it is still in preview, which means access is limited, requiring you to sign up.
What makes Amazon Bedrock so accessible to app developers is its growing list of foundation models that are accessible via API, allowing coverage of multiple different use cases:
Titan by Amazon: a 175B parameter LLM trained on text and code. This model is designed to be a general-purpose language model. You can use it for various tasks, including text summarization, question answering, code generation, translation, and text generation, including creative text formats and content (emails, letters, poetry).
Jurassic-2 by AI21 Labs: a 178B parameter LLM trained on text and code. It is also designed to be a general-purpose language model that can be used for tasks including text summarization, question answering, code generation, translation, and text generation including creative text formats and content (emails, letters, poetry).
Claude 2 by Anthropic: a 137B parameter LLM trained on text and code specifically designed to be informative and comprehensive. This model is designed to be a factual language model, which excels in answering factual questions, summarizing factual text, and extracting information from text.
Command and Embed by Cohere: two LLM models designed to work together. Command is a 137B parameter LLM trained to follow instructions. In comparison, Embed is a 10B parameter LLM trained to understand the meaning of text. These two models are used together for tasks that incorporate instructions such as chatbots, answering questions, and generating text content.
Stable Diffusion XL 1.0 by Stability.ai: a 1.5B parameter LLM trained on text and code that describes images. This model is designed for image generation and can generate realistic images from text descriptions and apply artistic styles.
With these valuable models, you can cover almost any generative AI feature you want to include in your application(s). There is also more to Bedrock than calling an API; you can expand on the quality of output by incorporating Retrieval Augmented Generation or RAG, which will extend the content used to derive responses to an internal or external knowledge base, allowing your answers to be more customized to your business case or organization. Finally, you can accelerate the delivery of front-ends by incorporating Conversational Agents, which provide a fully managed service that allows developers a no-code approach to orchestrating a series of tasks, such as calling APIs to improve responses, that has the advantage of automating tasks that can be performed as part of a request to Bedrock.
The generative AI boom is just starting, and it will be vital for your organization to stay ahead of the competition by identifying opportunities to use it to your advantage. We have provided an overview of what it is, what skills you will need to utilize it, and how to use the Amazon Bedrock services to minimize the up-front investment to get started. Only some organizations are prepared to tackle this new technology, and that is where companies like Caylent can help you by working with your team(s) to formulate your generative AI strategy on AWS. With our team of data and AI experts, we can assist with all aspects of your strategy, whether that includes modernizing your data platform, implementing governance initiatives, or delivering prototypes incorporating AWS services like Amazon Bedrock.
References:
Leveraging our accelerators and technical experience
Browse GenAI OfferingsAs a Director for Caylent's Cloud Data Engineering practice, Chad leads some of the best and brightest thought leaders in Data and Analytics. He has orchestrated transformative initiatives and product launches around AWS services to modernize organizations' data infrastructure while helping them realize competitive advantages through the use of their data. Throughout his almost 20-year career in technology, Chad's passion for the inherent value of data has led to success as a Data and Software Engineer and Leader, Program Manager, and Agile Coach, where he has used data-driven approaches to foster collaborative cultures and guide teams to exceptional project outcomes across the Media, Finance, Education, and Services industries.
View Chad's articlesLearn how time-tested API design principles are crucial in building robust Amazon Bedrock Agents and shaping the future of AI-powered agents.
Learn how to build and implement an intelligent GenAI-powered voice agent that can handle real-time complex interactions including key design considerations, how to plan a prompt strategy, and challenges to overcome.
Learn how AWS technologies help healthcare providers, payers, and healthtech organizations enhance patient care, streamline operations, and secure data with advanced cloud solutions.