https://discord.gg/botpress logo
Botpress RAG Limits – Best Practices for Handling ...
# 🤝help
l
Hello, I need some help. I’m usually an AI engineer working with LangChain and LangGraph, but now I need to quickly build a prototype chatbot in Botpress for a client. I’m wondering what’s possible and what the limitations are, because I have 20 to 30 books, each with around 300 pages. ❓ My main questions: • What are the limitations per single chatbot? • How many books can it realistically process while still maintaining good accuracy? • I’m using Autonomous Node and GPT-4.1 — can one chatbot handle 3 books with 300 pages each? → Will that be too much, or do I need to reduce it? If I have to reduce the data size, I might end up with multiple chatbots, which is okay — I’m just exploring options. Also, I’d like to know the best practices for handling this. 📌 Use case: The user will enter a brief description or keyword, and the chatbot should return: • Where this was found • In which chapter, • On which page, • Along with a short quote or snippet from the source. Thanks in advance if anyone can help clarify these points.
w
hi 🙂 a single bot can handle high volume of files (since it's based on semantic/vector search) but in your case, you should have a strategy for the indexation I mean, you should add tags to your documents, so your can then easily find the chapter and page (like metadata associated with a document that corresponds to this chapter/that page) this will require kind of a custom logic but yes that is feasible
p
Split into 750-token chunks
I just leveled up my Botpress autonomous‑node prototype using a mix of chunking, metadata tagging, and RAG — and the results have been really encouraging. Here’s a streamlined approach that’s been working well: 1. Chunk + Tag for Precision Split each 300‑page book into ~500–1 000 token chunks, and include metadata like book name, chapter, and page number. This makes it easy to point users directly to the right location. 2. Use a Vector DB + Top‑K Retrieval Embed all your chunks in a vector database. On each query, run a semantic search (top‑k) to surface the most relevant chunks. 3. Prompt for RAG‑Style Answers In your Autonomous Node prompt: - Retrieve the top‑k chunks. - Ask GPT‑4.1 to answer concisely. - Then include: book title, chapter, page, and a short snippet. That last step is critical — it gives your bot real sources to cite, which cuts hallucinations. 4. Keep the Conversation User‑Friendly Use menus or buttons for navigation early on (don’t leave users guessing). Also, confirm or validate their input , the more you mirror their intent, the clearer the experience. 5. Let It Loop (With Graceful Exits) Allow users to keep asking related questions or give them a polite way to end the chat — both keep things feeling natural .
l
But how can this be done on the Botpress platform? Or do I need to split the entire book into smaller chunks and add tags to the documents myself through code?
If I understood correctly, I need to use Python — for example with Langchain — to split the book into chunks, and then store those in a vector database like Qdrant or Pinecone, or maybe in the Botpress platform’s knowledge base? I’m not quite sure I fully understand which tech stack and steps I should use.
w
Yes I think you would have to use files api (references in the doc), to upload each document along with relevant tags
And yes you would have to split them by pages, but I think with a python script it can be done pretty easily
l
Okey thanks! Do you maybe know if there is python reference i saaw only TS?
w
You mean TS client? Indeed there is no such thing for python, but you can still use the basic api
l
Thank you very much! So just to summarize — if I want to improve the accuracy of my RAG application, it would help to manually chunk the book myself, add metadata to each chunk, and then upload those chunks into the knowledge base. Is that correct?
w
Not exactly chunk (i mean the chunking for rag is done by botpress directly), but split by pdf page. to summarize : Let's assume each page of the pdf corresponds to a page of the book. Use python to split the pdf page by page, and to upload one page at a time (using the api : https://botpress.com/docs/api-reference/files-api/openapi/upsertFile). For each page, add "tags" (that will be useful later on) : for instance, a tag "name", one "pageNumber" and everything you would need (https://botpress.com/docs/api-reference/files-api/openapi/upsertFile#body-tags). then, within the bot, create the retrieval part using the API (endpoint searchFiles : https://botpress.com/docs/api-reference/files-api/openapi/searchFiles) , and you'll see that the retrieved passages come along with their tags, so AI can use both passages and tags to craft your response
hope that's more clear 🙂
l
Yes Thank you very much! So if i want to create more powerful workflows in my case RAG workflow i need to use botpress API actions
w
Yep I've been using Botpress client/api , especially for Rag workflows or equivalent , for a few months now and it allows much more customization, let's say
Just like tagging , as it is your current use case
2 Views