2 Answers
- Newest
- Most votes
- Most comments
1
Hi,
No, you cannot: the prompt is under service control in RetrieveAndGenerate
To build your own prompt, you should use the Retrieve API to obtain the RAG data from the KB and then build your own prompt as you want it.
See:
- https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html
- https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-agent-runtime/client/retrieve.html
To see details of RetrieveAndGenerate vs Retrieve, have a look at https://repost.aws/articles/AR-LV1HoR_S0m-qy89wXwHmw/the-leverage-of-llm-system-prompt-by-knowledge-bases-for-bedrock-in-rag-workflows
Best,
Didier
0
Hello, that said, you can customize the prompts generated by the service for Retrieve and Generate using this promptTemplate parametter for the generation part and this promptTemplate for the orchestration part.
answered a year ago
Relevant content
- asked a year ago
- asked 3 months ago
