How does a file attachment work and how is it different to a file in a knowledge folder?
There are two ways how contents of a file are processed for generating an answer:
-
One is that the entire document is sent to the model, together with your prompt (see this guide). This is the standard in chats and assistants.
-
AI models have a context window, which is the limit of how much text can be processed at once. For long documents or a large number of documents, the documents are summarized and only relevant sections are sent to the model in the context window. This is used in knowledge folders.
Attaching the files directly to an assistant or to a chat leads to the best results. If possible, you should follow this option. We recommend to attach as few documents as possible to an assistant or chat.
In some use cases, for example when working with large documentation or for an FAQ assistant, attaching the documents to an assistant or to a chat directly is not possible. Here, you can use the knowledge folder feature, which works well for use cases, where only specific sections are relevant, but not the entire documents.