AI Learning Hub › Learn AI › Self-Paced Courses › Introduction to AI › Intermediate › Working With Documents, Data, and Media
Level 3 of 4 · Intermediate · Lesson 5 of 6
Working With Documents, Data, and Media
Practical and conceptual issues in using AI with documents, structured data, and media.
About 15 minutes
Skip to lessonBy the end of this lesson you should be able to
- Tell whether a tool is ingesting, extracting, interpreting, or generating, and choose the check each step needs
- Preserve source locations, identifiers, units, status flags, and missing values when extracting data
- Run a small pilot before a batch, and match the depth of review to the stakes
Why this matters
Much AI-assisted work starts with material: a PDF of readings, a spreadsheet of registrations, a policy draft with tracked changes, a recorded meeting. Meaning can be lost at steps you never see: a scanned page that was not read, a blank cell that became a zero, a deleted sentence that was summarized as if it were current. The question for this lesson is: how can I preserve meaning when AI reads or transforms material?
Four steps, four kinds of check
- Ingesting
- What happens: the tool reads the file into something it can work with.
What to check: that it read the part you care about. Ask it to quote a specific passage, or the value in a specific row, and compare. A correct answer checks that sample; it does not show the whole file was read. - Extracting
- What happens: it pulls out particular content, such as dates, names, amounts, or rows.
What to check: each extracted item against its location in the source, and whether anything was missed or added. - Interpreting
- What happens: it classifies, compares, or says what the content means.
What to check: the categories and the reasoning, not just the conclusion. - Generating
- What happens: it writes something new from the material: a summary, a chart description, an email.
What to check: every claim in the new text against the source (Lesson 4).
Errors made early carry forward. A summary built on a bad extraction can be fluent, confident, and wrong in every figure.
What to watch for, by kind of material
Tools differ in what they can read. Check your tool’s documentation, and test it, rather than assuming it reads every feature of a file.
- PDFs. Some PDFs contain actual text. A scanned PDF may be images of pages only, or images with a text layer added by text recognition (OCR), which can misread names and numbers. Tools differ in how they read a file: some extract the text layer, some run OCR, some look at page images, and some combine these. One provider, for example, documents sending each page’s extracted text alongside an image of the page. (Anthropic, “PDF support” (opens in a new tab); provider documentation for one product.) Tables, footnotes, and headers may be read out of order. And a tool’s ability to read a scanned page does not make the PDF accessible to people using assistive technology. (W3C, “PDF7: Performing OCR on a scanned PDF document to provide actual text” (opens in a new tab).)
- Word-processing documents. Confirm which version is being read. Tracked changes and comments may be read as ordinary text, merged, or ignored, depending on the tool.
- Spreadsheets. A cell can show a value produced by a formula; units often live only in the column header; hidden rows and extra sheets are easy to miss. An empty cell is not automatically zero.
- Images. A description can miss or misread small text and details.
- Audio and video. Transcripts can get names, numbers, and speakers wrong. Before recording, check the notice or consent that applies; before uploading or sharing, check your rights in the recording and whether its permitted use extends that far. Permission to record is not automatically permission to upload or share (see Beginner Lesson 5 for which services are approved for which information).
Preserve what the source knows
- Keep the original unchanged, and work from a copy.
- Keep stable locations: page and paragraph, row ID and column, or a timestamp, so every output value can be traced back.
- Keep identifiers exactly as written. Do not let rows be merged, renumbered, or re-sorted without a record.
- Keep units with the numbers: minutes or hours, people or sessions, dollars or thousands of dollars.
- Keep the difference between zero, not recorded, and not applicable.
- Keep status flags such as “canceled,” “draft,” or “superseded.”
Structured output, such as a table or a spreadsheet-ready list, is easy to paste into other tools, and it can still be wrong. A file that opens without errors has passed a format check, not a content check.
Worked example: which version did it read?
A constructed example. The policy and summary are fictional.
A staff member uploads a draft room-booking policy with tracked changes still in it. One sentence reads, with the edits shown:
Requests must be submitted
3021 days before the event. Requests for rooms with recording equipment also need approval from Media Services.
In the sentence above, “30” is marked as deleted and “21” and the second sentence as inserted.
The assistant’s summary says: “Requests must be submitted 30 days in advance.”
- What the summary shows: a mismatch with the edited text. It gives the deleted figure, 30 days, and omits the inserted approval requirement for recording rooms.
- What it cannot show: where the error happened. The tool may have read the deleted text, used the unedited version, or extracted or summarized badly; the final summary alone cannot tell you which.
- The fix: decide which version should be summarized. Keep the original. If the edited draft is intended, accept the changes in a working copy, use that clean copy, and compare the output with it. Accepting the edits in a copy makes the text easier to read; it does not make the draft an approved policy.
Pilot small, then review in proportion
Before running a tool across forty documents or four hundred rows, try it on a handful where you already know the answers, including an awkward one: a scanned page, a missing value, a canceled item. Fix the instructions, then run the batch.
A clean pilot is limited evidence. It can justify trying a larger run and shows you what to watch for, but it does not prove the process works on every item or that the batch will be correct. After the batch, match the review to the stakes:
- Check every item for exact quotations, figures that drive a decision or appear in public, and anything sensitive or sent to individuals.
- For lower-stakes work, spot-check items across the batch, including its start, middle, and end, and run simple checks: do the counts match, do totals reconcile, are there values that look out of place?
An extraction instruction you can adapt
Extract these fields from the table below: [list the fields]. - Keep each row's ID exactly as written. One output row per source row; do not merge, split, add, or re-sort rows. - Keep units as given in the column headers. - Keep the difference between a blank cell, a missing-value marker the source defines (such as "Not recorded"), zero, and not applicable. Copy a source marker as written; leave a blank cell as BLANK unless I tell you what blanks mean. Never enter 0 or an estimate for a missing value. - Copy status flags (such as Canceled) exactly. - For each value, give its source location (row ID and column). - Do not calculate totals or averages unless asked. - At the end, list anything you could not read or were unsure of.
Try it: check an extraction and its summary
A constructed exercise. The workshops, numbers, and assistant output are fictional.
A library staff member keeps this log and asks an assistant to extract it and write a one-sentence summary for a report. In the log, “Not recorded” means the number was never entered. On a narrow screen, scroll the table sideways to see every column.
| ID | Session | Length (minutes) | Registered (people) | Status |
|---|---|---|---|---|
| W1 | Citation basics | 60 | 24 | Held |
| W2 | Database searching | 90 | Not recorded | Held |
| W3 | AI and legal research | 60 | 31 | Canceled |
| W4 | Updating case law | 45 | 18 | Held |
The assistant’s extraction (constructed):
id, session, minutes, registered, status W1, Citation basics, 60, 24, Held W2, Database searching, 90, 0, Held W3, AI and legal research, 60, 31, Held W4, Updating case law, 45, 18, Held
The assistant’s summary (constructed):
All four workshops were held, with 73 attendees in total (about 18 per session) and 4.25 hours of instruction.
- Which extracted values do not match the log?
- What is wrong with each part of the summary?
- Write a corrected summary.
- If the log had 40 rows, what checks would you run on the extraction?
Answers and discussion
- Two values. W2’s registration is “0”; the log says not recorded. W3’s status is “Held”; the log says Canceled. The extraction is tidy and well formed, and it is still wrong.
- “All four workshops were held”: three were; W3 was canceled. “73 attendees”: 73 is 24 + 0 + 31 + 18, so it counts the canceled session and treats W2’s missing number as zero. It also changes the meaning: the log records registrations, not attendance. “About 18 per session”: 73 ÷ 4, so it inherits both errors; and with W2’s number missing, no complete total or average can be computed from the log. “4.25 hours”: 60 + 90 + 60 + 45 = 255 minutes includes the canceled session. The listed lengths of the held sessions total 60 + 90 + 45 = 195 minutes, or 3.25 hours. The log gives scheduled lengths; it does not show how much time was actually delivered.
- For example: “Three of four scheduled workshops were held, with listed lengths totaling 195 minutes (3.25 hours); W3 was canceled. Registration was recorded for two of the held sessions (W1: 24; W4: 18) and was not recorded for W2. The log records registrations, not attendance.” Any version that keeps the cancellation, the missing value, and the registration-versus-attendance distinction is correct.
- Check that the output has 40 rows and every ID appears once; compare every status flag and every missing value with the log; spot-check numbers from the start, middle, and end; and recompute any total yourself from the original, counting only the rows that belong in it.
Trace every figure back to a location. Before a number, quotation, or status leaves your hands, you should be able to point to the row, page, or timestamp it came from, and say how missing and canceled items were treated.
Further reading
- Beginner Lesson 5: Using AI at Stanford Law — which services are approved for which information, before you upload anything.
- W3C: PDF7, OCR and actual text in scanned PDFs (opens in a new tab) — the difference between an image of text and a text layer. A technique for one accessibility requirement, not a complete accessibility check.
- Anthropic: PDF support (opens in a new tab) — provider documentation describing how one product reads PDFs. Other tools work differently.
- Stanford UIT: Responsible AI at Stanford (opens in a new tab) — Stanford’s guidance on safe use, including verifying results.