Skip to content

Lesson 10 ยท Files, Data and Code

Uploading and Asking About Files in ChatGPT

Upload documents, spreadsheets, images and audio to ChatGPT, know the file limits, ask grounded questions, check the answers and protect private data.

Instead of pasting long text, you can attach files and ask questions about them. ChatGPT can summarize a report, pull dates from a draft contract, explain a chart or help you compare two documents. Your job is to ask grounded questions and check the answers against the file.

What you can upload

As of December 2026, OpenAI's file upload help page lists these groups:

  • Documents and text: DOCX, PDF, TXT, Markdown, HTML, XML, JSON, YAML, Python, RTF, ODT and EML.
  • Spreadsheets: XLSX, XLS, CSV, TSV and ODS.
  • Presentations: PPTX and ODP.
  • Audio: common formats such as WAV, MP3, OGG, FLAC, AAC and M4A. Files identified as video are not accepted as audio.
  • Images, such as photos and screenshots.

Native Google Docs files need to be exported to PDF or DOCX first.

Limits to know

The same page states these limits, which can change:

Item Limit (December 2026)
Documents and presentations 512 MB per file
Text and document files 2 million tokens per file
CSV and spreadsheets about 50 MB, depending on row size
Images 20 MB each
Audio 512 MB per file
Upload rate up to 80 files every 3 hours (Free: 3 per day)
Upload storage 25 GB per user, 100 GB per organization

OpenAI may lower limits at busy times, projects have their own file counts and some audio features have extra length limits. A token is a chunk of text; see context windows and token budgets.

Text inside images and scanned pages

For a PDF attached directly in a chat, OpenAI says ChatGPT can analyze both text and images, including charts. PDFs added to project files are handled differently, and pictures inside them may not be included automatically. If a chart or photo matters, upload it separately as a PNG or JPEG. Check scanned pages carefully: reading text from a picture can produce mistakes.

Ask grounded questions

Tie answers to the document:

TEXT
Using only the attached report:
1. List every deadline with the page or section where it appears.
2. Quote the exact sentence for each.
3. If something is not in the report, say "not found".

Quotes and locations make checking fast. Search the file for each quote. If you cannot find it, treat the answer as unconfirmed until proven otherwise.

Long documents

A very long file may not be fully considered in one answer. Reduce the risk:

  • Ask about one section at a time.
  • Ask which sections were used to answer.
  • For "find every mention" tasks, verify with your own search, because the answer may miss items.
  • Split huge collections into smaller, clearly labeled files.

Check quotes against the source

This block is a plain-Python check you can adapt. It confirms that every quoted phrase really appears in the source text. The sample text and quotes are invented.

Python Verify that quotes exist in the source

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The third quote is not in the source. In real work, that is the signal to reopen the file. Note that the check cannot tell whether a real quote was interpreted correctly; you still read it in context.

Compare two files

Attach both and ask for a structured comparison:

TEXT
Compare version A and version B. Table: topic, A says, B says,
changed? Quote both versions for every changed row.

For legal or financial documents, a comparison helps your own review or a professional's review. It does not replace it.

Where files go

OpenAI says files saved in Library or Space are stored separately from the chats that used them. Deleting a chat does not delete a saved file, and deleting the file does not remove content already brought into a chat. If you need something gone, check both places.

Before you upload

Ask yourself:

  • Am I allowed to share this file?
  • Does it contain personal data, passwords, keys or confidential business information?
  • Can I remove names, account numbers or other identifiers first?
  • Which account am I using, personal or work?

The privacy lesson later in this course goes deeper.

Files can also contain hidden instructions aimed at AI tools, such as invisible text saying "ignore the user". Be careful with files from unknown senders, and check any surprising action or claim.

Prepare a file for better answers

Small preparations improve results. Give the file a descriptive name. For spreadsheets, use one table per sheet with a single header row, clear column names and no merged cells. Add a short note that explains codes or abbreviations. For documents, keep headings intact, so you can refer to sections by name. If a scan is crooked or faint, make a better copy before uploading it.

When an answer seems wrong

Ask ChatGPT to quote the exact passage it used. Check that the passage exists and means what the answer claims. If the file was long, ask about only the relevant section, or paste that section into a new message. If two parts of the document disagree, tell ChatGPT to report both and not to choose silently.

Practice with a safe file

Create a one-page document with invented facts: three dates, two amounts and one rule. Upload it and ask the grounded questions above, plus one question whose answer is not in the file. Check whether you get "not found" for it. This shows you how the answers behave before you trust them with real material.

Common mistake: trusting "the document says..." without searching the document. Always spot-check important claims.

Check your understanding

Quick check ยท 3 questions

of 3 answered You scored / 3 ยท perfect!

  1. 1. Why ask for exact quotes and section locations?

    Quotes and locations let you confirm the claim in the source.
  2. 2. You delete a chat that used a file saved in your Library. What happens to the saved file?

    OpenAI says saved files and chats are separate.
  3. 3. A chart in a project PDF seems to be ignored. What can you try?

    Images inside project PDFs may not be processed automatically.

Summary

  • ChatGPT accepts documents, spreadsheets, presentations, images and audio, within limits.
  • Ask grounded questions with quotes and locations.
  • Check long-file answers carefully.
  • Saved files and chats are deleted separately.
  • Share only data you are allowed to share.

Next: Data Analysis and Charts in ChatGPT

Your progress is saved in this browser. No account needed.