AI Tutorials

Follow the money: How we used AI skills in Claude to research a campaign finance investigation

Every campaign dollar raised in Massachusetts leaves a public record on the Massachusetts Office of Campaign and Political Finance (OPCF)website: who contributed, how much was given, when it was donated, and where the money was ultimately spent. By scrutinizing the data using AI, we found that at least 76 former state and municipal officeholders kept spending campaign money, totaling more than $6.5 million, after they left office. You can see the final project here.

The project’s data comes from bank-reported expenditures filed with the OPCF, covering 5,629 payments totaling $6,594,253 by 76 former state and municipal officeholders between Jan. 4, 2021 and Apr. 30, 2026. A payment is counted as post-departure if its date falls after the official’s recorded last day in office. Categories are assigned from the payee name and the stated purpose. We used Claude Opus 5 to categorize spending and to -search the web for relationships between committees and recipients. Afterwards, we manually checked and corrected each officeholder’s office-leaving date.

Starting with a better question

I started this project with an OCPF dataset, but I barely knew what those reported expenditures really meant when I looked at the spending numbers row by row. Staring at the laptop screen, I was spending a fair amount of time trying to grasp any abnormalities in data statistics and felt huge uncertainty about the project.  

I then fed a small test dataset to the Claude chat window and asked a simple question, “If you are a Campaign Legal Center analyst, what angle do you want to jump into?” 

Claude flagged retiring Senator Harriette Chandler’s $41,800 giving to Temple Emanuel Sinai as “non-campaign charitable donations.” It made me really excited, like a hound on the hunt, although later I realized state law does allow campaign candidates to donate their leftover money to religious organizations through further research. Chandler’s temple donation was completely legal, but the transaction made me think of a follow-up question: what is the purpose of a campaign committee once there is no campaign.

 That question is fully answerable through the OCPF data and revealed that some officials were found to have kept spending money long after leaving office.

Understanding the legal questions would turn 76 individual stories into one story asking whether Massachusetts requires a campaign committee to close when a politician is no longer running for office, on what timeline, and what happens if it never closes. The answer reframed the entire project: there is no such requirement. In fact, closing an account means giving away everything in it, which means the cheapest option for former officials is to do nothing at all.

The data cannot tell you who left office

The central point became how to track the career of a politician. The campaign finance office labels “active” every committee’s account with financial activity including paying debt, donating funds, bank fees. But it doesn’t necessarily mean their political careers are “active”. 

So I had to introduce a measurement system from outside. I took the Ballotpedia, a political website focusing on elections, as a reference. 

Regulator registry→ is_closed, is_incumbent, office_sought, office_held 
 Wikidata / Open States / Ballotpedia→office_end_date, successor
filer_status→ active_incumbent | former_officeholder | candidate_only | closed | deceased

This project used AI assistant skills to analyze OCPF campaign finance expenditure between Jan.1, 2021 and Apr. 30 2026 building on a chain of four main skills, each skill running with several subskills that are either created for the result validation from the initial run, or to extend the investigation to a deeper zone that the main skill couldn’t reach.  Each main skill comes with python scripts used for loop work or spending calculation. Full set of scripts here. 

Former officeholder check → Categorization → individual analysis → Committee tie mapping

SkillWhat it does
officeholder-check
Resolves each filer to current / former / deceased / not-an-officeholder, with office, departure date, confidence and source. Batched web research, 150 filers per run, capped at 2–3 searches per person
officeholder-check-correction
Second-pass validation against primary sources; catches the five failure modes 
expenditure-categorization
Assigns purpose, mechanism, reporting vehicle and direction as four independent axes
individual-analysis
Per-filer dossiers: category mix, top recipients, flags, uncharacterized share
committee-tie-mapping
Nine relationship categories scored on two independent axes, plus statutory compliance screen and claim ladder

How we found former officeholders

This whole project depended on the verification of the day each person stopped holding office. OCPF committee “active” status only reflects whether the committee account still has financial activity (e.g., paying off debt, donating leftover funds, admin fees), not whether the person still holds office. Many committees stay technically “active” for years after the officeholder has retired, lost re-election, or passed away. 

Since campaign finance data alone can’t answer this, verification requires an actual web search for each person, matched against name and likely office/district to avoid mismatches with unrelated people sharing the same name.The status check skill was created to determine each filer’s current status, check if they are active in the public role, retired/left office, or deceased. 

DON’T MISS  Analyzing gender differences in music themes and lyrics

Skill description:

For each person in the list below, search the web to determine their status. Use WebSearch and WebFetch to look them up. Focus on finding:
1. Did they ever hold public office in Massachusetts?
2. If yes, what office did they hold?
3. When did they leave that office (approximate year is fine)?

IMPORTANT: Only report back people who are confirmed FORMER officeholders. Do NOT include:
- People who are currently in office
- People who never held office (candidates who lost, political consultants, etc.)
- People you cannot find clear information about

For each confirmed former officeholder, report in this exact CSV format:
Name,Office,Left_Year,Source_URL

It searches in this order:

  1. The person’s name plus a guess at the office type
  2. Ballotpedia, which records start and end dates for nearly every Massachusetts state legislator
  3. The Massachusetts Legislature’s own member records
  4. Wikipedia, as a last resort for older or thinly documented people. Common names are the hardest to check. When a name is ambiguous, the tool looks up the filer’s unique OCPF ID on the agency’s own site, where each ID is attached to a committee name that usually reveals which office the person was running for. 

The first run left over 70% of filers unknown because people in a state campaign finance registry were minor local candidates or municipal officials with almost no online footprint. Those unknown officers were split into a couple of batches of about hundred names and handed to 15 research agents working in parallel for a second run. This gave a result of 85 people who have left office.

We did a completely manual check and found 10 of 85 roster members were labeled wrongly after the running of the skill, among which four people were still in office, one was an active candidate for governor whose date was recorded backwards, two were mix-ups between fathers and sons who share a name, and two passed away.

How we categorized the campaign fund spending

Campaign money goes to pay for a wide range of expenses including consultants, printers, charities, hotels, ad signs, flowers, portrait painters or donations to other politicians. To draw conclusions about what former officeholders spend on, you first need a way to sort payments into meaningful groups.

The categorization is grounded in M.G.L. Chapter 55 and OCPF’s reporting

framework. We tried to match if the payment fell into any statutes of OCPF’s own category regulations. Applying OCPF’s own taxonomy directly would have been slower and less revealing, because they are too finely split and the patterns we were looking for get divided across a dozen labels instead of showing up as one.

We first drafted the category list against a sample of the 100 largest payments to see what shapes actually appeared in the data and where Massachusetts law attaches conditions to them. That produced a draft taxonomy frame, following a decision logic of checking spending description and clarified purpose first, and then checking the payee’s name.

It created output as:

 "row_index": 0,
 "filer": "Spilka, Karen",
 "date": "3/25/2025",
 "payee": "CTE Karen Spilka",
 "amount": 125000.00,
 "category": "TRANSFERS & ACCOUNT MANAGEMENT",
 "category_code": 9,
 "confidence": "high",
 "flag": "Large transfer with no clarification on file -- destination unknown",
 "reasoning": "Purpose is 'transfer to new account'; payee is filer's own committee entity. Fits category 9. No clarified purpose filed -- flagged for CLC review."
}

The first version revealed a flaw that a single “Donations” category was absorbing things the law treats very differently: gifts to charities, scholarship funds, contributions to PACs and party committees, and payments to community organizations. The first two are among the handful of destinations Massachusetts permits for leftover campaign money. The third is political giving, subject to contribution limits and to an entirely different set of rules. Collapsing them hid the distinction the investigation most needed to see.

The fix was to check who the recipient is — a charity, a party committee, a PAC, a bank, a government body, or an ordinary vendor. The word “donation” appears in filings for both charitable gifts and political contributions, so the word cannot tell them apart. The recipient’s identity can help determine which basket to put.

That change moved $136,563 out of the charity column into political giving, and $130,686 in the other direction, and it led to a total increase of by 63 percent between drafts.

The refined list was then run against the full set of 5,629 post-departure payments. For each one, the tool assigns a single category and a confidence level of high, medium, or low, so later claims can be limited to well-classified money. A payment that fits none of the fourteen is labeled Unspecified. The size of the Unspecified group is itself a finding about how much of this spending the filings never explain.

"Charitable / sponsorship":   ["To Non-Political Organizations","Charitable & Religious Donations"],
 "Political giving":           ["To Political Recipients","Contributions to Candidates & Parties"],
 "Consulting / compliance":    ["Operations & Professional Services","Consulting & Compliance"],
 "Office / admin":             ["Operations & Professional Services","Office & Administration"],
 "Payroll & staff":            ["Operations & Professional Services","Payroll & Staff"],
 "Bank & processing fees":     ["Operations & Professional Services","Bank & Processing Fees"],
 "Taxes & government":         ["Operations & Professional Services","Taxes & Government"],
 "Loan / liability repayment": ["Operations & Professional Services","Loan & Liability Repayment"],
 "Advertising & production":   ["Campaign & Outreach","Advertising & Production"],
 "Fundraising & events":       ["Campaign & Outreach","Fundraising & Events"],
 "Travel & lodging":           ["Campaign & Outreach","Travel & Lodging"],
 "Flowers & gifts":            ["Campaign & Outreach","Flowers & Gifts"],
 "Unspecified":                ["Uncharacterized","Uncharacterized"],
 "Transfers":                  ["Internal Transfers","Transfers Between Own Accounts"]

One thing that jumped out is that, because OCPF filings are entered by people who may make typos, and the same recipient can show up under many spellings: a consulting firm as both CHICK MONTANA GROUP and CHICK MONTANS GROUP; a party committee as MASSACHUSETTS DOMOCRATIC PARTY; one consultant as LAURIE BOSIO, LAURIE BOSLO, and lb stategies.

DON’T MISS  How to build a map of rodent infestation complaints in your city

The spending number may fluctuate by name variants —  much more spending may have been covered if we missed any of the name variants. One consultant appeared under six spellings ($135,000 became $307,150 once combined), a portrait studio under three ($30,000 became $89,009), and a former aide under four ($77,000 became $107,000). With the help of LLMs, a more accurate spending pattern was uncovered.

How we spotted the money flow

The committee tie skill is built to investigate the relationship between the committee that sent the money and who received it. 

To figure out the if the transactions only made sense for someone still in office, we checked nine kinds of ties that might exist between filers and receivers: shared cause, a building or award bearing the payer’s name, a board seat, employment, family, a vendor carried over from the campaign, a recipient who had previously donated to the payer, another committee, and a shared address or agent. 

The skill a progressive-disclosure instruction set, written in a sequential discipline as the following architecture. It carries the order of operations, a two-question rule (how well documented is the relationship? / does the payer personally get something out of it?). Six reference files sit behind it — the validation gates, the nine tie categories, a guide to which document answers which question, the claim ladder, the statutory tests, and one fully worked example.

Architecture:

| Component | Lines | Role |
|---|---|---|
| `SKILL.md` | 94 | Order of operations, the two-axis rule, restraint rules for
individuals, output format |
| `references/record-validation.md` | 66 | Four validation gates; the pre-publication
disqualifier checklist |
| `references/tie-taxonomy.md` | 136 | Nine tie categories, evidence standards for
each, the scoring matrix |
| `references/source-playbook.md` | 56 | Which document answers which question |
| `references/evidence-standards.md` | 74 | Seven-rung claim ladder; prohibited
language; fairness obligations |
| `references/statutory-tests-mgl-c55-s18.md` | 158 | Statutory tests derived from the
text of M.G.L. c. 55 § 18 |
| `references/worked-example.md` | 81 | A fully worked pair resolving to a null result
|
| `scripts/reciprocal_join.py` | 258 | Fuzzy join of expenditures against
contributions |

Outside data

Beyond the OCPF expenditure export, we used Ballotpedia, Wikipedia, the Massachusetts

Legislature’s member records, and contemporaneous news archives for departure dates;

M.G.L. c. 55 §§ 5 A, 6, 7 A and 18 and 970 CMR 2.00; OCPF’s published guidance on dissolution and residual funds; the Secretary of the Commonwealth ‘s lobbyist registration database; IRS and nonprofit-directory records for recipient organizations; and one written statement from a former officeholder.

A final remark

Three months of co-working with AI — the journey loaded with pains and joys, endless questions, arguing and sometimes surprise. I started this project doubting if AI can really do things like human journalists do: find news leads and story angles, make editorial judgements, and draft a story that reveals what people care about most. 

There were some magic hours when it spotted an abnormal value in a sea of messy numbers that would have taken me countless hours to look for.  There were also some moments any human would find obviously, like putting “funeral flowers” in the “vehicle/transit” bucket. It would pile up words and circle around a simple repeating idea, not like the fullness from reading a human-written story.

 It was not surprisingly good at finding common patterns — spending trends over time, who got paid regularly, networks buried inside the large system. But beyond the data, it hardly told something unique, or developed a concept that could umbrella what all this information stood for. There were real political choices and real careers that reflected in the patterns — every bill reveals their intention, their political calculations and their desire to achieve something — that’s what AI models didn’t care about much. As a paper from Google DeepMind said, LLMs can’t jump— they can use math and logic, but not invent a totally new foundational rule when data is scarce. Going from a pattern to a real story, there’s a gap to cross over, and maybe that’s where human journalists stand.

Peiyao Hu

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest from Storybench

Keep up with tutorials, behind-the-scenes interviews and more.