Skip to content
TriedPrompts

More in Large datasets & analysis.

Analyze every entry of a huge JSONL file with Claude Code subagents

Claude Code defined a schema and ran hundreds of subagents over about 45 minutes so every entry in a huge JSONL file was analyzed.

Result: WorkedTool: Claude CodeLevel: AdvancedSetup: Needs APIEvidence: Reported

Copy the prompt

Reported: A text-only post with no screenshots. Reported is the normal starting point for most cases, not a mark against the case. Rated , after reopening the source. Rates the evidence, not the result. Failed and partial cases are rated the same way. How we rate evidence

Outcome

Claude Code previewed the data, trimmed fields, defined a schema and ran hundreds of Haiku subagents over about 45 minutes so every entry in a large JSONL file was analyzed. Sean Moriarity gave Claude Code context on the data and the questions to answer, said the file was too big to analyze by hand but every entry should be looked at, and asked it to define a common schema in a JSONL file first. Claude Code wrote a preprocessing script to drop fields that didn't matter, gave each Haiku subagent a slice of the data and its own output file in a separate folder, and watched the folder until every batch finished. The conversation compacted several times, but Moriarity says it didn't matter: Claude Code kept track of the goal through the original prompt, the schema file and the output folder, while the subagents handled the data itself. Moriarity says this replaced setting up a schema and a batch job against an LLM API by hand.

WorkedPosted Last checked

Level: Advanced. You need: A tool that takes actions for you or writes code, connected accounts, or some setup on your computer.

How to use this

  1. Tap Copy prompt.
  2. Open the tool the case used (or a similar one) and paste the prompt; results may differ from the original.
  3. Paste it into the message box.
  4. Replace anything in [CAPITAL LETTERS IN BRACKETS] with your own details.
  5. Send it, then read the answer before acting on it.
New to this? What's a prompt?

A prompt is the message you send to the AI tool. Copy the one on this page, put your own details where it asks, and read the answer before you act on it.

Prompt

Recreated prompt

The source didn't share its exact prompt, so we wrote one from what it describes. The result shown is the source's, not ours.

What the prompt labels mean

The person didn't share their exact words, so we wrote this from what they described. We haven't tested it, and they didn't use this exact version.

This JSONL file is too big to read by hand, but I want an agent to look at every entry. Define a common schema in a JSONL file to answer these questions: [QUESTIONS]. Test the schema on a small sample first and show me, then complete the analysis.

Done when: every entry has a row in the output file, and the row count matches the input.

Try this in:

This prompt has blanks to fill in, like [QUESTIONS]. We'll copy it instead of filling it in, so you can edit it before you send.

The source used Claude Code, which can take actions on your computer or in a browser. These are general chat tools, so results may differ, and a normal chat may only give you a plan.

Opens in a new tab. We don't see what you send.

These links are only a shortcut. We're not affiliated with OpenAI, Google, Anthropic or xAI, and your results may not match the source.

Optional stronger version

Our rewrite with extra checks. The poster didn't test it.

Goal: Analyze every entry of a huge JSONL file with subagents using a shared schema.

Inputs (fill in or confirm):
- The file
- Questions to answer
- Output location
- Size of the file and machine limits

Rules:
- Define the schema first and confirm it.
- Split the file into chunks; each subagent writes schema rows.
- Validate every output row.
- Aggregate results with counts.
- Keep chunk size small enough that each subagent reads every line of its chunk.
- Make each output row include the original line number so results can be traced.
- Log failures with the line number and reason.
- Answer each question from the aggregated rows, with counts and examples.
- Save results per chunk so a crash doesn't lose work.
- Spot-check 20 results by hand.
- Report total lines processed vs file size.
- Report run time and how many subagents ran.
- Estimate time and cost before starting the full run.

If you get stuck: If a chunk fails, retry it alone. If a login, CAPTCHA or two-step code appears, stop and ask me to handle it; never guess or store passwords.

Verify before you finish: Check total rows processed equals entries.

Output: Schema file, results JSONL and summary.

Done when: every entry is analyzed and counted.

AI tool

Claude Code

Source

Posted
by Sean Moriarity (@sean_moriarity)
Last checked
Method:
How we verify

https://x.com/sean_moriarity/status/2012220803023073539

Tell us how it went A reader message. It is not published on this page, and it is not a test of the prompt.

More in Large datasets & analysis

More in DataRandom case in Data