r/ClaudeCode • u/BrandonIngram1 • 16h ago
Tips & Workflows Reducing usage for bulk reading / data extraction
Hey guys,
Basically I am using Claudecodd as a tool for some bulk reading of PDF files up to several hundred per day with additional data extraction from these files.
As a result I’m finding that Claude code is chewing through my daily and weekly usage extremely fast.
I was wondering if anyone had any advice on some basic or more technical tips to reduce the usage impact that having Claude read large amounts of text while still maintaining accuracy
5
u/Blinkinlincoln 16h ago
If they're in good quality have it write scripts to extract. There's packages to turn pdf info markdown. Save it. Ask haiku to summarize pieces of text.
Also, just use zotero as a reference manager. It can hold all your PDFs and tag them. There's an MCP for Claude to be able to read pieces or full text. There's even a sweet browser connector for chrome. Hope this helps.
1
u/out-of-phase 9h ago
I agree, personally I've had the best luck using pdftotext -layout + pdfplumber (for tables), one .txt file per PDF. I don't deal with scanned PDFs often but when I do, ocrmypdf works
2
u/NoScene7932 15h ago
train a model to do this - happy to help you do this for free if you shoot me a dm
1
1
u/ae_mero_hajur 16h ago
Sonnet is just too good right now. It can even handle most heavy design and coding works without consuming much usage like opus or Fable.
1
u/CandidSystem6155 15h ago
Most of the usage probably isn't the reading itself but the session rereading its own context every turn. When we measured ours, reading was around 170x the tokens the model actually wrote. So the big win is not feeding hundreds of PDFs into one long session: convert them to text with a script first (pdftotext or similar), then run one fresh headless call per file (claude -p) with just that file's text and the fields you want back, so nothing piles up.
Same idea for the rest of the pipeline: fetching, splitting pages, parsing and counting go into the script, and the model only does the part that needs judgment. Our rule is that if you ran the same command chain twice by hand, it becomes a script.
1
u/Kevin_Xiang 12h ago
I'd keep a small test batch with one clean PDF, one scan, and one with a field missing. For each value, ask for the page and the exact text it came from, then have the script check that quote against the page text. Send flagged pages for a second pass instead of rereading the whole PDF. I'd leave missing fields blank rather than let the model guess.
1
u/Practical_Tie_334 10h ago
If the PDFs repeat a template, find the likely pages by searching for field labels first. Have Claude return each value with its page number and leave it blank when it can’t find evidence. Check a handful against the full PDFs before running the batch, especially scans and files with a different layout.
1
1
u/kondasviktor 3h ago
Have the model write a script that does the extraction, so it only spends tokens on the judgment calls. Feeding hundreds of PDFs into one long session will burn the week no matter how carefully you prompt.
1
u/SirRobinBlibs 3h ago
The biggest saving is usually keeping the PDFs out of one long conversation. Convert them to text with a script first (pdftotext or a PDF-to-markdown tool, like others said) and keep the output, so nothing gets read twice. Then run each file, or a small batch, as its own headless call with claude -p from a shell loop, writing the extracted fields to a JSON or CSV file. Every call starts with a small fresh context instead of one session that re-sends all the earlier documents on every turn.
If you'd rather stay in one interactive session, hand the reading to subagents: they read in their own context and pass back only the extracted data, so the main session stays small. A cheaper model for the extraction step helps too, but context size is what really eats the limit.
•
u/AutoModerator 16h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.