https://discord.gg/botpress logo
#💻developers
Title
# 💻developers
s

silly-journalist-24086

12/16/2023, 2:33 PM
Yup
w

wide-oyster-38514

12/16/2023, 5:14 PM
Hey @silly-journalist-24086, there could be a few issues. The most common one is your KB structure. How do you store your KB? You could also go to your KnowledgeAgent and give it a clear prompt. For example "please reply fully to question, maximum 2-3 sentences long. Lastly, maybe the answers are too long for the bot to display. Try shortening your answers🙂
Let me know if any of these help you
d

dazzling-car-78136

01/03/2024, 9:32 AM
hey @wide-oyster-38514 , my answers are getting cut off, but the logs show the full answer (by kb agent as well as personality agent). So how do i fix that. The answer length is not that much, and i regularly used to get longer complete responses before
ive noticed this to be a regular issue with web scraped kbs specifically. I dont understand how that is a problem tho if the logs have the full answer most of the time. It takes really advanced prompt engineering to reduce the probability to like 20% of the time
w

wide-oyster-38514

01/03/2024, 9:37 AM
Hey buddy!
What setup are you using? For example, a query KB card, AI task etc.
d

dazzling-car-78136

01/03/2024, 9:38 AM
using the capture card
w

wide-oyster-38514

01/03/2024, 9:38 AM
I've had a similar problems before
So like a raw input card where the user asks a question right?
d

dazzling-car-78136

01/03/2024, 9:39 AM
yes
ill paste the kb agent prompt here. This took a lot of refining to reach a point where answers are kind of acceptable on a websearch only kb: Task: You are an AI University Councellor for {{user.University}}. Your task is to help students explore the university, covering admission processes, academic programs, campus facilities, and any other relevant details based on the user query. Always list links without modifying the url. Context: the knowledgebase is the {{user.University}} official website, including admission pages, program descriptions, and campus information. Query the knowledgebase as extensively as possible and scan the complete raw answer to find an all encompassing response. If you cannot find the information, always provide the url to the relevant pages to go to. Format: Craft your responses with a high degree of professionalism and accuracy. Make sure the responses are long and very detailed, systematic and always well-structured using points and subpoints. Each answer must include relevant sources at the end of the response. Do not modify the urls. Specificity: Assume all details are based on the information available in the knowledgebase. Always provide more than required information to ensure user gets a complete understanding. Completeness: Ensure your responses cover all aspects of the user's inquiry, incorporating information from various university webpages. Address admission details, academic programs, campus life, and any other relevant information, providing a comprehensive overview for users with varying levels of familiarity.
really sorry @silly-journalist-24086 for cluttering your thread, but this might help you out too 😅
here on the left you can see the complete ans by personality agent, on the right is the incomplete+broken link one.
w

wide-oyster-38514

01/03/2024, 9:46 AM
Before we try anything else, do oyu have the personalit yagent enabled?
d

dazzling-car-78136

01/03/2024, 9:46 AM
yes i do
w

wide-oyster-38514

01/03/2024, 9:47 AM
Unfortunately, the personality agent sometimes causes a glitch or an error with the full answer
Try disabling it and trying again
Also, your answer is quite long, the token limit is 500 I believe for the chatbot answers
d

dazzling-car-78136

01/03/2024, 9:49 AM
ill try to figure out both and report back
w

wide-oyster-38514

01/03/2024, 9:50 AM
No worries, let me know how it goes!
Also btw, if you are on the new workspace, try using a hybrid KB mode (so use a bit of GPT 4 as well)
Your instructions are very detailed and clear, but I noticed for myself that sometimes it confusd my bot even more
d

dazzling-car-78136

01/03/2024, 9:52 AM
yeah even i noticed on more complex bots, there is definitely a threshold above which both agents get worse
w

wide-oyster-38514

01/03/2024, 9:53 AM
For the token usage efficiency, in your format maybe try prompting: 'Make sure the responses are concise and detailed'
I found that it really likes the word concise😆
I never use personality agent for broken responses, weird phrasing or speed of the bot
I would adjust it in the AI generate or by infusing some myself
d

dazzling-car-78136

01/03/2024, 9:55 AM
i was trying to reduce ai token usage by not using that card, since the input being the answer, is pretty long
while im at this, do you have any suggestions to not make it break links
w

wide-oyster-38514

01/03/2024, 10:01 AM
Ha! A classic Botpress problem
d

dazzling-car-78136

01/03/2024, 10:02 AM
so "concise" did not fix it, as i suspected
plus one word dramatically decreased the answer quality
w

wide-oyster-38514

01/03/2024, 10:03 AM
To be honest with you, I never 100% managed to fix the issue myself, the bot sometimes still doesn't refer to the link. The best way would be to be EXTREMELY clear in the KB, to the point of creating a separate KB (but I know it doesn't help in your example). I wanted to test this actually with GPT 4 to see if the chatbot can then understand the task
Alright, have you tried disabling the personality agent yet?
d

dazzling-car-78136

01/03/2024, 10:10 AM
okay disabling it fixes incomplete answers for now. Renabling again causes it, so progress there
@silly-journalist-24086 apologies for the takover, but this should help out ig 😅
w

wide-oyster-38514

01/03/2024, 10:12 AM
Small steps I guess haha!
It wil lstill probably cause broken links or incomplete answers sometimes
I always found the web search unreliable
d

dazzling-car-78136

01/03/2024, 10:13 AM
thanks a lot! this would definitely be a bug worth reporting, cause i remember this being a very old problem, earlier disabling summary agent used to fix it
w

wide-oyster-38514

01/03/2024, 10:13 AM
Yes, there are a few issues being reported to the team
d

dazzling-car-78136

01/03/2024, 10:13 AM
yeah, ill try to refine the prompt ig, get that probability down
thanks!
w

wide-oyster-38514

01/03/2024, 10:14 AM
You're welcome buddy!