﻿# LibreChat File Context and Upload as Text have different persistence scopes

Choose LibreChat agent File Context, conversation text, or File Search by persistence and reading needs, accounting for repeated context and extraction timing.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-librechat-file-context-upload-text/
Language: en

## Choose the lifetime of the material

A reusable support agent needs a short terminology note on every question, while one conversation needs a temporary customer log. Giving both documents the same attachment treatment can either hide the terminology from later chats or expose temporary material to a broader agent audience. Decide the intended lifetime before choosing an upload path.

## Use File Context for repeated reading

The [Agents guide](https://www.librechat.ai/docs/features/agents) describes File Context as text extracted once at upload and included in the agent's context on each message. This suits a small stable reference the agent should repeatedly receive. It also means later edits to the original desktop file do not themselves establish that the stored extraction changed.

## Keep conversation text scoped

[Upload Files as Text](https://www.librechat.ai/docs/features/upload_as_text) describes extracted content added to a message. The current interface can infer delivery from file type, while some deployments retain an explicit destination menu. Verify the installed interface and actual route. A conversation-only attachment should not be assumed part of every future conversation with the same agent.

For the customer log, preserve the case identity and source version with the chat. For the terminology note, preserve the approved agent-level revision. The distinction makes it easier to explain which material informed a later answer without treating every old attachment as shared permanent knowledge.

## Budget persistent context

The Agents guide notes that File Context rides along on every message. Large documents therefore consume repeated input space, and the guide warns that people who can chat with the agent can elicit that text. Hiding a file from a builder view is not a reason to treat its model-visible contents as a secret.

## Use retrieval for a larger corpus

[File Search](https://www.librechat.ai/docs/features/rag_api) indexes files and retrieves passages when the model calls the tool. This provides another tradeoff: a large corpus need not be inserted in full every turn, but an answer depends on selected passages. Keep that selective reading distinct from the promise that the agent always sees a short reference.

The existing guides to [task contracts](/journal/learn-codex-task-contract/) and [structural chunk boundaries](/journal/rag-chunking-structure-token-boundaries/) help define the choice. Review source lifetime, audience, update timing, and reading coverage separately before deciding which file belongs in which scope.
