Background

In the chat and assistants, you can add up to 20 files and send them with your prompt to the model. This is due to the limited amount of information the models can process simultaneously (= Context window, see this guide for details about sending documents in the context window).

To add more than 20 files, you can create knowledge folders in the settings. Here, you can add up to 1,000 files in one folder. This folder can then be attached to assistants and found in the Search feature. With this feature, the number of files can easily surpass the context window size of the model (the text in attached folders can be longer than the processing limit of the model). The model is split into different sections. Then, relevant sections for answering the user prompt are identified, and only these relevant text sections are sent to the model in the context window. This knowledge folder feature allows us to work with large document numbers but reduces accuracy, as not every part of the documents is considered.

How to use knowledge folders

You can find the knowledge folders in your settings. You can either upload files from your computer or push files into the folder through an API (see next section below). After you have put the files into the folder, you can go to an assistant and attach the folder in the Knowledge section by clicking on Attach and then Select.

Knowledge folder API

To push files to the knowledge folder, you can use the API of the folder. You can request an API key from support@langdock.com. You can find the API schema in the following guides. The current rate limit is 50 requests per minute.