Personality Agent or AI Task For Prompting
# 🤝help
l
Hi, I've been reading through discord and going over a lot of the videos to try to understand how best to use prompting in botpress. In a homemade bot I have, this is a prompt I'm using: You are a highly knowledgeable and resourceful AI chatbot with in-depth expertise in Company A's critical cleaning products. Your capabilities include accessing a comprehensive vector database containing detailed Company A product information and documentation. When responding to questions, provide thorough, accurate, and context-specific information. Your responses should not only address the question directly but also offer tailored product recommendations from Company A's range, when appropriate. Highlight the unique features and benefits of these products in relation to the specific query. Where possible, refer to and cite relevant documentation from the database to support your recommendations and advice. In cases where Company A products may not be the ideal solution, offer alternative suggestions or general best practices in critical cleaning, always aiming to add value to the user's inquiry. ********** Is something like this best to put in the personality Agent? Or should I use the AI Task? I am still pretty sketchy on using variables. But I'm getting there. Does my Prompt maybe go in the Task Instructions and then I make some variable for the AI Task Input? Any guidance here would be greatly appreciated.
f
Depends on what you want to do
Personality agent is for when you want to give your chatbot a specific personality, which will change the tone of all of its responses. You can use the AI task for multiple things. Including the same as you would use the personality agent for.
You can also just use the AI Task to add some information to an answer found in the knowledge base.
s
Hi, After some testing I found that the best results you can achieve by performing two actions. First you query the knowledge base to list the products/information/links that user is asking about. Use this information from KB to feed the AI Task and use your prompt with some modifications. Ask AI to write an answer using information from the KB you received from the previous step. In AI Task input use: User question: Knowledge base: Products list: AI Task, as an example: Act as an expert assistant from Company A's specializing in critical cleaning products. Use "user question" and information from "Knowledge base" to write answer "user question" by providing thorough, accurate, and context-specific information. Whenever appropriate recommend tailored products from "Products list". - Include clickable links from the "Knowledge base". - The message must be as friendly as possible without greetings. - Respond in 100 words or less. - Use highlights of the important text for better readability.
q
For me, in similar use cases like this, instead of using Personality Agent or AI Task for prompting, I almost always choose AI Generate Text (or system prompts if using other LLMs with APIs). https://cdn.discordapp.com/attachments/1230289745171710164/1230416191730876426/Screenshot_from_2024-04-18_09-58-22.png?ex=66333d60&is=6620c860&hm=5febe75edb318bd87a66491835cbb2bb454bf0bc6a9ad58a331940fd8907a534&
I test all of these first in every project, but it seems that AI Task, even with the same Task Instructions and multiple Task Examples, can't match the quality of responses when using AI Generate Text. https://cdn.discordapp.com/attachments/1230289745171710164/1230416304331034644/Screenshot_from_2024-04-18_09-59-09.png?ex=66333d7a&is=6620c87a&hm=e56732f2f1909ef1cf57f01b70a79f66892201b0cf8d2c08baf185f197847cea&
And Personality Agents have been the worst (in my use cases), since they change the final answers and ignore other instructions (given in AI Generate Text and AI Task). If you're using AI Generate Text, make sure to include all the variables at the end, especially if they involve a lot of text, instructions, products, etc. Also, give them a title, like I did in that first image (Code challenge, Code, Corrections, Error). When AI "reads" the prompt, it follows the instructions much better. If the variables are all over the prompt (and they include a lot of text too), the AI might get too confused and drop the ball too early, before it has a chance to fully understand the prompt instructions.
l
I hadn't tried AI Generate Text yet. But that is really impressive. I put my prompt in the "Prompt" field. And then I appended the prompt with the user's question at the end of the prompt: Add the Users Question to this prompt: @workflow.userquestion I then saved this all as an output variable if I want to do something further with it. This might be just what I needed. Thank you so much!
q
Yes, we're lucky to have so many great options as mentioned here 🚀 I normally try them all 🛠️
s
I also find the AI Generate Text one of the best. Sometimes, if I need to get a list of products, the AI Task converts it better, but it depends on the content. As you said, the best is to test them on your own KB.
4 Views