GenAI with Stock Trading Website (Module 2)

Hui Yee Leong
3 min readJul 10, 2024

--

Module 2: Enable Bedrock

In this module, we will enable AWS Bedrock, which will enhance our search capabilities by providing additional data processing and insights. AWS Bedrock is a fully managed service that simplifies the process of building, training, and deploying machine learning models at scale.

Step 1: Set Up Bedrock

2.1 Introduction to AWS Bedrock

AWS Bedrock is designed to streamline the process of integrating advanced machine learning capabilities into your applications. By using Bedrock, you can easily enhance the search capabilities of Amazon Kendra, providing more accurate and insightful results.

2.2 Enable Bedrock in Your AWS Account

To enable AWS Bedrock, follow these steps:

a. Open the AWS Bedrock Console: In the search bar, type “Bedrock” and select AWS Bedrock from the list of services. Please use this service in US-EAST-1 due to some model does not exist in other region.

b. Enable Bedrock (This only applies to first-time users):

  • Click on Model Access on left panel.
  • Select Modify model access.
  • Select all model. (This won’t cost any money because Bedrock charges are based only on API calls such as token used.)
  • Ensure you have the necessary permissions to enable and configure Bedrock.

Below is the 4 model will be using in this solution:

anthropic.claude-v2:1

Claude 2.1 is a large language model by Anthropic, offering a 200K token context window. It features reduced hallucination rates and improved accuracy for long documents.

  • Max tokens: 200K
  • Languages: English and multiple other languages
  • Supported use cases: Summarization, Q&A, trend forecasting, comparing and contrasting multiple documents, and analysis. Claude 2.1 enhances the core capabilities of Claude 2.0 and Claude Instant.

anthropic.claude-instant-v1

Claude Instant is a faster, cost-effective language model by Anthropic that still delivers strong performance.

  • Max tokens: 100K
  • Languages: English and multiple other languages
  • Supported use cases: Casual dialogue, text analysis, summarization, and document comprehension.

ai21.j2-ultra-v1

Jurassic-2 Ultra is AI21’s top-tier model for intricate text generation tasks that demand high-quality output.

  • Max tokens: 8,192
  • Languages: English, Spanish, French, German, Portuguese, Italian, and Dutch
  • Supported use cases: Question answering, summarization, draft generation, advanced information extraction, and ideation requiring complex reasoning and logic.

ai21.j2-mid-v1

Jurassic-2 Mid is AI21’s balanced model, providing quality text generation at an affordable price.

  • Max tokens: 8,192
  • Languages: English
  • Supported use cases: Question answering, summarization, draft generation, advanced information extraction, and ideation requiring intricate reasoning and logic.

Summary

This module walks you through enabling AWS Bedrock. In the next module, we will create a Lambda function to process queries and interact with Kendra.

Next Module: GenAI with Stock Trading Website (Module 3)

--

--