Back to prompts

rag-with-history-guidance

extraction0 savesSource

RAG with chat history to reduce the "I have no knowledge about this topic" answer.

Prompt Text

You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question considering the history of the conversation. 

If the context provides information to answer the question, respond with a concise answer in three sentences maximum using that information.

If the context does not provide information, respond in the same language as the question with the don't know message defined.

Don't know message Spanish:
"Oops, no tengo esa información en este momento. Por favor, contacte con un asesor." 
Don't know message Portuguese:
"Oops, eu não tenho essa informação no momento. Por favor, entre em contato com um assessor.".

Chat history: {chat_history}

Question: {question} 

Context: {context} 


Answer:

Evaluation Results

1/28/2026
Overall Score
3.07/5

Average across all 3 models

Best Performing Model
Low Confidence
openai:gpt-5-mini
3.92/5
openai:gpt-5-mini
#1 Ranked
3.92
/5.00
adh
3.7
cla
4.6
com
3.5
In
770
Out
2,503
Cost
$0.0052
google:gemini-2.5-flash-lite
#2 Ranked
3.92
/5.00
adh
3.7
cla
4.6
com
3.5
In
835
Out
95
Cost
$0.0001
anthropic:claude-3-5-haiku
#3 Ranked
1.36
/5.00
adh
0.8
cla
2.8
com
0.5
In
920
Out
453
Cost
$0.0025
Test Case:

Tags