From d6db6ebc18ee876fc831d10d1189740189449877 Mon Sep 17 00:00:00 2001 From: jeffvestal <53237856+jeffvestal@users.noreply.github.com> Date: Fri, 14 Apr 2023 01:05:30 +0000 Subject: [PATCH] updated the prompt with wording for when no answer is found --- elasticdocs_gpt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticdocs_gpt.py b/elasticdocs_gpt.py index 399aeb5..8f712ec 100644 --- a/elasticdocs_gpt.py +++ b/elasticdocs_gpt.py @@ -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"