Mycroft: Starting the Lineage Agent
Humanitarians AI Fellow Aishwarya Patil begins the Lineage Agent, which traces a patent's citation lineage instead of its claims. The video covers a free schema check, an honest scope choice and a bug where BigQuery returns empty strings, not None.
This video shows the real start of the Lineage Agent, the second half of the Mycroft patent intelligence system. Where the Claims Agent reads what a patent's claims say, the Lineage Agent traces the patent's citation lineage. Humanitarians AI Fellow Aishwarya Patil walks through checking the data structure first, choosing a narrow scope and a bug she caught in a field check.
The first result
The first test returned a clean summary for one patent with 12 citations: one patent citation and 11 papers. The summary was right, the video says, but only after a real bug was caught along the way. The sections below explain how the number was reached and why it can be trusted.
Checking the schema before writing code
Before writing anything, she checked what the data actually contains. The citation field is a repeated record holding a publication number, an application number, free text for non-patent literature, a type, a category and a filing date. Looking at a schema costs nothing, because there is no query cost to check it. The point is to learn the real shape of the data instead of assuming it.
Scoping the first build honestly
Two directions exist for citations. Backward citations are the patents and papers a given patent cites. Forward citations are the patents that cite it back. Backward is a field on the row already being pulled. Forward means searching every other patent's citations for this one's number, which is a different, untested and likely expensive query. The decision was to build backward first and treat forward as a separate piece of work.
The bug: empty is not missing
The first real test ran clean: 12 citations parsed, one patent and 11 papers. But the field meant to identify non-patent literature was not checking for empty text. It was checking for missing text. On this table, missing text is not missing at all. It is an empty string. As a result, every citation passed that check whether or not it had a real patent number.
Verifying the fix
She fixed the check and ran it again, and the result was the same 12 citations, one patent and 11 papers. That did not mean the fix did nothing. This patent's real split genuinely is one patent citation and 11 academic papers, which she verified by hand against every line of raw text. The fix was correct and simply did not change this particular patent's answer. The video makes clear that a bug can exist even when the output looks right, which is why checking by hand against the raw lines matters.
Key takeaways
- The Lineage Agent traces a patent's citation lineage, as a companion to the Claims Agent.
- Checking a schema is free, so check what a field really contains before writing code.
- The citation field holds a publication number, application number, free text, type, category and filing date.
- Backward citations come from data already on the row; forward citations need a likely expensive search across other patents.
- BigQuery returns empty strings, not None, for missing fields on this table, so a missing-value check passed every citation.
- A fix can be correct even when it leaves the answer unchanged, and hand-checking against raw text confirms it.
Try it yourself
Before relying on a field's absence to mean something in your own pipeline, look at what an empty value actually looks like in real output. A missing value and an empty string are not automatically the same, and assuming they are can let a bug through unnoticed.
Chapters
Full transcript(auto-generated, with timestamps)
Introduction
[0:00]Hi, I'm Aishwarya from the Mycroft team. This video covers the real start of the second agent, the one that traces a patent citation lineage, not just its claims. 12 real citations on one patent.
The Real Numbers
[0:13]The summary said one patent, 11 papers. The summary was right, but only after a real bug got caught first. Method:
Checking the Schema
[0:21]Before writing anything, check what's actually there. The citation field is a real repeated record, publication number, application number, free text for non-patent literature, a type, a category, a filing date. Free to look at. No query cost to check a schema. Two directions exist, backward, what a
Scoping It Honestly
[0:41]Patent sites, and forward, who sites it back. Backward is a field on the row already being pulled. Forward means searching every other patent citations for this one's number, a different, untested, likely expensive query. Backward first. The first real test ran
The Real Bug
[0:58]Clean, 12 citations parsed, one patent, 11 papers. But the field that was supposed to say this is non-patent literature wasn't checking for empty text. It was checking for missing text. On this table, missing text isn't missing, it's an empty string. Every single citation was passing that check, whether it had a real patent number or not. Fixed the check, reran it. Same 12,
Verifying the Fix
[1:24]Same one, same 11. Not because the fix did nothing, because this patent's real split genuinely was one patent citation and 11 real academic papers, verified by hand against every single line of raw text. The fix was correct. It just didn't change this particular patent's answer. Your turn. Before trusting a
Your Turn: Check What "Empty" Means
[1:44]Field's absence to mean anything, check what an empty value actually looks like in real output. A missing string and an empty string are not automatically the same thing, and assuming they are can pass a bug through completely unnoticed,
Outro
[1:59]Starting the lineage agent built with Claude for humanitarian's AI.
More from Mycroft Financial AI
4:18Mycroft: From Reading the Past to Forecasting the Future
1:52Mycroft Update: Broadening the Test
6:13Routing LLM Requests Without Rule Contradictions: The Mycroft Router
2:37Mycroft: Reading the Claims
3:48Mycroft: An Open Source Educational Experiment Using AI to Invest in AI | Building to Learn
2:16