How to give ChatGPT context from your local files

ChatGPT works best when it has context about your project. The most effective way to provide that context is by giving it your actual files: notes, documents, code, PDFs, and anything else that defines what you are working on.

Why context matters for ChatGPT

ChatGPT starts every conversation with zero knowledge about you or your project. It does not remember previous chats, and it cannot access your computer. The only information it has to work with is what you type or upload in that specific session. If you ask it to "continue working on the project," it has no idea what project you mean.

This is why giving ChatGPT your files makes such a difference. When the AI can see your actual project documents, it writes more accurate responses, makes fewer assumptions, and produces output that fits your specific needs rather than generic advice.

Method 1: Upload files directly

ChatGPT Plus, Team, and Enterprise plans let you upload files directly into the chat. You can attach up to 10 files per message, with a rolling limit of around 80 files per 3-hour window. Supported formats include text, PDF, code, spreadsheets, and images.

This works well for small tasks involving a few files. But when your project spans 20 or more documents across multiple folders, uploading them individually becomes tedious and hard to manage.

Method 2: Combine files into one upload

A more effective approach is to merge all your relevant files into a single structured text file before uploading. ChatGPT accepts plain text files up to 512MB, so you can include the content of many documents in one upload.

The advantage is that ChatGPT processes the combined file as a unified body of knowledge. It can cross-reference ideas across documents, find connections between notes, and maintain consistency because it sees everything at once rather than as disconnected uploads.

How to combine files: You can do this manually by copying and pasting into a text file, but tools like Riflet automate the process. Select your files and folders, and Riflet produces a single Markdown file with clear section headers separating each source. You upload that one file to ChatGPT and the AI immediately has full project context.

Method 3: Use ChatGPT Projects

ChatGPT Projects let you upload files that persist across multiple conversations within that project. This means you do not need to re-upload your context every time you start a new chat. However, Projects are limited to ChatGPT only. If you also use Claude, Gemini, or other AI tools, you will need a separate approach for those platforms.

What files to include

The best context bundles typically contain four categories of material. A project brief that explains what the project is, what stage it is in, and what constraints exist. Reference documents such as notes, research, past work, or specifications. Style and formatting guidance so the AI matches your tone and conventions. And instructions that tell the AI what kind of help you want and what to avoid.

Keep the total size under 50,000 words to fit comfortably within ChatGPT's 128,000-token context window while leaving room for the conversation itself. Riflet shows a token estimate before you export, so you can check this before uploading.

Tips for better file-based context

Use Markdown formatting in your files. ChatGPT handles Markdown well, and headers, bullet points, and code blocks help it navigate your content more efficiently. Label each section clearly so the AI can find specific parts when answering questions. Remove irrelevant content before uploading to avoid diluting the signal with noise. And save your context bundle so you can reload it for future sessions without rebuilding from scratch.

Build your ChatGPT context in seconds

Riflet bundles your local files into one AI-ready file. Download free for macOS, Windows, or Linux.

Download Riflet free