Chat memory...
# 🤝help
f
Long story short, watched @acceptable-kangaroo-64719's video on translation, noticed he had {{conversation.SummaryAgent.transcript}} in the AI Task. I have always wanted the ai task to remember chat history. example: user: my name is jack bot: hello how can i help user: what is my name? bot: your name is jack. I set this up the same way @acceptable-kangaroo-64719 did but it doesn't seem to work. The flow: start > ai task > raw input > expression > loop back. Screen shots added. Im not sure what i am doing wrong but it just keeps returning the bots "how are you today" message over and over again.

https://cdn.discordapp.com/attachments/1131514884597751808/1131514885004591116/Screenshot_2023-07-20_at_10.14.37.png

https://cdn.discordapp.com/attachments/1131514884597751808/1131514885403054100/Screenshot_2023-07-20_at_10.15.04.png

https://cdn.discordapp.com/attachments/1131514884597751808/1131514885667291146/Screenshot_2023-07-20_at_10.15.22.png

https://cdn.discordapp.com/attachments/1131514884597751808/1131514885973479434/Screenshot_2023-07-20_at_10.15.33.png

a
Hey @freezing-carpenter-9818, try playing around more withe the prompt you use in your AI Task. Heck just now I ran into the same thing as you, and it was just a matter of fine-tuning to get out of it. Some things to try: 1. Play around with the words used in your prompt. Tell the bot explicitly to answer the user's question as best as it can, explain inputs, etc. 2. Add delimiters and identifiers to inputs. In my prompt I put quotes around "chat history" and then identified the input as "chat history" 3. Change the temperature 4. Make sure your summary agent is on and there's enough room to handle all the context 5. Add descriptions to your output variable

https://cdn.discordapp.com/attachments/1131514884597751808/1131536898842701855/image.png

f
Hi @acceptable-kangaroo-64719 hope you are doing well, still cant get it to work, i have tried so many prompts including the one you gave in your screenshot, but nothing. It just keeps repeating the ai response. Is there an actual working example of this anywhere?
a
The bot from this post https://discord.com/channels/1108396290624213082/1131187432902115448 was working for me. How does it perform on your end?
j
do you have a prompt to make the ai also ask the customer questions ?
a
sure, but it's generally a bad idea to tell the AI to generate a question unless you put strict guardrails and very specific instructions in the prompt. AI-generated questions can be very personalized and cool, but also completely misleading or flat-out irrelevant. That being said, I'd follow a template like:
Copy code
md
You are a {{job-title}} at {{company}}. A customer has come to you with a question and you need to respond to them in a polite and professional way.

Ask the customer a relevant follow-up question. Your question should:
* Aknolwedge what the customer said
* Be relevant to {{company}} and its services
* Lead to further conversation about {{company}} and its services

Save your question to the 'aiQuestion' variable.
j
THANK YOU !!!!
@acceptable-kangaroo-64719
so how do i input the prompt
a
What do you mean? You can just copy/paste into the AI task, replace everything in {{double brackets}} with the right words for your bot, and then add the user question in the AI Task Input
j

https://cdn.discordapp.com/attachments/1131514884597751808/1146069108782268416/image.png

a
write
customer question: {{event.preview}}
j
where can i put that in ?
You are a {{Ceo}} at {{Swop & stay}}. A customer has come to you with a question and you need to respond to them in a polite and professional way. Ask the customer a relevant follow-up question. Your question should: * Aknolwedge what the customer said * Be relevant to {{Swop & stay}} and its services * Lead to further conversation about {{Swop & stay}} and its services Save your question to the 'aiQuestion' variable.
i have a error with Ceo
a
if you want to dynamically swap out the stuff in {{brackets}} you have to use code.
otherwise, do this:

https://cdn.discordapp.com/attachments/1131514884597751808/1146073262787403896/image.png

j
oh ok thanks for the help man
sorry i dont know code so i asked a lot lol
a
no worries
j
why is it when i hover over ai task it says its ignoring it ?
a
because it is after an "always" transition
nodes are executed from top to bottom, so if there is a transition above cards, the cards don't get run
j
ohhhhh
thank you man
4 Views