How to compare 10-K risk factors with AI, and check every change
Comparing 10-K risk factors with AI works, as long as the model answers in IDs a script can check. I gave Claude Opus 5.5 the risk factors from Lumentum’s last two annual reports, 42,585 words with an ID on every sentence, and asked what changed. A Python diff then graded the answer. Opus named all 36 risk factors that were added, removed or rewritten, and all 321 sentence IDs it cited were real changes. It skipped one sentence where “2025” became “2025 and 2026”, and one of its one-line summaries says something the filing doesn’t. Claude Haiku 5.5, on the same prompt, missed a whole risk factor and listed 13 sentences as rewritten that Lumentum had only moved.

The setup: two 10-Ks, one prompt, an ID on every sentence
The company is Lumentum (LITE), the optical components maker I’ve used before to show how Lumentum makes money. The documents are Item 1A of its 10-K for fiscal 2025 (year to 28 June 2025, filed 19 August 2025) and its 10-K for fiscal 2026 (year to 27 June 2026, filed 17 August 2026). It’s a good test pair because a lot happened in between: tariffs, the Huawei restrictions, convertible notes due 2032, a revolving credit facility, and AI demand big enough to earn its own risk factor. Each year’s section runs past 20,000 words. Few people read both closely, which is exactly why people want a model to do it.
The trick that makes the answer checkable is the same one I used for an AI earnings call summary. The model cites IDs and quotes nothing. Ask a model “what changed?” and you get fluent paraphrase that you’d have to check by rereading both filings, which defeats the point. Ask it for IDs and a script can check every one. The first block pulls Item 1A from both 10-Ks with the standard library’s HTML parser. Lumentum sets each risk factor title in bold italic, so a block that is all bold italic and at least eight words long starts a new factor. The SEC asks for a contact in the User-Agent and no API key, as in my post on the SEC EDGAR API in Python.
import os
import re
import hashlib
import difflib
from html.parser import HTMLParser
import requests
import matplotlib.pyplot as plt
# The SEC asks every automated request to identify itself. Set your own contact first:
# export SEC_USER_AGENT="Your Name you@example.com"
HEADERS = {"User-Agent": os.environ["SEC_USER_AGENT"]}
FILINGS = {
"A": ("fiscal 2025", "https://www.sec.gov/Archives/edgar/data/1633978/000162828025040830/lite-20250628.htm"),
"B": ("fiscal 2026", "https://www.sec.gov/Archives/edgar/data/1633978/000162828026057358/lite-20260627.htm"),
}
class Blocks(HTMLParser):
"""Text blocks of a filing; a block is flagged when all its text is bold italic."""
def __init__(self):
super().__init__()
self.blocks, self.parts, self.styles = [], [], []
def handle_starttag(self, tag, attrs):
if tag in ("div", "p", "tr"):
self.flush()
self.styles.append((tag, dict(attrs).get("style") or ""))
def handle_endtag(self, tag):
if tag in ("div", "p", "tr"):
self.flush()
while self.styles and self.styles.pop()[0] != tag:
pass
def handle_data(self, data):
style = " ".join(s for t, s in self.styles if t == "span")
self.parts.append((data, "font-weight:700" in style and "font-style:italic" in style))
def flush(self):
text = re.sub(r"\s+", " ", "".join(d for d, _ in self.parts).replace("\xa0", " ")).strip()
if text:
self.blocks.append((text, all(bi for d, bi in self.parts if d.strip())))
self.parts = []
SPLIT = re.compile(r"(?<!U\.S\.)(?<!Inc\.)(?<!No\.)(?<!Co\.)(?<!e\.g\.)(?<!i\.e\.)(?<=[.?!])\s+(?=[A-Z“\"(])")
def risk_factors(url):
"""Item 1A of a 10-K as a list of (title, sentences)."""
parser = Blocks()
parser.feed(requests.get(url, headers=HEADERS, timeout=60).text)
parser.flush()
blocks = parser.blocks
start = max(k for k, (t, _) in enumerate(blocks) if t.upper().startswith("ITEM 1A. RISK FACTORS"))
end = max(k for k, (t, _) in enumerate(blocks) if t.upper().startswith("ITEM 1B"))
section = blocks[start:end]
# Item 1A opens with a summary list; the factors start at the second "Risks Related to Our Business"
first = max(k for k, (t, _) in enumerate(section) if t.lower() == "risks related to our business")
factors = []
for text, bold_italic in section[first + 1:]:
if text.isdigit() or text.lower().startswith("risks related to"):
continue # page numbers and group headings
if bold_italic and len(text.split()) >= 8:
factors.append((text, []))
elif factors:
factors[-1][1].extend(SPLIT.split(text))
return factors
rf = {key: risk_factors(url) for key, (label, url) in FILINGS.items()}
for key, (label, url) in FILINGS.items():
words = sum(len(s.split()) for t, sents in rf[key] for s in [t, *sents])
print(f"{label}: {len(rf[key])} risk factors, {sum(len(s) for t, s in rf[key])} sentences, {words:,} words")
fiscal 2025: 50 risk factors, 639 sentences, 20,494 words
fiscal 2026: 51 risk factors, 639 sentences, 20,682 words
50 risk factors became 51, with the same sentence count both years, which tells you nothing about what changed. That’s the diff’s job. The next block numbers everything (A07 is the title of the seventh fiscal 2025 factor, A07.3 its third sentence, B for fiscal 2026) and writes the file the models read.
def numbered(key):
"""The risk factors of one filing with an ID on every title and sentence (A07 is a title, A07.3 a sentence)."""
lines = [f"=== Lumentum 10-K for {FILINGS[key][0]}, Item 1A. Risk Factors (IDs start with {key}) ==="]
for i, (title, sentences) in enumerate(rf[key], 1):
lines.append(f"[{key}{i:02d}] {title}")
lines += [f"[{key}{i:02d}.{j}] {s}" for j, s in enumerate(sentences, 1)]
return lines
model_input = "\n".join(numbered("A") + [""] + numbered("B")) + "\n"
with open("lite-risk-factors-numbered.txt", "w", encoding="utf-8") as f:
f.write(model_input)
print("model input:", len(model_input.split()), "words, sha256", hashlib.sha256(model_input.encode()).hexdigest()[:12])
model input: 42585 words, sha256 5e7611dddb34
The hash is there so the test can be repeated. The file both models read has the same SHA-256 as the one this code writes, so anyone who reruns the code feeds a model the identical input. The prompt, in full:
The file lite-risk-factors-numbered.txt in the current folder holds Item 1A (Risk Factors) from two consecutive annual reports on Form 10-K filed by Lumentum Holdings Inc. (ticker LITE): the fiscal 2025 10-K (IDs starting with A) and the fiscal 2026 10-K (IDs starting with B). Each risk factor title has an ID such as A07, and each sentence under it has an ID such as A07.3.
Compare the two years and report every change to the risk factors:
1. added: risk factors in the fiscal 2026 10-K that have no counterpart in the fiscal 2025 10-K.
2. removed: risk factors in the fiscal 2025 10-K that have no counterpart in the fiscal 2026 10-K.
3. changed: risk factors present in both years whose title or text changed. Count every change in wording, however small, but ignore changes that only update a date, a fiscal year or a number. For each, give the B ID, the matching A ID, the IDs of the sentences in B that contain new or rewritten text, and the IDs of the sentences in A that were deleted or rewritten.
Work only from that file. Cite IDs exactly as they appear in the file. Answer with JSON only, in this form:
{"added": [{"id": "B..", "summary": "one line"}],
"removed": [{"id": "A..", "summary": "one line"}],
"changed": [{"new_id": "B..", "old_id": "A..", "summary": "one line on what changed", "new_sentences": ["B..."], "deleted_sentences": ["A..."]}]}
Both models ran once each on 3 December 2026 through Claude Code 2.1.330 in non-interactive mode, in a folder holding nothing but the numbered file, with the prompt on standard input. Claude Code reads CLAUDE.md instruction files and its own memory by default, which would let my other projects’ instructions leak into a test, so both runs had those switched off:
export CLAUDE_CODE_DISABLE_CLAUDE_MDS=1 CLAUDE_CODE_DISABLE_AUTO_MEMORY=1
claude -p --output-format text --model claude-opus-5-5 < prompt.md
claude -p --output-format text --model claude-haiku-5-5 < prompt.md
Opus answered in 153 seconds. Haiku, the small fast one, took 298. I saved each run with its prompt, raw reply, tool version and run time.
The diff that grades the answer
A model’s answer is only as checkable as the answer key, so the key has to be strict. The diff lower-cases every sentence, masks numbers (the prompt said to ignore changes that only update a date or a number), drops punctuation, and looks for the sentence anywhere in the other year’s Item 1A. Two details took longer than the rest. A page break in the fiscal 2025 HTML splits one sentence in two (A31.21 and A31.22), so a sentence also counts as found when it matches two consecutive ones. And Lumentum moved text between factors, so a sentence that left one factor and turned up in another hasn’t changed, even though a factor-by-factor diff would call it new.
def norm(s):
"""Words of a sentence in lower case, every number replaced by #, punctuation dropped."""
return " ".join(re.sub(r"[^a-z#]+", " ", re.sub(r"\d[\d,.]*\d|\d", "#", s.lower())).split())
def by_id(key):
"""Every title and sentence of one filing, keyed by its ID."""
out = {}
for i, (title, sentences) in enumerate(rf[key], 1):
out[f"{key}{i:02d}"] = title
out.update({f"{key}{i:02d}.{j}": s for j, s in enumerate(sentences, 1)})
return out
def found_in(mine, other, clean):
"""IDs whose cleaned text is a sentence of the other year, or two consecutive ones (a page break can split one)."""
keys, ids = list(other), list(mine)
seen = {clean(other[k]) for k in keys} | {clean(other[x] + " " + other[y]) for x, y in zip(keys, keys[1:])}
found = {k for k in ids if clean(mine[k]) in seen}
return found | {k for x, y in zip(ids, ids[1:]) if clean(mine[x] + " " + mine[y]) in seen for k in (x, y)}
def as_printed(t):
"""Text with whitespace collapsed and nothing else changed."""
return " ".join(t.split())
text = {"A": by_id("A"), "B": by_id("B")}
new = set(text["B"]) - found_in(text["B"], text["A"], norm) # fiscal 2026 wording not in fiscal 2025
deleted = set(text["A"]) - found_in(text["A"], text["B"], norm) # fiscal 2025 wording gone in fiscal 2026
changed_text = new | deleted
punct = ((found_in(text["B"], text["A"], norm) - found_in(text["B"], text["A"], as_printed)) |
(found_in(text["A"], text["B"], norm) - found_in(text["A"], text["B"], as_printed)))
def factor(fid):
"""Title and sentence IDs that belong to one risk factor."""
return {k for k in text[fid[0]] if k.split(".")[0] == fid}
def shared(bid, aid):
"""Sentences of a fiscal 2025 factor that reappear word for word in a fiscal 2026 factor."""
old = {norm(text["A"][k]) for k in factor(aid)}
return sum(norm(text["B"][k]) in old for k in factor(bid))
b_ids = sorted(k for k in text["B"] if "." not in k)
a_ids = sorted(k for k in text["A"] if "." not in k)
def likeness(bid, aid):
"""The better of title similarity and the share of the fiscal 2026 factor's sentences found in aid."""
title = difflib.SequenceMatcher(None, norm(text["A"][aid]).split(), norm(text["B"][bid]).split()).ratio()
return max(title, shared(bid, aid) / len(factor(bid)))
# pair factors one to one, most alike first; a pair needs a likeness of at least 0.5
pairs = {}
for score, bid, aid in sorted(((likeness(b, a), b, a) for b in b_ids for a in a_ids), reverse=True):
if score >= 0.5 and bid not in pairs and aid not in pairs.values():
pairs[bid] = aid
added = [b for b in b_ids if b not in pairs]
removed = [a for a in a_ids if a not in pairs.values()]
changed = [b for b in pairs if (factor(b) | factor(pairs[b])) & changed_text]
built_from = {b: [a for a in a_ids if shared(b, a)] for b in added}
print(f"risk factors: {len(changed)} changed, {len(added)} added, {len(removed)} removed, "
f"{len(pairs) - len(changed)} unchanged")
print("added:", ", ".join(f"{b} (reuses text of {', '.join(built_from[b])})" if built_from[b] else b for b in added))
print("removed:", ", ".join(removed))
print(f"sentences and titles: {len(new)} new or rewritten in fiscal 2026, {len(deleted)} deleted or rewritten "
f"from fiscal 2025, {len(punct)} with a punctuation-only edit")
risk factors: 27 changed, 5 added, 4 removed, 19 unchanged
added: B16, B22 (reuses text of A21, A22), B37 (reuses text of A46), B50, B51
removed: A07, A21, A22, A30
sentences and titles: 185 new or rewritten in fiscal 2026, 183 deleted or rewritten from fiscal 2025, 6 with a punctuation-only edit
In the answer key, 27 factors changed, 5 were added, 4 were removed, and 368 sentence and title IDs carry new or deleted wording. Two of the “added” factors are reshuffles. B22, on acquisitions, merges the two fiscal 2025 factors on strategic transactions and on integrating acquisitions (A21 and A22), and B37, on the limits debt puts on the business, is carved out of the old debt-servicing factor. Those are the traps. An answer that calls B22 brand new and an answer that calls it a rewrite of A22 are both half right.

The reading itself is the useful bit for anyone following Lumentum. The factor on protecting intellectual property was rewritten almost from scratch, 1,294 words in changed sentences, and now covers copyrights, open-source obligations and who owns IP built with AI tools. The tariff factor is next at 1,132. Two capped-call factors and one on forecasting AI-driven demand and adding capacity are new; the stand-alone factors on bank failures and on a health crisis are gone.
What Claude Opus 5.5 got right, and the one sentence it skipped
The models’ answers go into the code as IDs, copied from their saved JSON replies. A range like “3-17” means sentences 3 to 17 and “t” is the title. The grading checks each factor-level claim against the diff, then every cited sentence ID, then lists the changed IDs nobody cited. A rewrite claim that pairs a new factor with the old one it reuses (B22 with A22, say) counts as right.
# What each model answered, copied from its saved JSON reply as IDs: "t" is the title, "3-5" sentences 3 to 5
OPUS = {
"added": "B16 B50 B51",
"removed": "A07 A30",
"changed": [
("B01", "3,10", "A01", "3,10"),
("B02", "3-17,20,22-24", "A02", "3-10,13,15-16"),
("B03", "4-5,8,11", "A03", "4-5,8,11"),
("B05", "t,7-8,12,15-19", "A05", "t,5,8,12,15-19"),
("B07", "2", "A08", "2"),
("B08", "1,13", "A09", "1,13"),
("B09", "1", "A10", "1"),
("B10", "1", "A11", "1"),
("B11", "3,10", "A12", "3,10-11"),
("B13", "10", "A14", ""),
("B14", "10-12,16,19,29-31,34", "A15", "10-13,16,18,21,31-32,35"),
("B15", "7", "A16", "7"),
("B17", "t,5,16,20,35", "A17", "t,5,16,20,27-30,39"),
("B22", "t,1-2,4-7,10-12", "A21", "t,1-3,5-7,10-13"),
("B22", "17-18,24,26,29", "A22", "t,1,6,8-11,13,15-16,18-20,22-23"),
("B23", "4", "A24", "4"),
("B24", "1", "A25", "1"),
("B25", "7,11-12", "A26", "7,11-12"),
("B26", "6", "A27", ""),
("B27", "3-4,6", "A28", "3-5,7"),
("B29", "12-17,19,24", "A31", "12-17,19,23-24,27"),
("B31", "t,1-21", "A33", "t,1-19"),
("B32", "1-10", "A34", "1-15"),
("B36", "t,2-6,8", "A46", "t,3"),
("B37", "t,1-5,12-14", "A46", "6-8"),
("B40", "14-16", "A40", "14-15"),
("B41", "1", "A41", "1"),
("B44", "24,26-33,35,37-39", "A44", "21-22,26,28-34,36,38-39"),
("B45", "3,6,10", "A45", "3-4,7,11,16,19,23"),
("B46", "1", "A47", "1"),
],
}
HAIKU = {
"added": "B16 B37 B50 B51",
"removed": "A07 A21 A30",
"changed": [
("B01", "3,9-10", "A01", "3,9-10"),
("B02", "3-17,20,22-24", "A02", "3-10,13,15-16"),
("B03", "4-5,8,11", "A03", "4-5,8,11"),
("B05", "7-8,11-12,15-19", "A05", "5,8,11-12,15-19"),
("B07", "2", "A08", "2"),
("B08", "1,13", "A09", "1,13"),
("B09", "1", "A10", "1"),
("B10", "1", "A11", "1"),
("B11", "3,10", "A12", "3,10-11"),
("B13", "10", "A14", ""),
("B14", "10-12,16,19,29-31,34", "A15", "10-13,16,18,21,31-32,35"),
("B15", "7", "A16", "7"),
("B17", "5,16,20,35", "A17", "5,16,20,27-30,39"),
("B22", "1-18,24,26,29-30", "A22", "1,6,8-11,13,15-16,18-23"),
("B24", "1", "A25", "1"),
("B25", "7,11-12", "A26", "7,11-12"),
("B26", "6", "A27", ""),
("B27", "3-4,6", "A28", "3-5,7"),
("B29", "12-17,19,24", "A31", "12-17,19,23-24,27"),
("B31", "1-21", "A33", "1-19"),
("B32", "1-10", "A34", "1-15"),
("B36", "2-6,8", "A46", "3,6-14"),
("B40", "14-16", "A40", "14-15"),
("B41", "1", "A41", "1"),
("B44", "24,26-33,35,37-39", "A44", "21-22,26,28-34,36,38-39"),
("B45", "3,6,10", "A45", "3-4,7,11,16,19,23"),
("B46", "1", "A47", "1"),
],
}
def expand(fid, spec):
"""'t,3-5' for factor B02 -> {'B02', 'B02.3', 'B02.4', 'B02.5'}."""
out = set()
for part in filter(None, spec.split(",")):
if part == "t":
out.add(fid)
else:
lo, _, hi = part.partition("-")
out |= {f"{fid}.{n}" for n in range(int(lo), int(hi or lo) + 1)}
return out
def grade(answer):
"""Check every change a model reported against the diff and list what it missed."""
rep_added, rep_removed = answer["added"].split(), answer["removed"].split()
factor_wrong = [b for b in rep_added if b not in added] + [a for a in rep_removed if a not in removed]
cited, covered = set(), set()
for bid, new_spec, aid, old_spec in answer["changed"]:
right_pair = pairs.get(bid) == aid and bid in changed
merge = (bid in added or aid in removed) and shared(bid, aid) > 0
if not (right_pair or merge):
factor_wrong.append(f"{bid}/{aid}")
cited |= expand(bid, new_spec) | expand(aid, old_spec)
for fid in rep_added + rep_removed:
covered |= factor(fid)
covered |= cited
named = set(rep_added + rep_removed) | {x for c in answer["changed"] for x in (c[0], c[2])}
factor_missed = [b for b in changed + added if b not in named] + [a for a in removed if a not in named]
return {
"factor_reports": len(rep_added) + len(rep_removed) + len(answer["changed"]),
"factor_wrong": factor_wrong,
"factor_missed": factor_missed,
"ids_cited": len(cited),
"ids_confirmed": len(cited & changed_text),
"ids_punct": sorted(cited & punct),
"ids_unchanged": sorted(cited - changed_text - punct),
"ids_missed": sorted(changed_text - covered),
}
results = {"Claude Opus 5.5": grade(OPUS), "Claude Haiku 5.5": grade(HAIKU)}
for model, r in results.items():
print(f"\n{model}: {r['factor_reports']} factor-level changes reported, wrong {r['factor_wrong'] or 'none'}, "
f"missed {r['factor_missed'] or 'none'}")
print(f" sentence IDs cited {r['ids_cited']}: {r['ids_confirmed']} confirmed by the diff, "
f"{len(r['ids_punct'])} punctuation-only {r['ids_punct']}, {len(r['ids_unchanged'])} with text found word for word "
f"in the other year {r['ids_unchanged']}")
print(f" changed IDs never cited {len(r['ids_missed'])}: {r['ids_missed']}")
Claude Opus 5.5: 35 factor-level changes reported, wrong none, missed none
sentence IDs cited 321: 321 confirmed by the diff, 0 punctuation-only [], 0 with text found word for word in the other year []
changed IDs never cited 2: ['A02.2', 'B02.2']
Claude Haiku 5.5: 34 factor-level changes reported, wrong none, missed ['B23']
sentence IDs cited 308: 289 confirmed by the diff, 6 punctuation-only ['A01.9', 'A05.11', 'A22.21', 'B01.9', 'B05.11', 'B22.30'], 13 with text found word for word in the other year ['A46.10', 'A46.11', 'A46.12', 'A46.13', 'A46.14', 'A46.9', 'B22.13', 'B22.14', 'B22.15', 'B22.16', 'B22.3', 'B22.8', 'B22.9']
changed IDs never cited 14: ['A02.2', 'A05', 'A17', 'A22', 'A24.4', 'A33', 'A46', 'B02.2', 'B05', 'B17', 'B22', 'B23.4', 'B31', 'B36']
Opus handled both traps. It paired B22 with A21 and with A22 in two separate entries, and B37 with the old debt factor, so all 35 of its factor-level claims hold up and it missed none of the
- Every one of its 321 sentence IDs points at wording that changed. The only gap is A02.2 and B02.2, where “Throughout 2025” became “Throughout 2025 and 2026” in the sentence about US tariffs. The prompt told it to ignore changes that only update a date, and adding a year is about as close to that line as a sentence gets. My diff counts it as a change, so the score shows a miss. I wouldn’t call it an error.
Where Claude Haiku 5.5 went wrong
Haiku got the shape of the changes right and still made four kinds of error, two of them hard ones. It missed B23 completely, where “expense” became “expenses” in the factor on restructuring. A one-letter edit is hardly news. The prompt asked for every change all the same, and Opus found it.
It listed 13 sentences as rewritten that exist word for word in both years. Six bullets of the old debt factor (A46.9 to A46.14) moved to B37, and Haiku’s own summary of B37 says those bullets moved there; it listed them as deleted from A46 anyway. The other seven are B22 sentences that came from A21. Its changed list pairs B22 with A22 only, so A21’s text looked new to it, even though its summary says B22 absorbs A21. That’s the factor-by-factor mistake the diff was built to avoid.
The other two kinds are softer. It cited 6 IDs whose only edit is punctuation (comma edits in two sentences and a semicolon that became a full stop), which the prompt’s “change in wording” doesn’t cover, and its summary says it counted a comma-only edit on purpose. And it left 5 changed titles off its ID lists even though its summaries describe each of them (“Title now ‘previously significant customer'”). The diff can only grade what’s in the lists, which is a reason to make the output format do the work.
Checking the one-line summaries too
IDs cover where a change is. The summaries say what it is, and that’s where a model can still make things up. The last check takes the words and phrases each summary names as added or dropped, typed from the saved replies as search terms (a stem such as “evaluat”, or the filing’s own spelling where a summary paraphrases), and counts them in the old and the new factor. A word the summary says was added has to appear more often in fiscal 2026; a dropped one less often.
# What each one-line summary says was added (+) or dropped (-), as search terms typed from that model's own saved
# reply (a stem, or the filing's spelling where the summary paraphrases); "new factor|old factor|terms", "-" = none
OPUS_TERMS = [
"B16|-|+manufacturing capacity;+investments related to AI",
"B50|-|+hedg",
"B51|-|+counterparty;+unsecured",
"-|A07|-financial institution",
"-|A30|-health crisis",
"B01|A01|+Iran;+Western Hemisphere;+banking markets;+armed conflicts;-stabilize",
"B02|A02|+invalidated;+expired;+Section 232;+Section 301;+mitigat;+Japan;+substrate;+Chinese optical",
"B03|A03|+advanced payments;+impossible;-recent",
"B05|A05|+previously significant;+never recover;+continues to add",
"B07|A08|+affected;-reduced",
"B08|A09|-segment profit;+pandemics",
"B09|A10|+are experiencing",
"B10|A11|+capacity",
"B11|A12|+certain areas;+large public companies;+private companies;+start-ups",
"B13|A14|+shift",
"B14|A15|+indium;-sanctions;+export control measures;-5G;+conflicts or wars;+other regions",
"B15|A16|+fires",
"B17|A17|+energy shortages;+energy costs;+from whom we buy;-pandemic;-social and environmental;+retaliatory measures",
"B22|A21|+debt;+negotiat",
"B22|A22|-Cloud Light;-NeoPhotonics;+may not perform",
"B23|A24|+expenses",
"B24|A25|-The Company completed;+we completed",
"B25|A26|+recently agreed;+includes the impact;-evaluat",
"B26|A27|+yen",
"B27|A28|+Credit Agreement;+December 2025",
"B29|A31|-GDPR;-CCPA;-Personal Information Protection Law;+exploit",
"B31|A33|-would be harmed;+could be harmed;+copyright;+open-source;+AI-assisted",
"B32|A34|-patent trolls;+non-practicing;+new markets",
"B36|A46|+2032 Notes;+Credit Agreement;+going concern;+convertible at the option",
"B37|A46|+covenants;+additional indebtedness",
"B40|A40|+Foreign Direct Product Rule;+among others",
"B41|A41|+large public companies",
"B44|A44|-Brazil;+Department of Justice;+bulk;+adequacy",
"B45|A45|-overall market fluctuations;-tariffs",
"B46|A47|-supplemental indenture;+pursuant to the terms of our convertible notes",
]
HAIKU_TERMS = [
"B16|-|+manufacturing capacity;+investments related to AI",
"B37|A46|+covenants;+Credit Agreement",
"B50|-|+hedg",
"B51|-|+counterparty",
"-|A07|-financial institution",
"-|A21|-strategic transactions",
"-|A30|-health crisis",
"B01|A01|+Iran;+Western Hemisphere;-While conditions have continued to stabilize",
"B02|A02|+Section 232;+Section 301;+Japan",
"B03|A03|+advanced payments;-recent",
"B05|A05|+previously significant",
"B07|A08|+affected demand;-reduced demand",
"B08|A09|-segment profit;+pandemics and other public health emergencies",
"B09|A10|-have experienced;+are experiencing",
"B10|A11|+manufacturing or supply chain capacity",
"B11|A12|+certain areas of our business;+large public companies;+private companies;+start-ups",
"B13|A14|+shift",
"B14|A15|-5G;+indium;+rare earth;+export control;+other regions;-dips;+declines",
"B15|A16|+fires",
"B17|A17|+unable or fail;+energy shortages;+from whom we buy;+retaliatory measures",
"B22|A22|+identify, acquire and integrate suitable businesses;+divest",
"B24|A25|-the Company completed;+we completed",
"B25|A26|-G7;+OECD;+includes the impact;-not applicable to us until fiscal year;-currently evaluating",
"B26|A27|+yen",
"B27|A28|+1,554.3;+400.0;+December 2025;+or equity-linked",
"B29|A31|+AI-generated;-network systems;-GDPR;-CCPA;-Personal Information Protection Law",
"B31|A33|-would be harmed;+could be harmed;+copyright;+open-source;+AI-assisted",
"B36|A46|+2032 Notes;+Credit Agreement;+settled in cash;+going concern",
"B40|A40|+Foreign Direct Product Rule;+among others",
"B41|A41|+especially with respect to large public companies",
"B44|A44|-Brazil;+2031;+revoc;+bulk",
"B45|A45|-overall market fluctuations;-tariff",
"B46|A47|-First Supplemental Indenture;-September 25, 2024",
]
def factor_text(fid):
"""Lower-case text of a risk factor, title included ('-' gives an empty string)."""
return " ".join(text[fid[0]][k] for k in sorted(factor(fid))).lower() if fid != "-" else ""
def check_terms(claims):
"""A '+' word must appear more often in the new factor than in the old one, a '-' word less often."""
failed, total = [], 0
for claim in claims:
bid, aid, terms = claim.split("|")
new_text, old_text = factor_text(bid), factor_text(aid)
for term in terms.split(";"):
total += 1
n_new, n_old = new_text.count(term[1:].lower()), old_text.count(term[1:].lower())
if not (n_new > n_old if term[0] == "+" else n_new < n_old):
failed.append(f"{bid}/{aid} {term}: {n_old} in fiscal 2025, {n_new} in fiscal 2026")
return total, failed
for model, claims in {"Claude Opus 5.5": OPUS_TERMS, "Claude Haiku 5.5": HAIKU_TERMS}.items():
total, failed = check_terms(claims)
results[model].update(terms=total, terms_failed=failed)
print(f"{model}: {total} summary terms checked, {len(failed)} contradicted by the filing text")
for f in failed:
print(" ", f)
Claude Opus 5.5: 93 summary terms checked, 1 contradicted by the filing text
B25/A26 -evaluat: 1 in fiscal 2025, 1 in fiscal 2026
Claude Haiku 5.5: 81 summary terms checked, 1 contradicted by the filing text
B14/A15 +rare earth: 1 in fiscal 2025, 1 in fiscal 2026
One each. Opus says the tax factor now includes the impact of the One Big Beautiful Bill Act (OBBBA) “instead of it still being evaluated”. The first half is right. The fiscal 2026 text still says Lumentum “will continue to evaluate the impact of the OBBBA” (10-K for fiscal 2026, Item 1A). Haiku says the international-operations factor “adds indium and rare-earth export restrictions”. Indium is new; China’s restrictions on rare earth metals were already in the fiscal 2025 version (10-K for fiscal 2025, Item 1A). Small errors, both of the kind a reader would repeat in a note to a colleague without checking.
This check is cruder than the other two. It tests the words a summary names and nothing else, so a summary that gets a change backwards without naming a testable word passes. The last block draws the two charts.
GREEN, AMBER, RED, GREY = "#2e7d32", "#f9a825", "#c62828", "#9e9e9e"
# Chart 1: every sentence ID each model cited, sorted by what the diff says about it
fig, ax = plt.subplots(figsize=(9, 3.6))
for y, (model, r) in enumerate(results.items()):
parts = [(r["ids_confirmed"], GREEN, "changed in the filing"),
(len(r["ids_punct"]), AMBER, "punctuation-only edit"),
(len(r["ids_unchanged"]), RED, "text in both years (moved or unchanged)"),
(len(r["ids_missed"]), GREY, "changed but never cited")]
left = 0
for n, colour, label in parts:
ax.barh(y, n, left=left, color=colour, label=label if y == 0 else None)
if n >= 6:
ax.text(left + n / 2, y, str(n), ha="center", va="center", color="white", fontsize=9)
left += n
ax.set_yticks([0, 1], list(results))
ax.invert_yaxis()
ax.set_xlabel("sentence and title IDs")
ax.set_title("Lumentum 10-K risk factors, fiscal 2025 vs 2026: each ID a model cited, checked against a diff",
fontsize=10)
ax.legend(loc="lower center", bbox_to_anchor=(0.5, -0.32), ncol=2, frameon=False, fontsize=9)
plt.savefig("lite-risk-factor-ai-check.png", dpi=150, bbox_inches="tight")
plt.close()
# Chart 2: the risk factors that changed most, by words in new or deleted sentences
LABELS = {"B31": "Protecting IP (adds copyrights, open source, AI)", "B02": "Tariffs and trade policy",
"B44": "Laws, regulation and data privacy", "B14": "International operations",
"B32": "IP infringement claims", "B29": "IT systems and security breaches",
"B17": "Own and contract manufacturing", "B36": "Servicing the debt",
"B16": "Forecasting demand, adding capacity (new)", "B05": "Huawei export restrictions",
"A30": "Health crisis (removed)", "B22": "Acquisitions (rebuilt from A21 and A22)"}
def words(ids, side):
"""Words in the new (B) or deleted (A) sentences among ids."""
return sum(len(text[side][k].split()) for k in ids if k in (new if side == "B" else deleted))
sizes = {}
for fid in changed + added + removed:
old = factor(pairs[fid]) if fid in pairs else (factor(fid) if fid[0] == "A" else set())
sizes[fid] = (words(factor(fid), "B") if fid[0] == "B" else 0, words(old, "A"))
top = sorted(sizes, key=lambda f: -sum(sizes[f]))[:12]
fig, ax = plt.subplots(figsize=(9, 5))
ax.barh(range(len(top)), [sizes[f][1] for f in top], color=RED, label="words deleted from fiscal 2025")
ax.barh(range(len(top)), [sizes[f][0] for f in top], left=[sizes[f][1] for f in top], color=GREEN,
label="words new in fiscal 2026")
ax.set_yticks(range(len(top)), [f"{f} {LABELS.get(f, '')}" for f in top], fontsize=9)
ax.invert_yaxis()
ax.set_xlabel("words in sentences that changed")
ax.set_title("Where Lumentum rewrote its risk factors (10-K fiscal 2026 vs fiscal 2025)", fontsize=10)
ax.legend(frameon=False, fontsize=9, loc="lower right")
plt.savefig("lite-risk-factor-changes.png", dpi=150, bbox_inches="tight")
plt.close()
opus, haiku = results["Claude Opus 5.5"], results["Claude Haiku 5.5"]
figures = {
"factors_a": len(rf["A"]), "factors_b": len(rf["B"]),
"sentences_a": sum(len(s) for _, s in rf["A"]), "sentences_b": sum(len(s) for _, s in rf["B"]),
"input_words": len(model_input.split()),
"n_changed": len(changed), "n_added": len(added), "n_removed": len(removed),
"n_unchanged": len(pairs) - len(changed), "n_truth_factors": len(changed) + len(added) + len(removed),
"ids_new": len(new), "ids_deleted": len(deleted), "ids_changed": len(changed_text), "ids_punct": len(punct),
"words_new": sum(v[0] for v in sizes.values()), "words_deleted": sum(v[1] for v in sizes.values()),
"top_words": sum(sizes[top[0]]), "second_words": sum(sizes[top[1]]),
"opus_factor_reports": opus["factor_reports"], "opus_factor_wrong": len(opus["factor_wrong"]),
"opus_factor_missed": len(opus["factor_missed"]), "opus_cited": opus["ids_cited"],
"opus_confirmed": opus["ids_confirmed"], "opus_missed_ids": len(opus["ids_missed"]),
"opus_terms": opus["terms"], "opus_terms_failed": len(opus["terms_failed"]),
"haiku_factor_reports": haiku["factor_reports"], "haiku_factor_wrong": len(haiku["factor_wrong"]),
"haiku_factor_missed": len(haiku["factor_missed"]), "haiku_cited": haiku["ids_cited"],
"haiku_confirmed": haiku["ids_confirmed"], "haiku_punct": len(haiku["ids_punct"]),
"haiku_unchanged": len(haiku["ids_unchanged"]), "haiku_missed_ids": len(haiku["ids_missed"]),
"haiku_terms": haiku["terms"], "haiku_terms_failed": len(haiku["terms_failed"]),
"haiku_title_missed": sum(k[0] == "B" and "." not in k for k in haiku["ids_missed"]),
}
What can go wrong with 10-K risk factors and AI
The parser finds the wrong factors. Lumentum marks titles in bold italic. Another filer uses bold, underline or a heading tag, and the factor count comes out wrong without an error. Check the count against the filing before trusting anything downstream. The sentence splitter needed exceptions too, or “Co.” in a company name ends a sentence.
Moved text looks new. Diff each factor against its old version only and every merged or split factor fills up with false changes. That’s the mistake Haiku made, and the first version of my own diff made it as well. Compare against the whole section.
“Changed” means what you define it to mean. Dates, numbers and punctuation are the grey zone. The prompt and the diff have to use the same definition, or you end up grading the model on rules it was never given. Opus’s one “miss” sits exactly on that line.
IDs check the location, and the summary can still be wrong. Each model got one summary wrong on a factor where every ID it cited was a real change. If the summary is what you’ll actually read, check it against the cited sentences.
One run is one run. Each model ran once. Run it again and the lists can differ, so a missed factor in one run shows the risk exists and says little about how often it happens. For longer filings, a bank’s risk factors for example, split the input by section before it reaches the model’s context limit.
If you’d rather check numbers than sentences, the same idea works on figures: checking AI numbers against SEC XBRL does it for financial statements, and Claude vs ChatGPT vs Gemini on one 10-K shows how differently three models read the same filing.
What to watch
Lumentum’s risk factors have already moved again. The 10-Q for the quarter to 26 September 2026, filed on 3 November, added factors on possible FCC restrictions on optical transceivers and on the proposed merger with Marvell, agreed on 1 November 2026 (10-Q, Part II, Item 1A). The next full comparison would be the 10-K for fiscal 2027, which the fiscal 2026 10-K says is a 53-week year ending 3 July 2027, but if the merger closes first there may be no such 10-K to compare. On the model side, two of Haiku’s four kinds of error, the missing title IDs and the moved sentences, are the kind a stricter output format and one more prompt rule could catch. The next thing to test is whether a schema that requires the title ID, plus a rule against citing text that appears anywhere in the other year, closes that part of the gap. The missed factor and the wrong summary would still need checks like the ones above.
My longer company research is published on the newsletter Sector Playbook, which is available by email subscription.
Sources
Lumentum’s 10-K for fiscal 2025 and 10-K for fiscal 2026, and its 10-Q for the quarter to 26 September 2026, all from SEC EDGAR. Claude Code non-interactive mode and environment variables.
Tested 3 December 2026 with Claude Code 2.1.330 (Claude Opus 5.5 and Claude Haiku 5.5).
Disclaimer
Disclosure: I have no position in LITE. I have no position in the other companies discussed (MRVL). I also hold diversified funds (IWDA, QQQ, SPY, VWRL) that may include some of these companies. Positions checked on 3 December 2026.
This article is general information about a listed company, written for educational purposes. It is not investment advice and not a personal recommendation to buy, sell or hold any security, and it does not take into account anyone’s financial situation or objectives. I am not a registered investment adviser or a licensed financial services provider. Figures come from company filings and the other sources linked in the text, as of the dates given, and may have changed since. I may hold positions in the securities discussed; see the disclosure above. Investment decisions call for independent research or the advice of a licensed professional.
This is my own research, done with the help of AI tools.