2 Risposte
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Can you test the same format as here : https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-agent-runtime/client/retrieve_and_generate.html
client.retrieve_and_generate(
input={
'text': 'string'
},
retrieveAndGenerateConfiguration={
'externalSourcesConfiguration': {
'generationConfiguration': {
'additionalModelRequestFields': {
'string': {...}|[...]|123|123.4|'string'|True|None
},
'guardrailConfiguration': {
'guardrailId': 'string',
'guardrailVersion': 'string'
},
'inferenceConfig': {
'textInferenceConfig': {
'maxTokens': 123,
'stopSequences': [
'string',
],
'temperature': ...,
'topP': ...
}
},
'promptTemplate': {
'textPromptTemplate': 'string'
}
},
...
Can you double check this part :
'promptTemplate': {
'textPromptTemplate': "Human: You are a helpful AI assistant. Respond to the following: Hi
}
con risposta 2 anni fa
0
Hi,
RetrieveAndGenerate will produce the answer you get when the chunks retrieved from the database are empty or irrelevant to the question.
So, you should investigate what you get back in the RAG part part of the Knowledge Database service.
For that, you may want to log the activity the way I describe in my article: https://repost.aws/articles/AR-LV1HoR_S0m-qy89wXwHmw/the-leverage-of-llm-system-prompt-by-knowledge-bases-for-bedrock-in-rag-workflows
Best,
Didier
