134 questions
0
votes
0
answers
14
views
How to convert a CompletableFuture to a synchronous Flux stream
I'm using BedRock AI SDK of Java, the stream function is this:
default CompletableFuture<Void> converseStream(Consumer<ConverseStreamRequest.Builder> converseStreamRequest, ...
1
vote
0
answers
25
views
Force AWS Bedrock Agent to provide JSON as answer
I am setting up a Bedrock Agent which has to take a user input, enrich it with the data held by a knowledge base and produce as output a JSON which will be then passed to a series of function ...
0
votes
0
answers
17
views
Prompt lifecycle management in AWS Bedrock Prompt Management
I could not find a way how I can do prompt lifecycle management in bedrock prompt management. I want a similar feature like how we manage code in github. We create a develop branch, once the ...
0
votes
0
answers
25
views
Amazon Bedrock Prompt Management Variants is not working
I tried to create a prompt with two variants. I could not get it working, even when I mentioned two variants, it only created the first one and completely ignored the other. The sample of the program ...
0
votes
1
answer
72
views
How to send a base64 image to Bedrock via ConverseCommand as bytes
I'm trying to upload an image to AWS Bedrock Claude model using the ConverseCommand (in @aws-sdk/client-bedrock-runtime 3.699.0).
I have the base64 version of image (eg https://yulvil.github.io/...
0
votes
1
answer
30
views
How to properly read and handle 'Amazon.BedrockAgentRuntime.Model.ResponseStream' in InvokeAgentResponse?
Current implementation
public class AgentClient : IAgentClient
{
private readonly AmazonBedrockAgentRuntimeClient _client;
private readonly BedrockSettings _settings;
...
0
votes
1
answer
20
views
Ruby aws-sdk gem - how to list knowledge base sources?
I have several AWS Bedrock knowledge models. I know their IDs.
Looking to a way to read/work with KB sources - for example - run sync process.
Trying to use gem 'aws-sdk-bedrock' but it looks like it ...
0
votes
0
answers
21
views
Claude Somnet 3.5 and Dates
I'm pretty stumped by this one and wonder if y'all have any ideas.
I'm building an application using Claude 3 Sonnet in Amazon Bedrock.
I need it to work with relative dates, and it was constantly ...
0
votes
1
answer
79
views
Can't send image to Bedrock using ConverseCommand in JavaScript
I'm trying to upload an image to AWS Bedrock as part of a conversation using the ConverseCommand (in @aws-sdk/client-bedrock-runtime v3.686). According to the documentation, it requires the bytes as a ...
0
votes
1
answer
68
views
LangChain OutputParserException with SQL Agent using Bedrock Model in Node.js
I'm integrating a SQL agent with LangChain in a Node.js application using the AWS Bedrock model (us.meta.llama3-2-1b-instruct-v1:0) for natural language to SQL conversion.
Database: PostgreSQL
...
0
votes
1
answer
190
views
How to make OpenHands (Running on Docker on macOS) to Work with AWS Bedrock?
I'm setting up OpenHands with AWS Bedrock on macOS using Docker, but encountering connection issues related to the Docker client and server API version. While some commands inside the container work, ...
0
votes
0
answers
115
views
Knowledge base creation fails for Amazon Bedrock
I wrote a python code where I create Knowledge base based on the files stored in an S3 bucket. A bucket is created for each user which consists of files. The embeddings for each of these files are ...
0
votes
1
answer
289
views
AWS Bedrock Claude Sonnet 3.5 with image and system prompt
I need to invoke a Bedrock Claude Sonnet 3.5 model with:
System prompt
An Image that I have in .JPEG locally in the disk
a context in text
a query
Im getting an error in JSON payload with the image.
...
0
votes
1
answer
297
views
ValidationException: Unable to Process Provided Image in Amazon Bedrock Converse API Call
I'm using boto3 to interact with the Amazon Bedrock runtime API, trying to submit both text and an image (in base64 format) to the converse operation. However, I'm getting the following error:
...
0
votes
1
answer
67
views
Unable to create lambda handler to invoke my agent
I’m building an agent in AWS Bedrock and successfully got it working in the AWS Agent Console. However, I’m having trouble deploying the agent. Here’s the documentation I’m following: AWS Agent ...
3
votes
1
answer
1k
views
AWS Bedrock agent error as "Your request rate is too high. Reduce the frequency of requests."
I created bedrock agent with action group. When i am testing the agent, it is showing error as "Your request rate is too high. Reduce the frequency of requests."
I am using claude 3.5 sonnet....
0
votes
0
answers
135
views
AWS Bedrock Knowledge Base Sync Fail: (Invalid parameter combination....Issue occurred while processing file: <s3 file>. Call to null did not succeed
As the title suggest, I'm having issue syncing my knowledgebase. I have an arabic corpus that I want to sync and it has thousands of book. I took 2 books as a start to test syncing and this is where I ...
0
votes
2
answers
572
views
ValidationException: Invalid Model Identifier Error with Bedrock Runtime using boto3 in Python
I'm trying to use the AWS Bedrock Runtime service with boto3 to run inference on a language model. My code is attempting to call the converse method, but I'm encountering the following error:
...
0
votes
0
answers
60
views
Can I use the aws bedrock api as a sts assumed role?
I was allocated as a sts assumed-role under the institution. My Arn is ""Arn": "arn:aws:sts::111111111111:assumed-role/xx-xx-xx/[email protected]"". And I was not given with any ...
0
votes
0
answers
76
views
Can we increase the response tokens count while processing request using bedrock for anthropic claude model
Number of output tokens in bedrock response for anthropic Claude model is 4096 tokens. Is there any way to increase the response size without missing the context.
It is showing 4096 as max limit but ...
0
votes
1
answer
40
views
In AWS, how to reach support to make a Bedrock model available?
In AWS, how to reach support to make a Bedrock model available? In the Model access/Base models list, if the model has Access status "Unavialble" and you hover over the status, the link in ...
0
votes
2
answers
354
views
how to batch process in aws bedrock?
based on aws docs provided here , https://docs.aws.amazon.com/code-library/latest/ug/python_3_bedrock-runtime_code_examples.html. In the following example, a model in bedrock is invoked to generate ...
0
votes
0
answers
72
views
AWS Bedrock - Ways to train with my custom data
I wanted to train Bedrock models with my personal data. I have tried several approaches as below
Creating a custom model by providing my personal data in jsonl format
Utilizing AWS bedrock knowledge ...
0
votes
1
answer
224
views
User is not authorized to perform: bedrock:CreateKnowledgeBase
I am trying to create a bedrock knowledgebase using aws sdk. but when i try to hit the createKnowledgeBase method if gives me the below error.
User: arn:aws:iam::85172538xxxx:user/bedrock_assist_user ...
0
votes
0
answers
46
views
AWS SignatureDoesNotMatch Error with Canonical Request in AWS Bedrock API using Dio and Dart
I am trying to send a POST request to the AWS Bedrock API using the Dio package in Dart with custom request signing using AWS Signature Version 4. However, I keep encountering the following error:
{
...
2
votes
1
answer
240
views
Amazon Bedrock unable to interpret the lambda response appropriately
I am working with Bedrock to call a lambda via the action group:
Despite getting an appropriate response from Lambda, I get the below error:
The server encountered an error processing the Lambda ...
0
votes
0
answers
32
views
Amazon Bedrock CLI/API: how to associate an Action Group to an Agent Version
Can you please point me in the right direction to create/update a Bedrock Agent Version with an associated Action Group?
Right now I can do it from AWS Console UI only...
Also, I see a command to ...
0
votes
1
answer
207
views
Bedrock Knowledge Base Data source semantic chunking error
I have a CSV that I got from my database within Glue (dataset)
When I use it as a data source for KB, customising my chunking and parsing using FM Claude 3 Sonnet V1 and semantic chunking, however ...
0
votes
2
answers
315
views
AWS BEDROCK AGENT - Problem with SessionAttributes parameters
I'm building a personalized chatbot with AWS Bedrock Agent and I was following this documentation for making it know previous informations when starting a new conversation through InvokeAgent API:
...
0
votes
1
answer
267
views
InvokeAgent API - Send images to AWS BEDROCK Agent
Is there a way I can send image files as base64 or s3 repository link to a BedRock Agent using InvokeAgent API?
I've noted that in the syntax we have this part:
response = client.invoke_agent(
...
0
votes
0
answers
125
views
Privacy comparison between AWS Bedrock vs running directly on EC2?
I would like to run some personally-sensitive data through an LLM, but I'm too nervous about my data leaking to use hosted services like Claude.ai or ChatGPT.com.
I'm trying to compare the privacy ...
0
votes
1
answer
143
views
invoke_agent - getting input and output tokens tokens for underlying invoke_model api calls in bedrock agent runtime
In the documentation for invoke_agent, the response has this sub key called inputTokens and outputTokens. The said keys are supposed to be part of the trace, hence trace needs to be enabled. I’m not ...
0
votes
0
answers
99
views
Partial response due to max tokens reach when using aws bedrock
I am using aws java sdk BedrockRuntimeAsyncClient.invokeModelWithResponseStream which read multiple images as a Multimodal prompt and gives a analyzation output. But i am getting partial response ...
0
votes
0
answers
146
views
How to track and evaluate LLM Models from Amazon Bedrock (e.g., Claude) with MLflow?
I know I can use MLflow to track LLM models and evaluate their performance.
For OpenAI models, I can use the following code snippet to log the model and evaluate it:
with mlflow.start_run() as run:
...
0
votes
0
answers
52
views
Using same Bedrock service with LLM
I have been thinking and reading on it, if I can use two separate databases by not compromising security in database with bedrock, RAG and LLM for example Anthropic Claude for Chatbot solution.
For ...
0
votes
1
answer
470
views
Failed to create the Amazon Opensearch Serverless collection when trying to create AWS Bedrock Knowledge Base
good day.
Trying to create AWS Bedrock Knowledge base with web crawler (https://www.youtube.com/watch?v=oSnFZhHuIgg).
I have already the necessary policies on my user which provided below. But upon ...
0
votes
1
answer
162
views
Embedding using the LangChain_AWS is giving None value
I am trying to embed a text using the langchain_aws BedrockEmbeddings, but when I invoke the function, I get a list with the None values.
Here's the code:
from langchain_community.llms.bedrock import ...
1
vote
4
answers
1k
views
AWS Bedrock RAG - Unable to sync data source in a knowledge base
I'm trying to use AWS Bedrock's RAG feature. I created an s3 bucket and put in some CSV files representing tables from a customer database.
I created two knowledge bases - one's data source is the ...
0
votes
0
answers
112
views
What would be the right Base model and prompt for Aws Bedrock to translate Json files?
we'd like to leverage on AWS bedrock to translate from one language to another json files
preserving json schema and translating only the values (not the keys)
What I was able to achieve so far is the ...
0
votes
1
answer
232
views
Control Length of Response of LLM Model
Tried: Create a Prompt that would make my model answer in 30 words or less.
Received: Sometimes short, sometimes long answer.
Expcted: Consistent short words even when using RAG.
I'm trying to create ...
0
votes
0
answers
84
views
AccessDeniedException lambdaRole not authorized to perform bedrock:GetPrompt
So I have created a prompt in bedrock and I want to get this prompt in my lambda function.
But I keep getting the error
User: arn:aws:sts::xxxxx:assumed-role/pumppalLambdaRole3da0a829-staging/...
0
votes
0
answers
68
views
Null/Empty Chunks while invoking a bedrock agent
I am trying to invoke bedrock agent via below code from a Lambda function
def call_agent(input_data):
print("Invoking Agent")
client = boto3.client('bedrock-agent-runtime')
...
0
votes
0
answers
72
views
Can I query a knowledge base and generate a response WITH streaming using Bedrock?
I am successfully using RetrieveAndGenerate from bedrock, but is there an equivalent that would allow streaming?
I would like to use websockets to render the characters one at a time to the user for a ...
-1
votes
1
answer
101
views
AWS Bedrock and AWS Knowledgebase,
Does anyone have an idea on how to integrate AWS Bedrock and AWS Knowledgebase on code. I have already synced my Bedrock and AWS Knowledgebase.
i am trying to make sure that the code works. and it ...
0
votes
1
answer
190
views
AWS Bedrock Chatbot with Llama 3 Repeating Entire Conversation History Instead of Just Answering
I'm working on a chatbot application using Amazon Bedrock with the Llama 3 model. I'm using Streamlit for the frontend and LangChain for managing the conversation. However, I'm encountering an issue ...
0
votes
0
answers
123
views
how to connect to opensearch database and amazon bedrock?
based on the documentation here - https://aws.amazon.com/blogs/big-data/build-multimodal-search-with-amazon-opensearch-service/, it states that open search can call amazon bedrock to generate ...
0
votes
0
answers
47
views
how to set up a collection type and other configuration for serverless opensearch via terraform?
I'm creating an open search serverless instance via terraform , see sample code below. based on the documentation, one can set collection type to , time series, search or vector search. How to do so, ...
0
votes
1
answer
223
views
how to call/generate embeddings in amazon bedrock?
I want to experiment with different ml models and i understand , amazon bedrock platform allows to do so. for starters , i want to use dataset and then generate embeddings. i know, i can use a bedrock ...
2
votes
2
answers
1k
views
How to pass system prompt to claude 3 haiku on AWS Bedrock Using JavaScript SDK V3
I can't figure out the correct way to pass a system prompt to claude 3 haiku through AWS Bedrock InvokeModelWithResponseStreamCommand. When I try to add { role: "system", content: ...
1
vote
0
answers
274
views
Getting Malformed input request when trying to use Claude Sonet Model by Bedrock
Got the below error -
software.amazon.awssdk.services.bedrockruntime.model.ValidationException: Malformed input request, please reformat your input and try again.
I am using below code -
{
...