2 Answers
- Newest
- Most votes
- Most comments
0
Hello.
Which API are you using specifically?
I think the API you are running may be incorrect.
Since you are using a data source, I assume you are using a knowledge base, but are you using the retrieve_and_generate() API?
https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-test.html
0
Hi Zach, If you are using the model directly and passing the document rather than using a knowledge base, here are a couple things you can try:
- Check you are using exactly the same inference configuration and format as you were in the console. If you turn on developer tools in your browser you can inspect the network calls when you are using the console to see the exact format of the API call being made from the console.
- If you are asking follow-on questions about your document make sure you are including all of the previous conversation including the document and any previous assistant responses otherwise it will have lost context (you'll see this in the API calls from the console in your browser too)
- You can also add instructions to your prompt to explicitly tell the model to only use information from the document you have sent in and not include any additional information.
answered 2 years ago
Relevant content
asked 10 months ago
asked 2 years ago
