While reading knowledge base files, the assistant ...
# support
s
While reading knowledge base files, the assistant stops midway and does not continue @Vapi
v
@Shrey I'm sorry to hear that you're experiencing issues with the assistant while reading knowledge base files. To assist you better, could you please provide more details about the problem? For instance, is there a specific file or section where the assistant stops, or does it happen at random intervals? Additionally, are there any error messages displayed when the issue occurs?
You can continue this conversation by mentioning me in the message.
s
There is no error. It just stops randomly. Its a word doc
This is the call I am concerned about: call id:750b3db7-dee8-49c7-85d5-dc9f01d93f2c. The assistant was getting knowledge from the knowledge base and stopped mid way. This is the part of the transcript: Essential medications for conditions like blood pressure or thyroid can be taken with Is there anything else you need help with? It stopped after taken with and did not continue. When told to continue, it didnt continue but stared the document again from the beginning instead. @User @User
When told to continue, it didnt continue but stared the document again from the beginning instead. @Vapi @Shubham Bajaj
v
@Shrey It seems there might be an issue with the assistant's handling of the document reading process. If the assistant is restarting the document from the beginning instead of continuing from where it left off, this could be due to a problem with maintaining the reading state or a bug in the reading algorithm. To address this, I would recommend the following steps: 1. Ensure that the document is in a format that the assistant can easily parse and read. Complex formatting or embedded objects can sometimes cause issues. 2. If possible, try breaking the document into smaller sections and have the assistant read them one at a time. 3. Check if there are any updates or patches for the assistant that might resolve this issue. 4. If the problem persists, consider reaching out to the support team with the call ID and a detailed description of the issue for further assistance. Would you like me to guide you through any of these steps or help you in contacting the support team?
s
Roughly how many words should be there in a chunk of a document? @Vapi
v
@Shrey For optimal performance and to prevent issues like the one you're experiencing, it's generally recommended to break down documents into manageable chunks. A good size for a chunk can be around 500 to 1000 words. This range is typically large enough to contain complete sections or topics for context, but not so large that it becomes unwieldy for processing. However, the exact number can vary depending on the capabilities of the assistant and the complexity of the document's content. If you notice that the assistant handles smaller chunks more reliably, you might want to adjust the size accordingly. Would you like to try breaking the document into smaller sections and see if that helps with the reading process?
s
The document that I have provided the assistant with is of approx 400 words. @Vapi
v
@Shrey If the document is approximately 400 words, it should typically be within an acceptable range for the assistant to handle without issues. Since the assistant stopped randomly and did not continue when prompted, this suggests there might be a specific issue with how the assistant is processing the document. Here are a few steps you could consider: 1. Check the document for any unusual formatting or characters that might be causing the assistant to stop. Sometimes hidden formatting or special characters can disrupt the reading process. 2. If the document contains images, tables, or other non-text elements, try removing them to see if the assistant can read the text without interruption. 3. Ensure that the assistant's software is up to date, as updates may contain fixes for issues like this. If you've already tried these steps or if the problem continues, it would be best to reach out to the support team with the call ID and a detailed description of the issue. They may need to investigate further to determine the cause and provide a solution. Would you like assistance in contacting the support team, or is there anything else I can help you with regarding this matter?
s
@User This was the last model end token after the user input so it's not from our side instead from LLM and KB.
logs
🔵 07:46:12:480 [user LOG] Model output: with 🔵 07:46:12:485 [user LOG] Model request cost (attempt #2, $0.0696, 6213 prompt, 249 completion) 🔵 07:46:12:485 Model Sequence Request Complete (attempt #2). https://cdn.discordapp.com/attachments/1329700156827893821/1329907595267412020/message.txt?ex=678c0c77&is=678abaf7&hm=a90afa4e0b700fd029c8809ae7b36fd45df2524acf88f1dc083cae73a90ee28b&
s
@Shubham Bajaj Its not because of the knowledge base because there are some more words after that. I am not sure about the LLM though. What can be the possible reason if its LLM?
s
@Shrey You are using KB provider
Canonical
, which has stopped their services. Instead, you need to use
Trieve
, which is the default partner and choice. Most likely due to KB chunking issues, responses are not coming in complete. You can learn how to set up the new KB provider here: https://docs.vapi.ai/knowledgebase
@Shrey do let me know how it goes.
s
@Shubham Bajaj I just uploaded the doc files in the knowledge base, I didn't choose any provider, its a bit confusing.Isn't that what I am supposed to do?
s
@Shrey The dashboard is not developed to use new KB provider you have to use the API and follow the mentioned steps do let me know if you have more doubts.
s
@Shubham Bajaj Is this the api you're talking about?
curl --location 'https://api.vapi.ai/knowledge-base' \ --header 'Content-Type: text/plain' \ --header 'Authorization: Bearer ' \ --data '{ "name": "knowledge-base-test", "provider": "trieve", "vectorStoreSearchPlan": { "scoreThreshold": 0.1, "searchType": "hybrid" }, "vectorStoreCreatePlan": { "fileIds": [""] } }'
@Shubham Bajaj the fielid in this consists of the file id on Trieve platform, am I right?
s
File id on vapi not on trieve platform
s
@Shubham Bajaj Where will I get file id on vapi?
s
Visit the Vapi Dashboard and then go to files section you can find file ids over there.
s
@Shubham Bajaj I just added it now, the agent is also saying some random information. I mean not random, its actually some extension to the content in the knowledge base, but we don't need that for now. The temperature as you suggested is 0.3.
s
> the agent is also saying some random information. I mean not random, its actually some extension to the content in the knowledge base, but we don't need that for now. @Shrey could you rephrase this, I didn't understood what's the issue now.
s
@Shubham Bajaj ok, so it is adding some external knowledge to the response other than in the knowledge base
s
@Shrey its not right could you share the call id,expected and actual response so I could take a look.
s
@Shubham Bajaj here is the call id:8fcab19a-cdd8-49de-a801-6ad132d00bf7
s
@Shubham Bajaj I did upload 1 file from the trieve api method. I am not sure why it still says canonical
s
@Shrey You forgot to attach the knowledge base to your assistant. There seems to be a lot of back and forth happening. Would it be possible for you to join office hours? That would help resolve most of your doubts quickly and get you unblocked. https://discord.gg/E4TEgnHV?event=1329518609839554660
s
@Shubham Bajaj The time seems to be an issue. I'll try my best
s
@Shrey if time is an issue you can write all doubts/questions here.
s
@Shubham Bajaj how can I attach the kb to my assistant?
@Shubham Bajaj I uploaded the kb and also attached it to my assistant. I was checking the responses this morning and the agent is not reading the document properly. It adds its own content. I would be ok with 1-2 sentences or words here and there but it just takes basic idea from the document and speaks for itself. This is the call id I am talking about:a2ab6263-e50b-473d-a97e-5e1b81af63c6. You can see the transcript for the day of the procedure. Its not the knowledge in my kb. It just adds up many information itself. It also makes weird noises occasionally
s
s
@Shubham Bajaj That'd be great. Also some knowledge about the chunks would be great for the best practices. Thank you
@Shubham Bajaj the txt file you've is not quite clear. Can you jelp me understant it better
@Shubham Bajaj this is another call id for the same problem:c2d827b2-80b8-4377-a3cf-141598994b28
@Shubham Bajaj did you check the details??
s
@Shrey I will get back to you on this by today, sorry it got missed from list. As of know I away from my keyboard so couldn’t take a look.
s
@Shubham Bajaj no worries
s