Inspiration
A part goes end-of-life, a distributor runs out, or a tariff changes the math, and an engineer has to swap a component on a finished board. Cross-reference tools make this look easy, but they match on package and headline current. So they approve parts that fail on the real board.
One example drove the project. A 40 V Schottky diode sits on a 24 V input that can reach 32 V. Candidates with the same package and current rating include 20 V and 30 V parts, and a basic cross-reference approves them. Nothing warns you until the board is back from the fab.
We wanted an agent that doesn't just find a replacement but checks it against the datasheet and the circuit it goes into, and shows its work. We built it around NVIDIA Nemotron and demo a switch to Diodes Incorporated parts.
What it does
PartSwap takes a BOM and a short design context: input voltage range, temperature range, and preferred manufacturer. For each line it returns one verdict:
| Verdict | Meaning |
|---|---|
drop_in |
Safe to swap |
drop_in_with_caveats |
Works, with specific differences to review |
needs_redesign |
Pinout or package problem |
no_safe_match |
Nothing safe, or a critical spec is unknown |
The UI shows a results table, a side-by-side spec comparison with datasheet page links, the candidates the agent rejected and why, and a live reasoning trace. It exports a new BOM and a risk report.
On our demo BOM, the Schottky line recommends a safe Diodes part and shows two rejected candidates that a basic cross-reference would have approved. The LDO line shows two Diodes AP7333 variants. One is pin-compatible with the original but draws far more quiescent current. The other has its input and ground pins swapped.
How we built it
Stack: FastAPI and Pydantic on the backend, React, TypeScript and Vite on the frontend, and the openai Python package pointed at NVIDIA's OpenAI-compatible API. Results stream to the browser over server-sent events. There is no database.
Python owns the numbers; Nemotron owns the judgment. Python converts units, runs every pass/fail check, compares package and pinout, and computes a verdict floor. The model chooses which candidates to investigate, reads the test condition behind each number and the datasheet excerpts, and writes the explanation. The model can only tighten a verdict, never loosen it. The record keeps the model's original answer, so every override is visible.
A typical check is a rating margin. For a part with reverse voltage rating $V_{RRM}$ on a rail that peaks at $V_{in,\max}$:
$$ V_{RRM,\text{candidate}} \ge V_{in,\max} $$
and for an LDO, the dropout must fit in the headroom the design leaves:
$$ V_{DO,\text{candidate}} \le V_{in} - V_{out} $$
The agent runs a tool loop with seven tools: get_bom_line, get_part_specs, search_candidates, get_datasheet_excerpt, compare_specs, check_package_pinout and record_decision. The comparison tool reloads specs from disk and ignores any numbers the model passes in. The search tool does no electrical filtering on purpose, because filtering would hide the traps.
Models: Nemotron 3.5 Super decides each line (reasoning and tool calling). Nemotron 3.5 Bolt structures datasheet text into provisional specs. Nemotron Parse reads datasheet page images.
Four run modes share one event format: fixture replays a recorded file, deterministic runs the real pipeline with no model, cache replays cached live runs, and live calls Nemotron and falls back to deterministic on failure.
Data: a pre-downloaded local datasheet set, with critical specs verified by hand against the PDFs. Nothing is scraped during the demo.
Process: we wrote the interface contract first (field names, event shapes, tool signatures), split the work into lanes with separate files, and tested the comparison logic, unit handling and agent loop against a scripted fake client.
Challenges we ran into
- Showing the trap. If the catalog holds a correct part, the agent just recommends it and the failing candidate never appears. We record every rejected candidate with its reason and whether a basic cross-reference would have approved it.
- Unknown specs. A missing critical value could quietly become "probably fine". Unknown critical specs now mean
no_safe_match. - A deprecated model. The model ID in our brief returned HTTP 410. A probe script for model IDs and tool calling found the working replacement before we depended on it.
- Pin numbers aren't portable. Even two suffixes of one Diodes part (SOT-23 and SOT-23R) assign pins differently, so pin functions come from the datasheet page.
- Extraction accuracy. Our first extraction run over seven datasheets matched 25 critical fields, mismatched 10 and missed 16. It picked a typical dropout value where we needed the maximum. Extracted values stay provisional and are never used as verified data.
- Reliability on stage. Live APIs are rate-limited and shared, so the demo has replay modes and a fallback path.
- A fixed deadline with a parallel team. Writing the contracts down first meant four people could code at once without waiting on each other.
Accomplishments that we're proud of
- A working end-to-end pipeline: upload a BOM, watch the agent investigate each line, and read a verdict with the evidence behind it.
- The agent shows what it rejected, not just what it picked, including the swaps a basic cross-reference would have approved.
- A guardrail that holds: the model can't loosen a verdict, and every override is recorded.
- A live Nemotron run on the demo's Schottky line. It took five tool-calling turns and about 22 s, recommended the safe Diodes part and rejected both traps.
- A demo that survives a flaky network, through four run modes with the same event format.
What we learned
- Don't let the LLM do the arithmetic. Letting the model read and compare numbers invites confident mistakes. Reasoning over verified numbers gave us better explanations and fewer errors.
- Check model catalogs early. The cheapest hour we spent was the one that probed which model IDs actually work.
- An evaluation needs a design that can fail. Our first plan had a guardrail that made the model unable to differ from the rules. We added cases where every number passes but a test condition or excerpt shows the part is wrong, and we record the model's verdict before the guardrail.
- Models tell you what to change. On the first live line, the model recommended
drop_inwhile listing a caveat about leakage current specified only at 25 °C on a board that runs to 85 °C. We changed the prompt to ask for a stricter verdict in that case.
What's next for PartSwap
- Add more manufacturers. Since it's purely a data change, this is mostly about building a larger datasheet library.
- A power tree assistant that designs a board's whole power system, not just individual swaps.
- Compliance checks (RoHS, REACH) on every suggested replacement.
- Tracking which other products use a part, so one change shows its full impact.