Question on Uploaded Document word count

Hello! Quick question. When a user uploads a Word doc or PDF, is there a reliable way for a chatbot to detect the word count?

I tried building a test bot to do this, but the results are way off. For example, I uploaded a file with 3,000+ words and the bot said it only had around 500. Even weirder, every time I reupload the same file, the word count changes and usually lands somewhere between 400 and 600.

I also tried uploading the same file directly to GPT, and while it’s not 100 percent perfect, the number it gives is at least pretty close.

Hi @jonah.amor! Our RAG system chunks uploaded files and URLs - which is why you might not be seeing the correct word count (you can learn more about this here). If you expand your token limits for your Knowledge Base, that might do the trick, because the model can then view the entire document in full. Otherwise, you should be able to accomplish this with a custom Action!

1 Like