- Newest
- Most votes
- Most comments
Hello.
The following document describes which features each model can be used with.
It states that Deepseek can be used with Knowledge Base.
https://docs.aws.amazon.com/bedrock/latest/userguide/models-features.html
I checked the model ARN with the following AWS CLI command, and I believe "arn:aws:bedrock:us-east-2::foundation-model/deepseek.r1-v1:0" is the correct ARN.
aws bedrock list-foundation-models --query "modelSummaries[].modelArn" --region us-east-2
[
"arn:aws:bedrock:us-east-2::foundation-model/amazon.titan-embed-text-v2:0",
"arn:aws:bedrock:us-east-2::foundation-model/amazon.nova-pro-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/amazon.nova-lite-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/amazon.nova-micro-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/anthropic.claude-3-5-sonnet-20240620-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/anthropic.claude-3-7-sonnet-20250219-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/anthropic.claude-3-haiku-20240307-v1:0:200k",
"arn:aws:bedrock:us-east-2::foundation-model/anthropic.claude-3-haiku-20240307-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0",
"arn:aws:bedrock:us-east-2::foundation-model/anthropic.claude-3-5-haiku-20241022-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/deepseek.r1-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-1-8b-instruct-v1:0:128k",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-1-8b-instruct-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-1-70b-instruct-v1:0:128k",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-1-70b-instruct-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-1-405b-instruct-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-2-11b-instruct-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-2-90b-instruct-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-2-1b-instruct-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-2-3b-instruct-v1:0",
"arn:aws:bedrock:us-east-2::foundation-model/meta.llama3-3-70b-instruct-v1:0"
]
I apologize, but I need to correct a misconception in your question. There is no "Deepseek" model or service that supports RetrieveAndGenerate requests in Amazon Bedrock.
The RetrieveAndGenerate API is a feature of Amazon Bedrock Knowledge Bases. It allows you to query a knowledge base and generate responses based on the retrieved data using foundation models available through Amazon Bedrock.
To use the RetrieveAndGenerate API with your deployed knowledge base, you would typically:
- Set up your knowledge base in Amazon Bedrock
- Choose a supported foundation model for response generation (such as Anthropic's Claude or Amazon's Titan models)
- Use the AWS SDK or API to make a RetrieveAndGenerate request
The request would include your query text and the necessary configuration for the knowledge base and model you want to use. The API will then retrieve relevant information from your knowledge base and use the specified model to generate a response based on that information.
If you have a knowledge base deployed and want to use the RetrieveAndGenerate functionality, you can do so using the appropriate AWS SDK for your programming language or by making direct API calls to the Amazon Bedrock service.
Sources
Query a knowledge base and generate responses based off the retrieved data - Amazon Bedrock
RetrieveAndGenerate - Amazon Bedrock
Thank you confirming what I am doing. I ama aware of invoke, converse and retreiveandgnerate api. I have read in one of document that not all model might be able to support that was the reason I asked the question. I am getting Validation error with no explantion: Here is my java request object. Also having hard time to find correct model arn
RetrieveAndGenerateRequest request = RetrieveAndGenerateRequest.builder()
.input(RetrieveAndGenerateInput.builder()
.text("my query") //
.build())
.retrieveAndGenerateConfiguration(RetrieveAndGenerateConfiguration.builder()
.knowledgeBaseConfiguration(KnowledgeBaseRetrieveAndGenerateConfiguration.builder()
.knowledgeBaseId(knowledgeBaseId) // <-- your KB ID
.modelArn("arn:aws:bedrock:us-east-2::foundation-model/us.deepseek.r1-v1:0") // <-- DeepSeek
.orchestrationConfiguration(OrchestrationConfiguration.builder()
.inferenceConfig(InferenceConfig.builder()
.textInferenceConfig(TextInferenceConfig.builder()
.maxTokens(512)
.temperature(0.7F)
.topP(0.9F)
.build())
.build())
.build())
.build())
.type("KNOWLEDGE_BASE")
.build())
.sessionId(generateSessionId()) // <-- generate a random UUID if needed
.build();
software.amazon.awssdk.services.bedrockagentruntime.model.ValidationException: Session with Id [some id] is not valid. Please check and try again. (Service: BedrockAgentRuntime, Status Code: 400, Request ID: [someid])
this post helped me to solve the problem https://repost.aws/questions/QUEU82wbYVQk2oU4eNwyiong/bedrock-api-invocation-error-on-demand-throughput-isn-s-supported
This page display what is the real modelARN is to be called.
Relevant content
- asked 3 months ago
- asked 3 months ago
- asked 3 months ago
- AWS OFFICIALUpdated 4 years ago
so now i rmoved session id and put above modelarn and get this error. Any document related inference profile?
software.amazon.awssdk.services.bedrockagentruntime.model.ValidationException: Invocation of model ID deepseek.r1-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model. (Service: BedrockRuntime, Status Code: 400, Request ID: someid) (SDK Attempt Count: 1) (Service: BedrockAgentRuntime, Status Code: 400, Request ID: [someid])
According to the error message, it seems that you need to use an inference profile, so try changing the ARN to the following: Replace "<your-account-id>" with your AWS account ID. By the way, the following ARN can be confirmed from "Cross-region inference" in the Bedrock console.