Deep Dive into Digital and Data Methods for Chinese Studies · University of Michigan

From Printed Page to Research Data

Building humanities tools with AI agents

Mon 2026-11-16 · 2:00–3:30
Hatcher Gallery Lab 100H + Zoom
Slides: d.pr/muuuQI
KL
Kwok-leong TangDigital China Initiative, Harvard University
→ press Space or →, or swipe, to begin

Before we start

How this was made

An AI agent did the work you will see this afternoon. People planned it and checked it.

  • An open OCR model read the pages
  • An agent wrote the small programs for each step and ran the checks
  • A person checked each step before the next step began
  • AI also helped to make these slides. Any mistake is mine, not the AI's
Use the tools.Own the result.

This morning, in one slide

When AI gets it wrong, where is the problem?

1The modelIt cannot do the task, even with help.This morning: counting letters, reading backwards.
2The engineeringThe model could do it, but it was not given what it needs.This morning: today's news, a Chinese calendar date.
3The humanWe asked in one short message, asked for too much at once, or did not check.This afternoon.
The model is able. The tools are there.What is left is how we ask.

The third category

The human problem

Here is a book. Make it a database.

One sentence. A strong model with good tools will try. It will hand back something that looks finished. We cannot tell what is right in it.

WHAT WENT WRONG IS THE REQUEST

  • Too much in one step
  • Nothing that says what “right” means
  • No place where a person looks
THE FIXSmall steps, a check on each, and a person at the points that need a scholar.

What the person brings

The key instructions

A model can read, write and follow steps. It does not know your source.

ONLY THE PERSON CAN SAY

  • What the marks mean. On this page, a small circle begins a new record.
  • What “right” means. This reign has 221 months, and each must appear once.
  • What to keep. The manuscript writes 于. Do not change it to 於.
  • Where to stop and ask. If no rule decides it, show it to me.
These are short sentences.They come from knowing the source, not from knowing AI.

This afternoon

Three kinds of work, one method

OVERVIEW
Agents and skills
Two ideas we need, in five minutes
明孝宗實錄
One Ming source, 4,310 pages, from the scan to a website
Two difficult books
A 1678 household encyclopedia and a Vietnamese manuscript
Playable Pasts
Classroom games made from primary sources
One method
How the same way of working becomes a skill
Questions, then office hours at 3:45
NO LAPTOP NEEDEDThis session is a demonstration. Watch, and stop me with questions.
Today is about a way of working,not about one tool or one book.

Part 1 · Agents and skills · chat assistant vs agent

An agent is a loop

1Read the task 2Choose askill / MCP / tool 3Run it 4Read the result repeat until the task is done the trace shows each turn

Chat assistant: you ask, it answers once. One round.

Agent: you ask, and it works in many rounds. In each round it can read a file, run a tool, look at the result, and decide what to do next. Then it comes back with the answer.

WHY THIS MATTERS FOR RESEARCHEvery round is written down. You can go back and see where each part of the answer came from.

Part 1 · Agents and skills

What is a skill?

A skill is a folder that teaches an agent one task:

cjk-calendar/
├── SKILL.md     ← when to use it, and how
├── scripts/     ← code that does the work
└── references/  ← details, read when needed

The agent reads only the short description first. It opens the rest when the task needs it.

The description is plain English:

SKILL.md · DESCRIPTIONConvert between Chinese, Japanese, Korean, and Vietnamese lunisolar calendar dates and Gregorian/Julian dates. Use when the user needs to look up historical East Asian dates, convert era names (年號) like 康熙, 天保, 崇禎 to Western dates, compute sexagenary cycle (干支) day/month/year…
A tool is one action.A skill is a method: when to act, how, and what to check.

Part 2 · 明孝宗實錄 · the source

《明孝宗實錄》: one reign, day by day

The Ming Veritable Records (明實錄) are the court's day-by-day record of each reign. This one covers the 弘治 emperor, 1487 to 1505.

  • A hand-copied manuscript, printed as photographs in 1966 (Academia Sinica): 4,310 pages, 224 chapters (卷, juan)
  • No punctuation. Read top to bottom, right to left
  • A month begins with a header: 成化二十三年九月丁酉朔
  • A record begins with a circle and, often, a day name (干支): ○戊戌. It is one of 60 names, not a number
The goal: a table with one row for each record,and a Western date on every row.
The first page of juan 2 of the 明孝宗實錄: the title, the month header 成化二十三年九月丁酉朔, and a record that begins ○戊戌
明孝宗實錄 卷二, first page (1966 ed., p. 0009) · for workshop use only

Part 2 · 明孝宗實錄 · how to read one page

One page: what the method has to see

1 2 3 4 5 5 6 7 8 8 1 Juan title 大明孝宗敬皇帝實錄卷之一百二十一 opens juan 121. 2 Month header 弘治十年正月癸卯朔: era, year, month, and the name of the first day (the new moon). 3 Record mark ○ A small circle opens most records. The first record of the month has none. 4 Day name 甲辰, 乙巳, 丙午, 丁未: a record that opens with a day name starts a new day. 5 Honorific space A gap before a tomb, Heaven or the emperor. It shows respect; it is not a break. 6 A record with no day name ○遣內官祭司戶之神 belongs to the day of the record before it (丁未). 7 A trap for the OCR The page reads ○以大祀. The model read 以 as 戊午, which looks like a day name. 8 Margin of the 1966 edition Title, juan (卷一二一), leaf, and the printed page number (2167). Not text. Text reads top to bottom, right to left.
卷一二一, p. 2167 (1966 ed.) · workshop use only
1Chapter title. 大明孝宗敬皇帝實錄卷之一百二十一 opens chapter (juan) 121.
2Month header. 弘治十年正月癸卯朔: era, year, month, and the name of the first day of the month.
3Record mark ○. A small circle opens most records. The first record of a month has none.
4Day name. 甲辰, 乙巳, 丙午, 丁未. A record that opens with a day name starts a new day.
5Honorific space. A gap before a tomb, Heaven or the emperor. It shows respect. It is not a break.
6A record with no day name. ○遣內官祭司戶之神 belongs to the day of the record before it (丁未).
7A trap for the OCR. The page reads ○以大祀. The model read 以 as 戊午, which looks like a day name.
8Margin of the 1966 edition. Title, chapter and printed page number (2167). Not part of the text.

Part 2 · 明孝宗實錄 · why start from the page?

A typed text already exists. Why not use it?

We already had a typed text of this book. We still started again from the page images, for three reasons:

  1. We do not know where it came from, or under what terms. Our own transcription of a Ming text is ours to publish.
  2. It changed the characters. The manuscript writes 于, 陞, 并. The typed text has 於, 升, 並.
  3. It has errors of its own. Rare characters are typed as two parts (水禾 for one character), and 陝 is 狹 throughout.
HOW WE USE THE OLD TEXTOnly to check our result, never to fill it in. Two independent texts of the same book are worth more than one “corrected” text.
Most of your sources have no typed text at all.So the method has to work from the page.

Part 2 · 明孝宗實錄 · the plan

Ten small steps. Each has a check.

StepWhat it doesWho decidesThe checkResult
1 ImagesPDF to one image per pagescriptpage count4,310 images
2 Read (OCR)Images to text, on our own computerOCR modela test on 30 pages first; compare with the old textmedian page differs 6.3%
3 CleanTake out margins and what the model addedrulescount the record circles on every page1.16 million characters
4 ChaptersCut at the chapter titlesrulethe chapter number printed in each margin224 of 224
5 Months, recordsFind month headers; cut records at ○rulesevery month of the reign, once, in order221 of 221 months
6 DatesDay name to Western date cjk-calendarcalendar tablethe first day of each month; no day goes backward99.99% dated
7 ReviewCases no rule can decide human-eval-reviewthe historianthe page image5 cases
8 TableOne row per recordscriptrow counts13,552 records
9 People, placesA model lists the names; scripts look them up in CBDB and TGAZrulesevery name must stand in its record; then a review of a sample63,985 names, none invented
10 WebsiteThe table, every page as read, and these stepsscriptopen it and lookkltng.github.io/xiaozong-shilu
A step never changes an earlier step's result. To fix something, fix that step and run the later ones again.

Part 2 · Step 2 · read the pages

Test on 30 pages before reading 4,310

1 Images2 Read3 Clean4 Chapters5 Months6 Dates7 Review8 Table9 Names10 Website

Two open OCR models, both running on our own Mac mini. The same 30 pages, spread through the book. Each page is compared with the old typed text.

ModelMedian differenceBetter page
Chandra OCR 26.6%25 of 27
Surya 2.510.6%2 of 27

These are the models the local-ocr skill installs and runs.

THE FULL RUN · CHANDRA4,310 pages in 43 hours, about 36 seconds a page, as the test forecast. Nothing left our office. No fee per page.
6 PAGES WENT WRONGOn six pages the model got stuck and repeated itself (a “loop”): a memorial that repeats 敬天, and lists of princes' names that all look alike. We read those pages again in halves.

Part 2 · Step 2 · check the check

The first score said 15% wrong. It was not.

We looked at what the “errors” were. Three things made the number too high:

  1. The margin was counted as text. Every page has a printed label (明孝宗實錄 卷二) that is not in the old text. → 11.2%
  2. Variant characters were counted as errors. The model read 于 correctly; the old text has 於. → 10.6%
  3. The old text was the wrong one on the hardest pages.
WHAT 6% MEANSIt is an upper limit. Some of the remaining differences are the model's mistakes (論 for 諭, 泰 for 秦). Some are the old text's.
A number from a check is also a result.Look at ten examples before you believe it.

Part 2 · Step 3 · clean the text

The model added things that are not on the page

1 Images2 Read3 Clean4 Chapters5 Months6 Dates7 Review8 Table9 Names10 Website
4,947 full stopsThe manuscript has no punctuation. On 293 pages the model punctuated the text by itself. On 356 pages it wrote 。 where the page has the record circle ○.
A table of numbersOne blank, speckled page came back as a table full of numbers. The model invented it.
Three forms of one circleThe same hand-drawn circle came back as ○, as 〇 (which is also the numeral zero) and as △.
HOW WE FOUND ITWe counted the record circles on every page. Our text had about 2,000 fewer than the old text. The missing circles were hiding as full stops.
Nobody read 4,310 pages to find this.One count, on every page, found it.

Part 2 · Steps 4–5 · chapters, months, records

The book checks itself

1 Images2 Read3 Clean4 Chapters5 Months6 Dates7 Review8 Table9 Names10 Website

We know things about this book before we read it. Each one is a check.

What we knowThe checkResult
224 chapters, numberedTitles must count 1, 2, 3 … 224224 found
The reign has 221 monthsEach month header must appear once, in calendar order221 found
A record starts with ○Count the circles13,155 records
ONE CHARACTER, A HUNDRED CHAPTERSChapter 13 opens with 弘治元年四月. The model read 弘治九年四月: year 9, not year 1. Our first rule then refused every later header as “too early”, for a hundred chapters.
THE FIXTie the headers to the calendar's own list of months. A header that fits the order, except for one misread character, is accepted with a note.

Part 2 · Step 6 · dates · the cjk-calendar skill

Every record gets a Western date

1 Read the month header 弘 治 十 年 正 月 癸 卯 朔 era Hongzhi year 10 month 1 first day (new moon) guimao 癸卯 2 Look the month up in the calendar table Hongzhi 10, month 1 → first day = JDN 2,267,870 = 11 February 1497; its name in the 60-day cycle: 癸卯 3 The free checksum 癸卯 from the calendar = 癸卯 in the header ✓ 4 Count forward for each day name; carry the date down to records without one 癸卯 day 1 JDN 2,267,870 11 Feb 1497 弘治十年正月癸卯朔… ○遣儀賓…祭 景皇帝陵寢 ○遣內官祭 恭讓章皇后陵寢 ○上詣 奉先殿… 甲辰 day 2 JDN 2,267,871 12 Feb 1497 ○甲辰文武羣臣朝親王… 乙巳 day 3 JDN 2,267,872 13 Feb 1497 ○乙巳 宣宗章皇帝忌辰… 丙午 day 4 JDN 2,267,873 14 Feb 1497 ○丙午加封皇親壽寧侯… 丁未 day 5 JDN 2,267,874 15 Feb 1497 ○丁未孟春享 太廟 ○遣內官祭司戶之神 record with its own day name (or the header): 38% of records record with no day name: the date is carried down (62%) JDN = Julian Day Number, a plain count of days. Dates are Gregorian.
THE SKILLcjk-calendar holds a table of every month of every East Asian reign, with its first day. A script looks the month up. The model does not calculate dates.
A FREE CHECKThe header names the first day. The table names it too. They must agree: 218 of 218 do.

Dates here are Gregorian, also before 1582. Many reference books give Julian dates for these years: 9 or 10 days earlier.

Part 2 · Step 6 · dates · misread day names

The calendar also corrects the reading. Not always rightly.

THE RULEThree records in a row read 丁卯, 戊戌, 己巳. Days only move forward, and 戊戌 is not between the other two. The one empty day between them is 戊辰: one character different. 46 days were corrected this way. The original reading is kept beside each one.
13,551of 13,552 records dated
46misread days corrected
ONE CORRECTION WAS WRONGWe found it while drawing the page figure. The page reads ○以大祀. The model read 以 as 戊午, and the rule “corrected” it to 戊申, an empty day. That record now has a day it should not have. 18 of the 46 corrections still need a look at the page.
A rule that repairs can also be wrong.Keep the original reading beside every correction.

Part 2 · Step 6 · dates · lost record breaks

The calendar finds lost record breaks

Before: the OCR lost a record mark, so the day 乙亥 looks empty 甲戌 day 13 28 Aug 1488 乙亥 day 14 29 Aug 1488 no record 丙子 day 15 30 Aug 1488 …果應急議者限五日内議聞  乙亥 陞刑部主事楊文卿為山西… ○禮部覆奏吏科給事中林廷玉所言… ○太子太保吏部尚書王恕言… ○丙子… 乙亥 is written inside a record, after a blank where the mark was. It is the one empty day between 甲戌 and 丙子. cut at the day name After: the divider is restored, and the records after it move to their true day 甲戌 day 13 28 Aug 1488 乙亥 day 14 29 Aug 1488 丙子 day 15 30 Aug 1488 …果應急議者限五日内議聞 乙亥 陞刑部主事楊文卿為山西… ○禮部覆奏吏科給事中林廷玉… ○太子太保吏部尚書王恕言… ○丙子… Solid box: a record with its own day name. Dashed box: a record whose date is carried down. 395 dividers were restored this way.
BY RULE395 breaks restored. On 346 of those days the old typed text has a record too.
BY THE HISTORIAN3 unclear cases went to review. One reads 上以戊申紀元: 戊申 is a year there, not a day.

A lost break before a record with no day name leaves no trace. Only proofreading finds it.

Part 2 · Step 6 · dates · the whole reign at once

All 6,526 days of the reign

The historian asked for every day, with the number of records on it. Most empty days are real. An empty day between two full ones is where to look for a lost break.

1 10 20 30 day of the lunar month 弘治 1 1488 2 3 4 弘治 5 1492 6 7 8 9 弘治 10 1497 11 12 13 14 弘治 15 1502 16 17 弘治 18 1505 Each column is one of the 221 lunar months of the reign; each cell is one day (6,526 days) The first five columns are the last months of 成化 23 (1487). Lunar years are marked below the grid. no record (1,415 days) 1–2 records 3–5 records 6 or more

Part 2 · Step 6 · what the date check found

A date check finds more than date errors

Thirteen day names did not fit the calendar by any rule. We looked at each one on the page image.

What it wasHow manyWhose mistake
Pages scanned in the wrong order2 days, 3 pagesThe scan. The printed page numbers run 0470, 0469, 0468. The dates were right; the pages were not
Ordinary words read as day names6The OCR model. It made 命成, 內閣, 茂陵 look like day names
A real day, misread in both characters1The OCR model. Corrected from the page
A real day, the same day the record already had1Nobody's. One character was misread (戊子 for 戊午); the date was right
Days out of order in the manuscript itself3The Ming copyist. The old typed text reads the same
We asked “is the date right?”The answer showed a scanning fault, six misread words, and three slips by the Ming copyist.

Part 2 · Step 7 · the historian in the loop · the human-eval-review skill

From 116 open cases to 5

1 Images2 Read3 Clean4 Chapters5 Months6 Dates7 Review8 Table9 Names10 Website
The review page: a card that asks whether a new record starts at the marked day name, with the days before and after, the page image to check, and two buttons
  1. The first run left 116 cases that the rules could not decide. human-eval-review made them into one web page of cards.
  2. The historian read the cards and saw patterns. Each pattern became a new rule: “if this day name is the day right after the last record, it starts a new record.”
  3. 116 → 87 → 64 → 5 cards. The historian answered those five from the page images. The answers are saved as a file and applied by script.
The historian did not check 13,552 records.The historian wrote the rules, and judged the five cases no rule could.

Part 2 · Step 8 · the result

One row per record, and where each date came from

1 Images2 Read3 Clean4 Chapters5 Months6 Dates7 Review8 Table9 Names10 Website

ONE ROW

Record002-0004 · chapter 2 · 1966 page 0011
Lunar date成化 23年 9月 壬寅
Western date1487-10-01
Date fromits own day name
Text壬寅英國公張懋奉命告天地…上即皇帝位遂頒詔大赦天下…

WHERE THE 13,552 DATES CAME FROM

The record's own day name, or the month header4,722
The same day as the record before8,418
A lost record break, found by the calendar397
Year only (是歲, 是年)14
No date1
WHAT IT IS NOT, YETThe text is a first reading by a model. It is not proofread. The table has dates, and no people or places yet: that is step 9.

Part 2 · Step 9 · people and places · done on 13 and 14 November

A model reads. A script checks.

1 Images2 Read3 Clean4 Chapters5 Months6 Dates7 Review8 Table9 Names10 Website
WhoThe work
A language model
(Codex)
Reads each record. Lists the people and places, as written
A scriptChecks that every name stands in its record
A scriptLooks the names up: people in CBDB (China Biographical Database), places in TGAZ (China Historical GIS)
RulesChoose among people of the same name, by date and by office
The historianJudges a sample of the links

Tested on 200 records first, then run on all 13,552. The model never sees the databases.

THE KEY INSTRUCTION · FROM THE PROMPTCopy each string exactly as it stands in the record, character for character. Never normalise, correct, complete or translate.
THE CHECK63,985 names came back. A script looked for each one in its record. Not one was missing.
The model reads. The script looks up.So the model never writes an ID from memory.

Part 2 · Step 9 · people and places · what the links are worth

“Linked” does not mean “right”

ONE RECORD · 002-0004 · 1487-10-01

In the recordWhat the script foundResult
英國公張懋CBDB has 12 people named 張懋. One has dates that fit (1441–1515). Six have no dateslinked, weak
保國公朱永4 people. CBDB says one was 保國公, and the record names that officelinked, medium
駙馬都尉周景13 people. Two were alive in 1487. Nothing decidesno link; all are kept
兩廣雲貴川貴 is short for 貴州. The rule tried 貴縣, a county in Guangxilinked, and wrong

Not in CBDB: misread names (揚士奇 for 楊士奇), eunuchs, foreigners, princes. Not in TGAZ: frontier names like 遼東 and 宣府.

THE WHOLE REIGN

PeoplePlaces
Names found38,22725,758
Linked to an ID12,75014,313
Not in the database11,06611,374
Several candidates, none chosen5,63071
In the database, but nobody fits the date2,608—
Not looked up: titles, 氏, one-character names6,173—
NOT REVIEWED YETNobody has checked these links. Each one shows the rule that made it, and how sure the rule is. What the model missed is not measured.

Part 2 · Step 10 · kltng.github.io/xiaozong-shilu

The whole work, as one website

WATCH
1 Images2 Read3 Clean4 Chapters5 Months6 Dates7 Review8 Table9 Names10 Website
The website: record 002-0004 with the names 張懋 and 朱永 underlined, and a small panel that says 張懋, person, weak link, CBDB 130669, several candidates were left and only this one has dates that fit

Record 002-0004. Dotted line: a weak link. Dashed: medium. Grey: found, no ID.

  • Browse by month or by chapter, or search the text
  • Click a name: its ID, the rule that made the link, and how sure the rule is
  • Pages: all 4,310 pages as read, with the model's raw answer
  • How it was made: each step with its rule, numbers, code and mistakes
  • Downloads: the table, and every candidate the script looked at
A DRAFT, AND IT SAYS SOEvery page carries the line: machine-read, not proofread, links not reviewed. Search engines are asked not to list it yet.

Part 2 · What it took · 9 to 14 November 2026

Six days: time and cost

What ranTimePaid
Step 1 · PDF to 4,310 page images9 minutesnothing
Step 2 · OCR on one Mac mini, the full run43.1 hoursnothing
Steps 3 to 8 · the scripts, one clean run3 minutesnothing
Step 9 · Codex reads 13,552 records2.4 hours$96 list price *
Step 9 · scripts look the names upa few minutesnothing
All machine time46.5 hours

* Codex ran on a subscription, so nothing was paid per token. $96 is what the same tokens cost at OpenAI's list price on 14 November 2026. Not counted: the AI agent that wrote the scripts with the historian, and the many runs before the clean one.

93%of the machine time is OCR
0.7¢a record, to find the names
THE HISTORIANA few hours of attention, over five working days. The log shows about 3.3 hours of talk with the agent. This number is rough.
The machine hours ran unattended.The historian's hours are where the rules came from.

Part 2 · Looking back · the three categories again

What went wrong, and what fixed it

What went wrongModel, engineering or human?What fixed it
Princes' name lists made the OCR model loopmodelRead half a page at a time; try the other model; a person checks these pages
Full stops and a table that are not on the pagemodelA count on every page, then a cleaning rule
“15% wrong” when it was about 6%engineering how we measuredLook at examples; leave out margins; treat variant characters as equal
One misread year stopped a hundred chaptersengineering our first ruleTie the month headers to the calendar table
趙氏, “a woman of the Zhao family”, was linked to one person in CBDBengineering our lookup ruleA surname with 氏 is no longer looked up
劉健, a grand secretary, got no link: many people share the nameengineering our ruleA new rule: use the office he holds in other records. 895 more links
116 cases that no rule could decidehuman not yet said clearlyThe historian turned patterns into rules, and judged the last 5
None of these was fixed by a “smarter” prompt.Each was fixed by a check, a tool, or a rule written down by someone who knows the source.

Part 2 · Looking back · the key instructions in this case

What the historian told the agent

  1. A month begins with a header that names its first day: 弘治十年正月癸卯朔
  2. A record begins with a small circle ○, often with a day name. Days only move forward
  3. The book has 224 chapters. The reign has 221 months. Count them
  4. Use the old typed text only to check, never to fill in
  5. Keep the original beside every correction
  6. What no rule can decide, show to me with the page image
  7. People and places only, no offices. Use CBDB and TGAZ, nothing else
  8. Choose among people of the same name, and record every candidate
Eight sentences.The agent turned them into ten steps and their checks.
NOTICENot one of them is about AI. Each is something a reader of 實錄 already knows.

Part 3 · Two difficult books · kwokleongtang.net/collections/ocr/

Pages harder than the 實錄

The 實錄 page is one column after another. Many books are not. Ordinary OCR reads them badly, or reads the columns in the wrong order.

THE SAME METHOD, WITH VISION MODELS

  1. Two models read every page, each on its own: Claude Opus and Codex
  2. The check: where the two disagree, the place is shaded
  3. The person looks at the shaded places first, with the page image beside the text
Two readings that disagreetell you where to look.
WHAT THESE EDITIONS AREMachine transcriptions. The differences are shown, not settled. Nobody has proofread them yet.

Part 3 · Case 1 · a Fujian household encyclopedia, 1678

增廣幼學須知鰲頭雜字大全

The reading edition: the woodblock page on the left with boxes around each block, picture-glossary cards and word lists on the right

Page image and text side by side. Shaded: the second model read it differently. Images: Harvard-Yenching Library.

WHY IT IS HARD

  • Several texts run side by side, in an upper and a lower register
  • Pictures with one-character labels, tables, a star chart and a map
  • About 47,500 characters in 30 texts
THE KEY INSTRUCTIONThe page is not one text. Find each register, say what kind of block it is, and follow each text across the pages.
THE CHECKOn this opening the second model read 37 places differently.

Part 3 · Case 2 · a manuscript on Vietnamese customs

安南風俗冊 An Nam phong tục sách

The reading edition: a semi-cursive manuscript page on the left, the transcription in vertical columns with Han-Viet readings on the right

By 段展 Đoàn Triển. Hán-Việt readings stand beside the characters. Wavy line: the model was not sure.

WHY IT IS HARD

  • A semi-cursive hand, in Hán script
  • Photographs of the manuscript, printed in a modern book
  • A reader of Chinese may not know the Vietnamese readings
THE KEY INSTRUCTIONRead only what is written. Mark what you are not sure of. Give the Hán-Việt reading for each character.
THE CHECKOn this page the second model read 40 places differently.

Part 3 · Choosing a way to read

Three ways to read a page

WayGood forWhere the page goesCost
An open OCR model on your own computer
local-ocr skill: Chandra, Surya
Whole books with a regular page, like the 實錄. Unpublished or licensed materialIt stays on your computerTime: 43 hours for 4,310 pages
Two big vision models
multi-agent-vision-ocr skill
The hardest pages: mixed layouts, handwritingTo the companies that run the modelsMoney: a hard book can cost several hundred dollars
A small app, no setup
Gaaucau Quick OCR, a Mac app I built
One PDF, todayIt stays on your computerFree
Check the terms before a scan leaves your computer.A library scan or a licensed text may not be yours to send.

Part 4 · The same way of working, for teaching

Playable Pasts: classroom games from primary sources

The Yang Naiwu Case game

Play it: kltng.github.io/yuhang-case-web/

The Yang Naiwu Case 楊乃武: a real Qing homicide case, 1873 to 1877.

  • Students play the county magistrate, the family, the commissioner and the Board of Punishments
  • They pick evidence from the 1877 memorial, the Qing Code and the newspaper Shenbao
  • One web page. It runs in any browser
HOW IT WAS MADEBy asking an agent in plain language, with the sources in hand.

Part 4 · kltng.github.io/playable-pasts/start/

The game skill asks before it builds

  1. It interviews you: your students, your goal, your sources, your time
  2. It reads your sources and marks every fact: attested, interpretation, assumption, or invention
  3. It builds the smallest version first
  4. You get one web page, a teacher guide and questions for the debrief
  5. You check it with the site's checker
THE KEY INSTRUCTIONSHere the skill asks for them. The teacher says what the students should learn, and which sources count.
The same pattern as the 實錄:small steps, a check, and the scholar decides.

Part 5 · One method

Three kinds of work, the same four parts

The person's key instructionSmall stepsThe checkWhat the person decides
明孝宗實錄What a header, a circle and a day name meanTen, from images to a websiteCounts, the calendar, the old typed text; every name must stand in its recordThe last 5 cases. Next: a sample of the links
Two difficult booksHow the page is laid out; what to mark as unsureBlocks, then reading, then readings above the charactersA second model reads the same pageEvery shaded place, when proofreading
Playable PastsWhat the students should learn; which sources countInterview, source notes, smallest game firstEach fact marked: attested or inventedWhether the game is true to the sources
Write these four parts down once,and you have a skill.

Part 5 · From your own way of working to your own skill

A skill is your method, written down

Every scholar and every librarian has steps they repeat: how to check a date, where to look up a person, how to describe an edition. That is a method. A skill is the same method, written so an agent can follow it.

START WITH THREE LINES

  1. Name: what the skill is called
  2. When to use it: one sentence
  3. What it does: the steps a careful person would follow, and what to check at the end
THE SKILLS BEHIND TODAYlocal-ocr · cjk-calendar · human-eval-review · multi-agent-vision-ocr · the Playable Pasts game skill.
Each began as steps I repeated by hand.
Do not copy my ten steps.Ask: what are the steps, and the checks, in my own work?

Part 5 · Being honest about it

Where this breaks down

  • Pages no model can read yet. Poor handwriting, damaged prints
  • Nothing to check against. With no second text and no table, a person must read
  • Time and money. 46 hours of computer time for one reign, and about $96 of tokens at list price
  • A right database, a wrong match. CBDB has 12 people named 張懋
  • Rights. Check the terms before a scan or a licensed text goes to a cloud service
A check lowers the risk.It does not remove the reader.

Summing up

Three questions for any AI result

1Where did it come from?The scan, a database, or the model's memory?
2Can I check it?Is there a page, a line, a database ID?
3Who decided?A rule, the agent, or a person?
3:45 PMOffice hours, here. Bring your own source or project
Tue 10:00Agentic Search for Libraries, for library staff: catalogs, and how a library opens its collections to agents

From Printed Page to Research Data · University of Michigan · thank you

Questions?

Now, at office hours at 3:45, or by email after today.

kwokleongtang@fas.harvard.edu

明孝宗實錄: kltng.github.io/xiaozong-shilu
Skills: github.com/kltng/humanities-skills
OCR collection: kwokleongtang.net/collections/ocr/
Games: kltng.github.io/playable-pasts/
KL
Kwok-leong TangDigital China Initiative, Harvard University
← → move · F full screen · T dark theme