File Preview in the Model’s Context Window
Langdock sends as much text from each document as possible to the model as a preview. Small files can appear in full. Files attached to a chat stay on the direct preview path. For Agent knowledge, the 20 document threshold counts documents attached to the Agent. Above the threshold, text documents remain available through file lists and file tools, while spreadsheets stay available for direct reading. Synced folder text uses semantic search. Images are passed as visual content so you can analyze them directly.Embedding Search
For supported text documents in Knowledge bases and synced folders, the model can use embedding search. Spreadsheets in synced folders remain available as complete files and are not embedded. During upload, a text document is first split into smaller sections (chunks). Each section is then converted into an embedding, a numerical representation that captures the meaning of the content. When a question is asked, the system finds the sections whose content best matches the question. This doesn’t search for specific words, but for sections with similar meaning. Only these relevant parts are sent to the model in context. This enables working with very large documents that exceed the model’s context window.Our Parameters
Embedding Dimension
The vector dimension is 1536.
Chunk Size
Documents are split into sections of up to 2,000 characters.
Retrieval Parameter (k-value)
Knowledge base search returns up to 50 chunks per query.
FAQ
When does Langdock send a whole file into the model context?
When does Langdock send a whole file into the model context?
Small direct attachments are included in the model context in full whenever possible. Agents preview direct files when they have up to 20 Agent knowledge documents. Above the threshold, text documents remain available through file lists and file tools, while spreadsheets stay available for direct reading.
When does Langdock use semantic search over chunks?
When does Langdock use semantic search over chunks?
Langdock uses semantic search for supported text documents in Knowledge bases and synced folders. Direct Agent text documents above the 20 document threshold remain available through file lists and file tools. Spreadsheets use direct reading. The relevant sections are retrieved for each question, so the model may not see every document or sentence.
Why might an answer miss content from a Knowledge base?
Why might an answer miss content from a Knowledge base?
The answer depends on what was retrieved for the specific query. Content can be missed if the question is broad, the relevant wording differs from the user’s phrasing, the file was not processed, permissions block access, or too many sources compete for retrieval. Narrower questions and clearer references to files, topics, or sections usually improve results.
How do knowledge sources affect the context window?
How do knowledge sources affect the context window?
Retrieved knowledge is added to the model’s context for the current request. More knowledge sources, larger retrieved chunks, long chat history, agent instructions, and tool results all compete for the same context window.