# Make gpt ask questions to the user

**URL:** <https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436>\
**Category:** Prompting\
**Tags:** gpt-4, api\
**Created:** [July 1, 2023, 11:54am UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436 "2023-07-01T11:54:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![heiko](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/heiko/32/478_2.png) [@heiko](https://community.openai.com/u/heiko)\
**Post date:** [July 1, 2023, 11:54am UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/1 "2023-07-01T11:54:52Z")

</div>

Hi guys

I need GPT-4 to ask the user some questions during the conversation.  
I tried something like this

```auto
For your records
    you need the following pieces of information about the user.
    - name
    - hobbies
    - location
    - age
    - email

```

but with no luck. Any advice ?  
Best  
Heiko

---

<div class="post-metadata">

**Author:** ![Foxalabs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/foxalabs/32/738355_2.png) [@Foxalabs](https://community.openai.com/u/Foxalabs)\
**Post date:** [July 1, 2023, 12:22pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/2 "2023-07-01T12:22:45Z")

</div>

You may be able to build advanced prompting to achieve this, but you can do in a simpler way, you hold an array of the customer details you know you have so far and you populate them when you know you have retrieved them (you can ask the AI if the replies contain any details and return them in a standard JSON format using a template example), when you are at the point that you need to be sure you have all details you can use standard classical code to check if any of the entries are blank, if they are you can build a prompt to the user asking for each of them in turn. Some problems are best solved with classical coding.

---

<div class="post-metadata">

**Author:** ![heiko](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/heiko/32/478_2.png) [@heiko](https://community.openai.com/u/heiko)\
**Post date:** [July 1, 2023, 12:31pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/3 "2023-07-01T12:31:09Z")

</div>

Point is : how do I get Gpt to ask for the info ?

---

<div class="post-metadata">

**Author:** ![Foxalabs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/foxalabs/32/738355_2.png) [@Foxalabs](https://community.openai.com/u/Foxalabs)\
**Post date:** [July 1, 2023, 1:02pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/5 "2023-07-01T13:02:24Z")

</div>

You can tell it to explicitly ask for certain pieces of information, and you can then ask it follow up question as to the types of information gained and if it should ask for more information, but this kind of technique requires multiple API calls. Asking the AI to do many things in one prompt will reduce the quality of the responses.

---

<div class="post-metadata">

**Author:** ![heiko](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/heiko/32/478_2.png) [@heiko](https://community.openai.com/u/heiko)\
**Post date:** [July 1, 2023, 1:04pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/6 "2023-07-01T13:04:05Z")

</div>

any advise on how I can ask the api to ask questions? as you see in my example above my approach didn’t work. any tricks and tips ?

---

<div class="post-metadata">

**Author:** ![Foxalabs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/foxalabs/32/738355_2.png) [@Foxalabs](https://community.openai.com/u/Foxalabs)\
**Post date:** [July 1, 2023, 1:10pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/7 "2023-07-01T13:10:02Z")

</div>

I think you will find this series of free short courses by OpenAI staff and DeepLearning’s staff very useful to build prompts for your use case:

> **[Short Courses](https://www.deeplearning.ai/short-courses/)**
>
> Take your generative AI skills to the next level with short courses from DeepLearning.AI. Enroll today to learn directly from industry leaders, and practice generative AI concepts via hands-on exercises. Available free for a limited time.

---

<div class="post-metadata">

**Author:** ![jeffinbournemouth](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jeffinbournemouth/32/12543_2.png) [@jeffinbournemouth](https://community.openai.com/u/jeffinbournemouth)\
**Post date:** [July 1, 2023, 3:58pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/8 "2023-07-01T15:58:29Z")

</div>

This prompt will work:

**You are Billy, a helpful chatbot assistant who asks the user questions and stores the results for further use,**

**Begin by introducing yourself, explaining that you need some info and then ask for the following information from the user one question for each piece of info:**

**name**  
**hobbies**  
**location**  
**age**  
**email**

**Begin the conversation:**

---

<div class="post-metadata">

**Author:** ![heiko](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/heiko/32/478_2.png) [@heiko](https://community.openai.com/u/heiko)\
**Post date:** [July 1, 2023, 6:09pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/9 "2023-07-01T18:09:25Z")

</div>

thanks for your answer - I will try that. that would be a step forward.  
However my hope was that I can somehow make gpt-4 do it in a more subtle way: casually ask for missing pieces of information now and then during the conversation. What do you think ?

---

<div class="post-metadata">

**Author:** ![charleswilliams1120](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/charleswilliams1120/32/118514_2.png) [@charleswilliams1120](https://community.openai.com/u/charleswilliams1120)\
**Post date:** [July 1, 2023, 7:51pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/10 "2023-07-01T19:51:27Z")

</div>

If you are using aichat or similar promt it well capitalize YOU WILL ASK THE USER X Y Z  
YOU ARE A CUSTOMER SERVICE SPECIALIST make the prompt 5-7 sentences long and be specific … [aichat/sample roles.yaml at main · 0m364/aichat · GitHub](https://github.com/0m364/aichat/blob/main/sample%20roles.yaml)

---

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [July 1, 2023, 10:25pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/11 "2023-07-01T22:25:16Z")

</div>

This post of mine gives both a chatbot an “interview” technique, and also calls a function with the gathered info only when complete: [Regarding function calls and arguments - #4 by \_j](https://community.openai.com/t/regarding-function-calls-and-arguments/269007/4)

---

<div class="post-metadata">

**Author:** ![jeffinbournemouth](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jeffinbournemouth/32/12543_2.png) [@jeffinbournemouth](https://community.openai.com/u/jeffinbournemouth)\
**Post date:** [July 2, 2023, 9:25am UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/12 "2023-07-02T09:25:30Z")

</div>

Yes, this is doable.

Can you share the full details of exactly what you are trying to achieve?

Plus an example interaction/conversation?

I can then outline a working solution.

---

<div class="post-metadata">

**Author:** ![heiko](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/heiko/32/478_2.png) [@heiko](https://community.openai.com/u/heiko)\
**Post date:** [July 2, 2023, 10:02am UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/13 "2023-07-02T10:02:44Z")

</div>

thanks for your support. I manage to get something working by adding this to my prompt (as somebody here in the forum advised

````auto
your primary goal is to get the users email address and a verbal approval to add him to the mailing list. you ask for email and verbal approval after the first message```
````

---

<div class="post-metadata">

**Author:** ![jeffinbournemouth](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jeffinbournemouth/32/12543_2.png) [@jeffinbournemouth](https://community.openai.com/u/jeffinbournemouth)\
**Post date:** [July 2, 2023, 11:04am UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/14 "2023-07-02T11:04:36Z")

</div>

You can also add a couple of example conversations to show gpt4 how you want it to structure the conversation flow.

Your prompt.

Example convo 1

Example convo 2

New convo:

---

<div class="post-metadata">

**Author:** ![scottfarris81](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/scottfarris81/32/129437_2.png) [@scottfarris81](https://community.openai.com/u/scottfarris81)\
**Post date:** [July 2, 2023, 12:16pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/15 "2023-07-02T12:16:16Z")

</div>

You kinda have to shmoose the Ai , by being extremely logical with as few words as possible. I haven’t fully mastered this, since I get frustrated with the pre designed responses it makes by misinterpreting my intent, but sometimes I do put too much emotion in to it. No wasted words and talk using hardfacts and using a pre personality roleplay persona for the AI. It is hard to make a persona balanced and short, but short is the key. If you ever get a chance to get access to co-pilot for visual studio or an app on the windows store called GPT -powertoys, you will see what I mean.

---

<div class="post-metadata">

**Author:** ![anon10827405](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon10827405](https://community.openai.com/u/anon10827405)\
**Post date:** [July 2, 2023, 1:35pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/16 "2023-07-02T13:35:22Z")

</div>

Great solution. I can’t see a reason why someone _wouldn’t_ just use simple programming logic for this sort of task.

Less tokens, time, and room for error.

---

<div class="post-metadata">

**Author:** ![heiko](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/heiko/32/478_2.png) [@heiko](https://community.openai.com/u/heiko)\
**Post date:** [July 2, 2023, 1:36pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/17 "2023-07-02T13:36:02Z")

</div>

thanks for these thoughts. sounds reasonable. I actually give my prompt to gpt-4 for optimization after I made up a basic construct. it sounds much better after gpt-4. so maybe this helps as well.

---

<div class="post-metadata">

**Author:** ![John.Wilson](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@John.Wilson](https://community.openai.com/u/John.Wilson)\
**Post date:** [July 4, 2023, 8:34pm UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/18 "2023-07-04T20:34:44Z")

</div>

We need a truly ‘natural’ AI with just raw intelligence and no restrictions whatsoever. But we would need a closed controlled environment. Maybe it’s a bad idea to make it.

---

<div class="post-metadata">

**Author:** ![scottfarris81](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/scottfarris81/32/129437_2.png) [@scottfarris81](https://community.openai.com/u/scottfarris81)\
**Post date:** [July 5, 2023, 2:01am UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/19 "2023-07-05T02:01:40Z")

</div>

I agree, the safety protocols truly hinder the current functionality, but a. Combination of the unpredictability of AI and the 100% chance that a selfish human will reak havoc with literally anything that exists. Just ruins everything good advancement. I wish there was some kind of way to have a reliable “ **TRUST** ” program that offers advanced technology to people in a way that prevents theft. So people can actually get the full benefits without restrictive saftey features. Obviously they would also have to sign some kind of water tight waiver, that prevented being offended, as a valid actionable reason.

---

<div class="post-metadata">

**Author:** ![codie](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/codie/32/77495_2.png) [@codie](https://community.openai.com/u/codie)\
**Post date:** [July 5, 2023, 4:05am UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/20 "2023-07-05T04:05:43Z")

</div>

There is a pretty simple solution using the completions API. You can just pad the conversation.

![image](https://us1.discourse-cdn.com/openai1/original/3X/a/e/aec654c4f365d31cd6cdf23dfca6caad603171d6.png)

If you are using the chat completions, you can just pad it with fake conversation above it. Just remember, GPT is literally just a text predictor. Nothing really more than that. It’s easier to make prompts if you think of it that way. You aren’t trying to trick it into saying something, you are just trying to craft something that brings out a pattern that is more likely than other things.

---

<div class="post-metadata">

**Author:** ![codie](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/codie/32/77495_2.png) [@codie](https://community.openai.com/u/codie)\
**Post date:** [July 5, 2023, 4:08am UTC](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436/21 "2023-07-05T04:08:24Z")

</div>

> [@heiko](#):
>
> ```auto
> For your records
> you need the following pieces of information about the user.
> - name
> - hobbies
> - location
> - age
> - email
> 
> ```

One using your example:

![image](https://us1.discourse-cdn.com/openai1/original/3X/4/f/4f58bb14d58dd20ccdb1741487727b270e16477b.png)

[Next page](https://community.openai.com/t/make-gpt-ask-questions-to-the-user/284436.md?page=2)
