File reading gives an agent access to information that is unavailable in model training data. When a user attaches a spreadsheet or document, the agent must retrieve the file rather than guess from prior knowledge. section 2.4.3
The minimal implementation adds a file-reading tool to the agent loop. For a small file, the tool reads the complete contents and places them in the model context, allowing the model to answer questions about the data. section 5.1.1 section 1.5.6
Use file reading when:
- The question depends on an attached spreadsheet or document. section 2.4.3
- The file is small enough for its complete contents to fit in the context window. section 5.1.1
- The agent needs an external capability alongside web search or calculation. section 2.4.3
Finding the highest-sales month
Given a CSV file and the question “What month had the highest sales in this data?”, the agent reads the file, places its contents in context, and uses that information to answer. section 5.1.1
Table 2.2 Required capabilities for unsolvable problems
| Missing capability |
Count |
|---|---|
| Web search and web page access |
11 |
| File reading |
6 |
Compare file reading with web access as a missing capability in unsolvable benchmark problems. section 2.4.3
