AI Task repeats prompt
# 🤝help
g
Hi all, I am having this issue. I am working on a bot that asks the user questions until it has enough questions to generate a travel itinerary, to generate the responses, I am utilizing an AI Task. Everything looks good, but after about 10 messages, or when I state that I have "no preference", the bot begins repeating questions. How can I fix this?

https://cdn.discordapp.com/attachments/1134093150101721099/1134093150567280861/Screenshot_2023-07-27_at_8.01.01_AM.png

https://cdn.discordapp.com/attachments/1134093150101721099/1134093150873469009/Screenshot_2023-07-27_at_8.01.14_AM.png

Here's the same 2 questions being repeated back and forth, even though I believe I am providing context through the transcript

https://cdn.discordapp.com/attachments/1134093150101721099/1134093761434091580/Screenshot_2023-07-27_at_8.03.14_AM.png

c
How does your ai task looks like?
The instruction
g
That's the second picture in the first message
@curved-traffic-50479
c
Ok do u have kB ?
g
No
c
Then you ai task have limited knowledge
You need to feed it
g
I thought the Knowledge Base was to add information for it to use. I feel like it should have enough power to follow a conversation and ask questions without repeating
Each time I execute the AI task, I feed it the context of the conversation
c
Its not enough with only conversation
You need to mention your knowledge
So your ai task can find the answers there
g
Im not sure what to add to a knowledge base. I want the questions to adapt to the conversation, not be predefined
I dont want the AI task finding answers, just asking questions. I have another AI task following this one that determines whether or not to ask another questions (i.e when enough information is collected)
c
Mm i like what you want to achieve. Maybe it missing long memory feature so it can remmeber the data that it collected before
g
I thought that is what the Summary Agent does. That's why I am feeding in {{conversation.SummaryAgent.transcript}} before each q is asked
I am monitoring the input, and even thought I added DO NOT REPEAT QUESTIONS INCLUDED IN TRANSCRIPT, it is definitely doing that
c
@straight-wolf-37371 legend do u have solution for the problem? 😅
g
I feel like there's potential because it's working nicely up to like 5 questions, then it starts repeating
c
Yeah true
g
To add to this thread, for a sanity check I stored all of the questions asked in an array, and I am also feeding this now to the AI with explicit instruction not to ask a question that is already in the array, however I am still getting this issue: 0:"Great! Now, let's start planning your dream vacation. Can you please tell me your preferred destination?" 1:"The Bahamas is a great choice for a dream vacation! Now, let's move on to the next step. Can you please tell me your preferred travel dates?" 2:"Can you please tell me how many days you plan to stay in the Bahamas?" 3:"Can you please tell me your preferred activities or attractions in the Bahamas?" 4:"Can you please tell me your budget for this trip?" 5:"Can you please tell me your preferred mode of transportation to the Bahamas?" 6:"Please let me know if you have any specific preferences for accommodations or any other details you would like to add to your itinerary." 7:"Is there anything specific you would like to do on the excursion?" 8:"Is there anything specific you would like to do on the beach?" 9:"What other activities are you interested in besides relaxing on the beach?" 10:"What activities or attractions are you interested in besides relaxing on the beach?" 11:"What other activities or attractions are you interested in besides relaxing on the beach?" 12:"What other activities or attractions are you interested in besides relaxing on the beach?" 13:"What activities or attractions are you interested in besides relaxing on the beach?"
Starts off great between questions 1 and 8, but 9-13 are all the same question. I also made another AI Task to try to check, but this also is not working

https://cdn.discordapp.com/attachments/1134093150101721099/1134101464722198528/Screenshot_2023-07-27_at_8.34.15_AM.png

Update: I am trying an interesting tactic here and it's having some desirable results. So, as stated, I have two AI tasks. One generating a response, and the other one checking that the generated response is good (and hasnt been asked before). However, what has started to provide better results is playing around with the temperature of those two tasks. The first one I currently have at a lower temperature, and a higher temperature is set for the second.
s
Welcome to prompt engineering 🙂 I think its going to be all about fine tuning your prompt. Here are some good resources to look at: 1. https://plainenglish.io/blog/chatgpt-prompt-engineering-lets-think-step-by-step-and-other-magic-phrases 2. https://www.allabtai.com/the-best-chatgpt-prompts-the-lets-think-about-this-prompt/ Few tips. Putting things in caps doesn't really matter as far as I know. Its better to explain things step-by-step instructions. The reason why using the two AI Tasks is coming up with better results is because your essentially breaking it up into steps. You can do that within the first prompt with something like: "Act as a travel guide. You will assist the user in generating a travel itinerary. Use the a summary of the conversation in the Transcript for context. Let's think about this step-by-step, 1. Review each of the previous questions and responses in the transcript. 2. Consider what information is still needed to generate the itenerary based on what you learned from the previous step. 3. Output a single question to the user to capture the needed information from the previous steps." I'm still exploring prompt engeneering myself so you may need to tweak it and fine-tune as you need
g
Awesome @straight-wolf-37371 , thanks so much for the resources