updated the prompt with wording for when no answer is found

This commit is contained in:
jeffvestal
2023-04-14 01:05:30 +00:00
parent d49364b46d
commit d6db6ebc18

View File

@@ -101,7 +101,7 @@ with st.form("chat_form"):
submit_button = st.form_submit_button("Send")
# Generate and display response on form submission
negResponse = "I'm sorry I couldn't find the answer, try rewording your question"
negResponse = "I'm unable to answer the question based on the information I have from Elastic Docs."
if submit_button:
resp, url = search(query)
prompt = f"Answer this question: {query}\nUsing only the information from this Elastic Doc: {resp}\nIf the answer is not contained in the supplied doc reply '{negResponse}' and nothing else"