Understand how adding knowledge bases differs in Tess AI!
Tess AI offers a wide range of AI models, which can be used by the AI Copilot or in templates. However, even the most advanced LLMs (Large Language Models) have an inherent limitation: the training context window. This is where RAG (Retrieval-Augmented Generation) comes in, a feature that allows you to expand the knowledge of your chat templates beyond what the models can handle in terms of content volume, opening up possibilities to create increasingly trained chats, and Deep Learning.
Overcoming Context Limitations with RAG
LLMs are trained on massive datasets, which allows them to generate text, translate languages, and answer questions impressively. However, this knowledge is somewhat static, meaning if an LLM has a context window of 200k tokens, the contents you use to train it in the Knowledge Base cannot exceed that limit.
RAG breaks this barrier, allowing your chats to access and read extra information beyond the attachments of the Knowledge Base, complementing the provided context and delivering more complete answers.
When you add a knowledge base, you have the option of RAG or Deep Learning. RAG allows you to read larger files because it can "break down" the content that was attached.
Every time you ask something through the prompt, it will break your file into 10 parts, called chunks, and look for the broken information among those 10 parts. So, if your prompt is simpler, it might "not find" what you're looking for in those 10 parts.
However, with a more precise prompt, this selection of 10 parts will be even more accurate, potentially finding more than just the basics!
That's why we recommend that your interaction with the prompt be more precise, with a deeper and more specific question about the added document!
Deep Learning
In Deep Learning, it is very likely that the LLM can read the file, but note that for large files, the chance of error is high. This happens because in each interaction, it will be necessary to query the entire document to get the answer, and there won’t be any breaking down like explained in RAG. So, consumption will also be higher and should be better prepared by the user.
Practical Example
Let’s assume you want to add a knowledge base to your copilot.
If you choose the RAG format, with each interaction, your file will be split into 10 parts, allowing the prompt to always be updated. This way, you don't necessarily consume the entire file, but only what's most relevant, based on your prompt.
If you choose the Deep Learning format, with each interaction, the AI model will search through the whole file for the context you've provided, whether it's more precise or broader. This format will consume more credits and, of course, should be used moderately due to its accuracy.
Note
When creating an agent and choosing a knowledge base to add, the file attachment model for your base will always be in the RAG format!
Conclusion
RAG and Deep Learning work perfectly well together. When to use them is up to you, but now you have the material to understand each one.
See you next time!