# Prompt design for Q&A ChatBot

**URL:** <https://community.openai.com/t/prompt-design-for-q-a-chatbot/29493>\
**Category:** Prompting\
**Created:** [January 3, 2023, 1:53pm UTC](https://community.openai.com/t/prompt-design-for-q-a-chatbot/29493 "2023-01-03T13:53:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lstancioiu](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/lstancioiu/32/8270_2.png) [@lstancioiu](https://community.openai.com/u/lstancioiu)\
**Post date:** [January 3, 2023, 1:53pm UTC](https://community.openai.com/t/prompt-design-for-q-a-chatbot/29493/1 "2023-01-03T13:53:39Z")

</div>

Hello!  
I wanted to build a Q&A ChatBot. I took OpenAI’s advice and made embeddings of my documents, and also followed their Q&A using embeddings tutorial ( [https://github.com/openai/openaicookbook/blob/main/examples/Question\_answering\_using\_embeddings.ipynb](https://github.com/openai/openaicookbook/blob/main/examples/Question_answering_using_embeddings.ipynb)) exact steps.  
Unfortunately the header of the prompt which is:  
“”“Answer the question as truthfully as possible using the provided context, and if the answer is not contained within the text below, say “Sorry, I don’t know”  
Context:  
“””  
is not working as expected, because I receive a lot of “Sorry I don’t know” answers, although it finds the good document.  
Can someone please give me some suggestions for this problem?  
Thank you!

---

<div class="post-metadata">

**Author:** ![shargil](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/shargil/32/134576_2.png) [@shargil](https://community.openai.com/u/shargil)\
**Post date:** [May 19, 2023, 12:28pm UTC](https://community.openai.com/t/prompt-design-for-q-a-chatbot/29493/2 "2023-05-19T12:28:23Z")

</div>

Are you using gpt-3.5 or gpt-4? I have the opposite problem: get’s a lot of hallucinations and not enough “i don’t know” when using gpt-4.

Found any solutions?

---

<div class="post-metadata">

**Author:** ![kevin6](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/kevin6/32/301_2.png) [@kevin6](https://community.openai.com/u/kevin6)\
**Post date:** [May 19, 2023, 3:04pm UTC](https://community.openai.com/t/prompt-design-for-q-a-chatbot/29493/3 "2023-05-19T15:04:12Z")

</div>

Try this prompt

````auto
Answer the question based on the context below, and if the question can't be answered based on the context, say "I don't know" 

Context: {context}

---

Question: {question}

Answer:"```
````

---

<div class="post-metadata">

**Author:** ![EricGT](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ericgt/32/20571_2.png) [@EricGT](https://community.openai.com/u/EricGT)\
**Post date:** [December 19, 2023, 11:50am UTC](https://community.openai.com/t/prompt-design-for-q-a-chatbot/29493/4 "2023-12-19T11:50:14Z")

</div>


