# Photonium > Photonium builds AI for optical design. Its software, Photonium Insight, takes a written spec, a patent PDF, or an existing .ZMX file to a finished, toleranced design, with agents that run analysis, optimization, and tolerancing alongside the tools optical teams already use (Zemax OpticStudio, CODE V, CAD, and custom integrations). Photonium also builds custom automation for a team's own optical workflow, and offers consulting from senior optical engineers, supercharged by AI. Backed by Y Combinator and a member of the NVIDIA Inception Program. Photonium is also known as Photonium Optics. In Photonium's engineering work, automation explores configurations and optimizes workflows, but all design choices undergo expert review. ## Products and services - [Photonium Insight](https://photonium.ai/#insight): AI optical design software. One environment for the entire design loop, from spec or design file to a working, toleranced design. - [Custom automation](https://photonium.ai/#how): Photonium builds the tooling for a team's exact optical workflow, inside the tools the team already uses. - [Consulting](https://photonium.ai/#consulting): senior optical engineers for concept, design, tolerancing, and factory handoff. ## Photonium Insight capabilities - Chat-driven design environment: the agents write and run the scripts, execute the analyses and optimization, and propose design changes, which are applied once the engineer approves them. - Inputs: a .ZMX file, a written spec, or a patent PDF. - Analysis on request: ray trace, spot diagram and RMS wavefront error, MTF, PSF, Seidel coefficients, RMS vs. field. - Optimization and tolerancing: merit functions, Monte Carlo tolerancing, compensators, as-built analysis. - Outputs: native .ZMX export, analysis results, and tolerance results. - Also: design generation from a spec, a searchable patent prescription database, stock lens catalog search, and ISO 10110 fabrication drawings. - Integrations: Zemax OpticStudio, CODE V, CAD, and custom integrations. - Self-improving optics knowledge drawn from patents, spec sheets, and prior designs. - Versioning, live collaboration on shared projects, and full observability and control over what the agents do. ## Who Photonium works with - Applications: satellites, machine vision, AR/VR, flow cytometry, quantum computing, UV lighting, and consumer electronics. - Industries: quantum computing, automotive, semiconductor, aerospace and defence, life sciences, and consumer electronics. - Engineers from Meta, Google, Apple, KLA, and Applied Materials. - Team from Harvard, Stanford, MIT, the University of Arizona, Jane Street, and QuEra. - Advisors: Philip Johnston (founder and CEO, Starcloud), Prof. Lambertus Hesselink (Stanford), Prof. Sitan Chen (Harvard), Prof. Ioannis Gkioulekas (CMU). ## Engineering blog Each post is also available as Markdown at the same address with `.md` appended, and all of them together, after this file, at https://photonium.ai/llms-full.txt. - [Engineering blog](https://photonium.ai/research): engineering notes from the Photonium team on optical design, lens engineering, and applying AI to optical workflows. - [Introducing the Photonium Patent Corpus: 13,091 imaging lenses from US patents](https://photonium.ai/research/the-photonium-patent-corpus): June 2026 research release. 13,091 imaging-lens prescriptions extracted from 2,239 US patents (72% from 2015 onwards), each cross-checked against its source patent, raytraced, and delivered as Zemax and Optiland files. Spans EFLs from 0.09 mm to 1,334 mm, f/0.9 to f/71, and half fields of view from under 1° to 110°. - [From 69% to 97% accuracy: engineering an LLM to diagnose optical aberrations](https://photonium.ai/research/engineering-llm-for-optical-diagnosis): May 2026 deep-dive by Adam Mhatre. How Photonium's Optical Mental Model names the limiting aberration of a lens from ray fans, OPD, MTF, and Seidel terms with 97% accuracy, against about 69% for Claude Opus 4.7 on its own. ## Company - Website: https://photonium.ai/ - Founders: Jennifer Song (co-founder and CEO), Adam Mhatre (co-founder and CTO) - Contact: founders@photonium.ai - Book a demo, a consulting call, or apply for a role: https://photonium.ai/#contact - Careers: hiring founding machine-learning engineers, software engineers, and optical engineers and consultants, https://photonium.ai/#join - LinkedIn: https://www.linkedin.com/company/photonium-optics - Y Combinator: https://www.ycombinator.com/companies/photonium ## Optional - [Optiland vs Zemax: an engine cross-check](https://photonium.ai/research/the-photonium-patent-corpus/engine-comparison.html): companion to the patent corpus. A Cooke triplet, a smartphone lens, and a 106° wide-angle lens traced in both engines; ray fans agree to a few hundredths of a micron. --- # Introducing the Photonium Patent Corpus: 13,091 imaging lenses from US patents Imaging-lens prescriptions from US patents, raytrace-checked and delivered as Zemax and Optiland files. by **Photonium** · June 2026 · v1.0.0 Modern lens design differs drastically from traditional textbook methods, and almost all of this innovation happens within closed-source companies. The only public window into these designs is unstructured patent data. In the past, attempts have been made at curating this data into usable databases, with the most comprehensive database LensView holding over 30,000 classic optical designs; however, it has not been updated in years. Other available databases are far smaller: lens-designs.com offers ~1,600 design files mined from patents and textbooks, and sample libraries shipped with optical-design software have similar amounts. The Photonium Patent Corpus addresses this gap. We extracted 13,091 imaging lens prescriptions from 2,239 US patents, with 72% from 2015 onwards, creating a window into modern lens design rather than the classical forms that dominate prior datasets. Every design is cross-checked against its source patent and independently raytraced, allowing it to serve as a starting point for optimization, a reference for design-space benchmarking, or training data for machine-learning approaches to lens design. ## The corpus The corpus spans sub-millimeter scale (smartphone) to over a meter of focal length (long telephoto), with EFLs from 0.09 mm to 1,334 mm, f-numbers from f/0.9 through f/71, and HFOVs from under 1° to 110°, with a large concentration around smartphone lenses. Aspheric complexity spans the full range, from purely spherical heritage designs to modern smartphone forms with even aspheric coefficients up to r^40 and odd aspheres up to r^19. ![Composition of the dataset by patent application and embodiments per patent](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q1_scale_composition.png) *Figure:* Application composition and embodiment density. Smartphone main cameras lead at ~46%, with consumer photographic (DSLR/mirrorless) lenses and smartphone telephoto/ultrawide/periscope variants making up the rest. Most patents contain 5 or fewer embodiments; a long tail goes to 15+. ![Camera EFL histogram](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q3_efl.png) ![Camera F/# histogram](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q3_fno.png) ![Camera HFOV histogram](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q3_hfov.png) *Figure:* EFL, F/#, and HFOV across the camera corpus. EFL ranges from 0.09 mm specialty optics through the 3–6 mm smartphone-main peak (median 4.4 mm) to a long-telephoto tail reaching 1,334 mm. F/# spans f/0.9 through the f/1.4–2.4 smartphone cluster (median f/2.3) to the slow camera-lens end, with a tail of endoscope designs continuing up to f/71. HFOV runs from under 1° at the long-telephoto end (median 38°) to 110° at the extreme fisheye end. ![F/# vs HFOV hexbin](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q3a_fno_vs_hfov.png) *Figure:* F/# vs HFOV. The dense cluster at f/1.4–2.4 / 30–50° is the smartphone main + ultrawide region; the looser cloud at f/2.8–5.6 / narrower fields is consumer photographic and telephoto. ![Glass elements per design](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q3b_elements.png) ![Total surfaces per design](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q3b_surfaces.png) ![Aspheric surfaces per design](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q3b_aspherics.png) *Figure:* Design complexity: median 8 glass elements and 18 surfaces (including stop and image); 95.2% of designs carry at least one aspheric surface. The aspheric distribution is bimodal: heritage spherical designs at 0 aspherics, modern smartphone designs at 10–16+. ![Top 15 company families in the corpus](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q5_company_family.png) *Figure:* Top 15 company families by design count. Largan Precision dominates at 4,140 designs, followed by Olympus (2,762), AAC Optics, Canon, and Sunny Optical. The corpus skews heavily toward smartphone-camera lens specialists, reflecting how much of the last decade's patent volume has come from that segment. ![Patent issue year distribution](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q5_year_distribution.png) *Figure:* Issue-year distribution. The corpus is concentrated in the last decade of filings, with a long tail back to 1981 for older photographic-lens patents. ## Patent fidelity Published patent prescriptions often contain errors: errors that a reader can skim past but that a raytrace cannot. A good design raytraces well; a design that doesn't raytrace well points to transcription errors. These errors take many forms: missing digits or decimal points, wrong coefficients and exponents, missing negative signs, and miscopied transcriptions, all of which cause focus to be lost and RMS spots to blow up. When an error is recoverable, either via sister-patent comparison or manual analysis, we apply the proposed correction and then keep the design if it raytraces well. To validate the fidelity of each design, we raytrace them via a custom fork of [Optiland](https://github.com/HarrisonKramer/optiland). We first benchmarked this engine against Zemax OpticStudio: tracing the identical pupil through both engines, Optiland reproduces Zemax's RMS spot size vs field and its ray fans on well-corrected designs (see the [engine cross-check](https://photonium.ai/research/the-photonium-patent-corpus/engine-comparison.html) for details). Then, we raytraced every design we extracted, surfacing a range of typos in the patents themselves, most of which we could manually fix: ![Conic mantissa with no decimal point, a 7-digit integer with the exponent](https://photonium.ai/research/the-photonium-patent-corpus/assets/patent_errors/trace_collapse_decimal_US-11092776-B2_e3.png) Missing decimal US-11092776-B2 ex3. A conic coefficient claims to be a 7-digit integer, when in reality a decimal point is missing. ![Conic value with an exponent printed at +50](https://photonium.ai/research/the-photonium-patent-corpus/assets/patent_errors/01_decade_exp_conic_US-9726860-B2_e3.png) Extreme exponent US-9726860-B2 ex3. The conic coefficient on surface 7 has a 10^50 exponent, which is clearly wrong; 10^00 is right. ![Aspheric surface header reads 2 3 4 6 6 7, surface 5 mislabeled as 6](https://photonium.ai/research/the-photonium-patent-corpus/assets/patent_errors/surface_seq_US-10254513-B2_e3.png) Incorrect surface numbering US-10254513-B2 ex3. The aspheric block's *Surface #* header reads `2 3 4 6 6 7`: surface 5 has been mislabeled as 6, duplicating its neighbor. ![Conic published as +90 instead of −90](https://photonium.ai/research/the-photonium-patent-corpus/assets/patent_errors/conic_sign_US-12360347-B2_e7.png) Wrong-sign conic US-12360347-B2 ex7. A conic is published as +90, where four identical-geometry family-twin patents publish -90. ![A10 coefficient with the sign opposite the sister embodiment's](https://photonium.ai/research/the-photonium-patent-corpus/assets/patent_errors/04_sign_flip_US-11885939-B2_e6.png) Coefficient sign flip US-11885939-B2 ex6. The A10 coefficient on surface 6 has the wrong sign and should be negative. ![A14 coefficient with an exponent one decade off the family's](https://photonium.ai/research/the-photonium-patent-corpus/assets/patent_errors/a14_decade_US-9547154-B2_e3.png) Exponent error US-9547154-B2 ex3. The A14 coefficient on surface 2 should have an exponent of 10^1, not 10^0. ![Single mantissa digit differs from the family-twin patent's](https://photonium.ai/research/the-photonium-patent-corpus/assets/patent_errors/09_wrong_digit_US-10444475-B2_e6.png) Wrong digit US-10444475-B2 ex6. A single digit is wrong in the A8 coefficient of surface 3: it should read 1.5744, not 1.6744. We caught this by finding a family-twin patent which has the same prescription except this field, and traces an order of magnitude tighter. ![A14 row at surfaces 9/10 highlighted in red; the same two values appear verbatim in the conic row, highlighted in blue](https://photonium.ai/research/the-photonium-patent-corpus/assets/patent_errors/unrecoverable_row_blanked_US-9523841-B1_e2.png) Aspheric coefficients corrupted US-9523841-B1 ex2. The A14 cells at surfaces 9 and 10 are 6 orders of magnitude higher than other aspheric coefficients, and match the conic coefficients exactly. The real coefficients are not in the patent. *Figure:* Patent transcription errors found via raytrace. We then evaluate each prescription on the RMS spot size of every field. Unfortunately, many patents do not provide clear apertures or vignetting coefficients; thus, we trace every design at full field across the entire pupil and record how much is actually vignetted. As expected, the more extreme the field the more extreme the vignetting, so the outermost fields of fast wide lenses pass only a fraction of the pupil: ![Fields traced and vignetting composition per field](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q2b_ray_census.png) *Figure:* Fields traced per design (left) and vignetting composition by field (right). Most designs trace every sampled field; the rest vignette at the outermost fields, which marks the working-FOV cutoff. The vignetting composition climbs from axial (mostly <5%) to the edge field (often ≥50% for fast/wide lenses). A design only ships if its inner fields (on-axis through mid-field) hold robust RMS under 50 µm with at least 100 of 127 rays surviving (so every shipped design is sharp), while the un-gated outer fields preserve the faithful soft corners of fast/wide lenses. Further, of the rays that *do* survive the trace, a small number can still distort the result. With the prevalence of highly sensitive aspherics, rays at the edge of the pupil can refract millimeters away from the rest of the bundle, causing traditional RMS metrics to report inflated values. In a real lens these grazing edge rays would most likely be vignetted away by the system's mechanical apertures, which patents rarely specify. To provide a clearer picture of the actual lens' performance, we instead use a robust version of RMS spot size, filtering out stray outlier rays to reflect the actual convergence at the image plane and allowing us to report a more honest performance metric: ![Spot diagram: 115 rays converge to a 1.7 micron core while 2 grazing strays inflate the raw RMS to 53 microns](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q2c_stray_ray_spot.png) *Figure:* One field of US-9599792-B2 ex2 traced at full aperture over the sunflower-127 pupil, with the core magnified at right. 127 rays are launched; 117 reach the image. 115 land in a 1.7 µm core, while two rays graze the aperture boundary and land 501 and 279 µm out (left), dragging the mean-centroid RMS to 53 µm. The robust metric rejects those two strays and reports the 1.7 µm spot the lens actually forms. ![Raw RMS vs robust RMS scatter](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q2_raw_vs_robust.png) *Figure:* Raw RMS vs robust RMS across the corpus. Points above the diagonal are designs where stray rays inflate the raw metric: the median raw/robust inflation is 1.68× at each design's worst field. The two agree on designs that are genuinely soft and diverge where stray rays would otherwise make a good design look bad. ## Raytrace results We trace every design at the F/d/C wavelengths over fields evenly spaced from on-axis out to the stated maximum HFOV, with 127 rays per field over a sunflower distribution. On-axis, the median design sits well inside the diffraction limit (median RMS/Airy 0.46), with 78.4% of designs at or below the Airy radius and 93.9% under 5 µm of absolute spot. As expected, the faster the design, the farther it is from the diffraction limit. ![On-axis RMS / Airy by F/# class](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q4_rms_over_airy_by_fno.png) *Figure:* On-axis RMS normalized by Airy radius, broken out by F/# class. Sharpness drops toward the corner. The median on-axis RMS is 0.83 µm, while the median full-aperture worst-field robust RMS is 2.45 µm, and the softest fast/wide designs run into the hundreds of microns at the extreme corner. The per-field median climbs several-fold from axis to edge, with the soft tail reaching those extremes. ![Robust spot radius distribution per field](https://photonium.ai/research/the-photonium-patent-corpus/assets/charts/q4b_spot_vs_field.png) *Figure:* Best-of-λ robust RMS spot radius distribution by sampled field, log scale. ## What's in the corpus Each design is delivered as a matched pair of files, alongside a single manifest that indexes the whole corpus: - a **Zemax `.zmx`** prescription that opens directly in OpticStudio, or any tool that reads the ZMX format; - an **Optiland `.json`** that loads into the open-source [Optiland](https://github.com/HarrisonKramer/optiland) engine via `Optic.from_dict()`, ready to trace, analyze, or optimize in Python; - one row in the **corpus manifest** (provided as both `.csv` and `.json`) carrying metadata including provenance, optical specs, and raytrace results. Below are cross-sections from six designs in the corpus, chosen to span the corpus's diversity in both form and performance. ![sample design](https://photonium.ai/research/the-photonium-patent-corpus/assets/gallery/US-11340432-B2_emb2.svg) US-11340432-B2 ex2 · 3.8 mm f/1.7 best-λ RMS by field, axial→edge (µm)0.6 · 0.8 · 1.0 · 1.0 · 0.9  *(5/8 fields imaged)* ![sample design](https://photonium.ai/research/the-photonium-patent-corpus/assets/gallery/US-10185125-B2_emb11.svg) US-10185125-B2 ex11 · 3.1 mm f/2.0 best-λ RMS by field, axial→edge (µm)0.8 · 0.9 · 0.9 · 1.1 · 1.0 · 1.2 · 1.5 · 1.7 ![sample design](https://photonium.ai/research/the-photonium-patent-corpus/assets/gallery/US-8335043-B2_emb9.svg) US-8335043-B2 ex9 · 6.5 mm f/2.8 best-λ RMS by field, axial→edge (µm)0.5 · 4.9 · 2.5 · 3.9 · 4.5 · 4.6 · 4.1 · 2.7 ![sample design](https://photonium.ai/research/the-photonium-patent-corpus/assets/gallery/US-7508593-B2_emb2.svg) US-7508593-B2 ex1 (mid zoom) · 15.4 mm f/4.0 best-λ RMS by field, axial→edge (µm)0.6 · 1.3 · 1.9 · 1.9 · 1.7 · 2.1 · 3.4 · 9.5 ![sample design](https://photonium.ai/research/the-photonium-patent-corpus/assets/gallery/US-10156700-B2_emb2.svg) US-10156700-B2 ex2 · 5.0 mm f/1.4 best-λ RMS by field, axial→edge (µm)25.0 · 25.3 · 24.7 · 23.2 · 24.4 · 24.0 · 28.9 *(7/8 fields imaged)* ![sample design](https://photonium.ai/research/the-photonium-patent-corpus/assets/gallery/US-9869843-B2_emb6.svg) US-9869843-B2 ex6 · 2.9 mm f/1.8 best-λ RMS by field, axial→edge (µm)0.7 · 0.9 · 1.1 · 1.4 · 1.5 · 1.6 · 0.9 *(7/8 fields imaged)* You can view a full 50-design cross-section [here](https://photonium.ai/research/the-photonium-patent-corpus/lens_drawings/index.html), or download the [50-design sample](https://photonium.ai/research/the-photonium-patent-corpus/assets/downloads/photonium-patent-corpus-sample-50.zip) (matched Zemax `.zmx` + Optiland `.json` files and the manifest). ## Scope and limitations - **Symmetric refractive lenses only.** We only extract designs which contain all-refractive elements, and exclude those with reflective elements, GRIN media, diffractive elements, freeform elements, etc. - **Wavelengths default to the visible range.** We do not parse each patent's stated wavelengths; every design is evaluated at the standard visible F/d/C lines. - **Zoom lenses are extracted as separate embodiments.** Multi-position zoom prescriptions get extracted as a separate json for every given position within the patent itself. - **Other excluded designs.** We drop patent prescriptions we can't parse cleanly as well as designs that fail the raytrace inclusion gate (inner-field and mid-field robust RMS ≥ 50 µm, or significant inner-field vignetting). We also deduplicate all prescriptions that repeat: 6,142 additional designs we extracted from patent text are exact duplicates of 2,790 designs in the corpus. We provide references to all duplicate designs in the manifest. - **Additional errors.** We attempt to either fix or drop all prescriptions which raytrace poorly. However, we do not guarantee that the prescriptions which raytrace well are error-free; some errors can still result in adequate raytraces. - **Patent notice.** This corpus is a collection of patented optical designs drawn from published US patents, many of which remain in force. Anyone using these designs is responsible for confirming their patent status; the corpus is offered as-is. ## Access and licensing Users of the Photonium Insight software now have access to the corpus as part of the lens database. For standalone use, the corpus is also available under license for both academic and commercial use - please fill out the form below to request access and we will get back to you: --- The **Photonium Patent Corpus** is built and maintained by Photonium. Questions or access requests: [founders@photonium.ai](mailto:founders@photonium.ai). Source: https://photonium.ai/research/the-photonium-patent-corpus --- # From 69% to 97% Accuracy: Engineering an LLM to Diagnose Optical Aberrations by **Adam Mhatre** · Photonium · May 2026 ## TL;DR Designing an optical system, like a camera lens or a microscope objective, takes months. Most of that time goes into an iteration loop where you look at the current design, figure out what's wrong, change something, and then figure out what's wrong all over again. In an optical system, "what's wrong" means figuring out the reasons why light is coming out of the system blurrier, more spread out, or more distorted than the idealized model would predict. These effects are called aberrations. Often the hardest part of the iteration loop is figuring out which aberrations are the bottleneck; addressing them is more tractable once the target is clear. If an optical engineer were to task Claude Opus 4.7 with this diagnosis procedure, they can expect to get around **69% accuracy** at identifying which aberrations are the problem. Not only is this accuracy poor, but it's also exacerbated by massive variance, making the output practically useless. To address these weaknesses, I built the Optical Mental Model, which executes diagnosis with **97% accuracy** and dramatically smaller variance. It works by providing the LLM with the structured understanding of optical design that it doesn't learn from training alone. ## Why is aberration diagnosis hard? *Figure:* Fig. 1 Aberration diagnosis is difficult because the goal isn't simply driving these aberrations to zero. Every real lens system has nonzero aberrations and a "good" design effectively balances them against each other to achieve a performance goal. In practice, this means some aberrations are indeed driven to zero, some are left in place to cancel against others, and then some are the true limiting factors holding the design back. With many kinds of aberrations interacting in non-linear ways, an engineer can't just look for the biggest one and drive it to zero. ## Methodology To get a better sense for how Claude Opus 4.7 performs on aberration identification, I analyzed 50 different optical designs hand-curated from popular textbooks. The ground truth is the author's commentary on each design, which cleanly breaks down into three categories: (1) aberrations the author labels as well-corrected, (2) aberrations labeled as residuals, and (3) a ranking of which residual "limits the design." To develop the evaluation corpus, I transcribed the full lens specifications from each textbook into standardized optical prescriptions and translated the author's surrounding commentary into structured rubrics of must-mention and must-not-claim assertions. *Figure:* Fig. 2 · sample evaluation case An important note is that I chose to ignore any aberration the author did not mention by name. In other words, the LLM was not penalized for naming additional non-limiting aberrations or staying silent on them as long as it did not contradict the author's commentary. As our baseline, Claude Opus 4.7 was given the same information an optical engineer would use to diagnose a design by hand. Each of these designs was evaluated 10 times to account for possible variance. The pipeline for each trial was as follows: I pasted the optical prescription (i.e. the numbers that define an optical system) plus an 11-section analysis of the prescription (Seidel, ray fans, OPD, MTF, Zernikes, chromatic shift, etc.) in a single message. I also included a short system prompt explaining the agent's role as an optical aberration diagnoser in order to standardize the response format across rounds. The model's response was then graded with Claude Sonnet 4.6 as a judge. The judge's role was to determine whether the free form response from the diagnoser model hit each of the criteria specified in the evaluation case. Its role was minimal; essentially, it was used as a more powerful regex matcher. To validate the judge, I hand-graded a random sample of its verdicts spanning passing and failing trials across all 50 cases, and the judge's grades agreed with my own reading in every instance. ## Baseline Claude results *Figure:* Fig. 3 · baseline LLM score distribution across 500 trials The baseline model suffers from high variance, with 20 of the 50 cases oscillating between 0 and 100 percent of criteria covered across rounds. When the baseline is wrong, whether consistently on a specific design or randomly across rounds, the wrong-round answers are clustered into two main failure modes. The first failure mode of the baseline is treating the raw magnitude of Seidel/Zernike values as the only analysis metric that matters. In one example, a naive reading of "biggest value = problematic aberration" leads the LLM to name distortion as the limiter when the correct answer is oblique spherical aberration. In another design, the chromatic longitudinal aberration sits well below the λ/14 RMS diffraction-limit threshold (Strehl ≥ 0.8) at −0.042 waves, so the LLM labels axial color as corrected. However, the author explains that axial color is a real chromatic residual that lives in higher orders. The second failure mode of the baseline is naming the right "family" but the wrong specific aberration. For example, in one design the LLM consistently names the secondary spectrum as the dominant residual when the actual issue is spherochromatism. Both of these aberrations belong to the chromatic "family" but the LLM labels secondary spectrum as the limiter rather than higher-order spherochromatism. In another case, the correct answer is "secondary spectrum of lateral color", but the baseline consistently names the secondary spectrum of axial color as the limiter across all 10 rounds instead. The remaining baseline errors are a long tail of one-off failures: sign omissions, cross-section confusions, miscellaneous lookalikes. ## Failure-aware Claude results I spent months exploring various possible versions of strictly system prompt engineering. For example, if I include the two concrete failure modes from above, we would expect the scores of the LLM to increase. However, on average the LLM performs nearly the same. *Figure:* Fig. 4 · failure-aware LLM score distribution across 500 trials At first glance, it seems like the system prompt additions did not affect the results. While that's true for the overall statistics, case-by-case it is not: 105 rounds got better and 113 rounds got worse. After a thorough analysis of each case, we can conclude that the lack of improvement stems from the LLM applying the advice uniformly rather than selectively. On designs whose true limiter was a primary aberration, it would reach instead for a higher-order explanation. On others, it would initially name the correct residual, only to reason itself to conclude a different aberration within the same family. This weakness stems from the central complexity of optical aberration diagnosis: sometimes, one number represents the whole story; other times, numbers interact in subtle ways such that local results cannot be examined in isolation. **An LLM cannot be taught to distinguish these cases from system prompting alone.** ## Building the Optical Mental Model (OMM) To overcome the fundamental limitations of system prompting alone, I built the Optical Mental Model. The OMM combines two layers of engineering: a deterministic layer that pre-processes the analysis output into structured aberration signatures, and a system prompt that scripts the LLM's reasoning workflow. The deterministic layer contains 14 aberration detectors. Each extracts a different signature from the raw analysis data. This data includes Zernike mode coefficients sampled at multiple field points and wavelengths, ray-fan polynomial coefficients (3rd, 5th, 7th order), field-growth slopes of individual modes, wavelength-dispersion slopes, sign reversal patterns, pupil cross-ratios (margin vs 0.707 pupil zone), diffraction-limit-anchored magnitudes (λ/14 RMS, Strehl ≥ 0.8), form-class structural matches, and others. The detectors collectively translate the wall of raw numbers into structured evidence for which named aberrations are present. Then, a downstream model reads the 14 signatures together and outputs which residuals are limiting the design, rather than just listing the output of each detector on its own. *Figure:* Fig. 5 · the Optical Mental Model, end-to-end To make this concrete, I'll dive into the oblique spherical aberration detector. The textbook definition for oblique spherical aberration is a fifth-order field-aperture cross-term, spherical-shape aberration that grows with field angle. The challenge is that at off-axis field points, the wavefront error is a sum of many aberration modes stacked together (e.g., coma, astigmatism, field-grown spherical, and others). Therefore, an engineer can't read oblique spherical off any single number. The detector exploits an orthogonality property of Zernike mode decomposition. At any field point, the wavefront fits onto a sum of orthogonal Zernike modes where Z5/Z6 carry astigmatism, Z7/Z8 carry coma, and Z9 carries spherical. So Z9 cleanly isolates the primary spherical-shape component of the wavefront regardless of other modes. The detector samples Z9 at the on-axis field point (the system's primary spherical baseline) and at the outermost field point, takes the difference, and normalizes it by the λ/14 RMS diffraction-limit floor (Strehl ≥ 0.8). The signal |Z9,off − Z9,on| × 14 is dimensionless. A value of 1 means the field-grown Z9 alone is at the diffraction limit; 10 means an order of magnitude past it. The naive approach to detecting off-axis spherical aberration is taking the ratio of off-axis to on-axis RMS wavefront error. It seems like a reasonable heuristic at first glance, but for oblique spherical, it has two failures. First, it's non-specific in that off-axis RMS growth could come from astigmatism, field curvature, or oblique SA, and the ratio doesn't distinguish them. Second, it's mathematically unstable because when the on-axis RMS is small, the ratio explodes. The Zernike isolation approach addresses both. This describes just one of the 14 detectors. The same naive-vs-robust battle played out for each of the others as well. The takeaway Each detector isolates a different signature, each comes with its own design tradeoffs, and each was cross-checked against textbook commentary across the eval corpus. The months I spent building the OMM were a systematic iteration against the ground truth, often starting from what ended up being a naive approach for each detector and engineering it into a robust algorithm that fires correctly on real failures and stays quiet on corrected cases. ## Optical Mental Model results I added the OMM to Claude Opus 4.7 and ran it through the exact same eval pipeline as the baseline: same judge, same rubric, and same data. *Figure:* Fig. 6 · Optical Mental Model score distribution across 500 trials The Optical Mental Model scores 100s across all 10 rounds on 39 out of 50 cases, with an aggregate accuracy of 97.02% across all 500 case-rounds. Of the 11 cases that aren't perfect, 6 land above 90% on average and miss on just 1-3 rounds, typically due to a wording slip or a close-call ranking judgment. The other 5 average between 70% and 90%, where multiple strong detector signals make the agent's ranking decision noisier and individual rounds occasionally dip below 70%. Those dips come from residual LLM stochasticity still slipping through the OMM's scaffolding, which we'll address in future work. ## How does the Optical Mental Model accelerate optical design? The results presented here are a first measurement, not a final one. The OMM was built by iterating detectors against a hand-crafted textbook corpus, and the next step is to grow its coverage to commercial-grade lenses, broader system classes (reflective, catadioptric, folded, non-rotationally symmetric), plus human-blind grading by working optical engineers. Still, until now, the best use-cases for LLMs in optical design have been writing Zemax macros, API scripts, and refreshing on old textbook optical concepts. Asking an LLM for aberration diagnosis information, let alone design actions, has not been reliable enough to make it worth the effort. But now, the Optical Mental Model offers a verdict reliable enough to use as a real first-pass analysis. Practically, the OMM fits in at the moment when an optical engineer would normally sit down with the ray fans, OPD plots, MTF curves, or Seidel coefficients and figure out what's going wrong with their design. **The OMM produces a diagnosis programmatically, grounded in the same reasoning a senior engineer would apply.** It doesn't replace an optical engineer; rather, it adds a new tool to their toolbelt. ## Conclusion and Future Outlook The Optical Mental Model works because the deterministic analysis happens in code, leaving the LLM only the synthesis of that analysis. While I applied this pattern to aberration diagnosis, it generalizes beyond, such that meaningful AI tools for other engineering domains with strong analytical backbones could benefit from a similar approach. For optics, aberration identification is only the first piece of the puzzle. Next is the design step itself, where I envision the LLM will be able to seamlessly translate its diagnosis into a targeted merit-function modification. --- **Adam Mhatre** is a co-founder at Photonium. If you're working on similar problems or want more detail on the methodology behind this experiment, reach out: [adam@photonium.ai](mailto:adam@photonium.ai) · [LinkedIn](https://www.linkedin.com/in/adam-mhatre/). Source: https://photonium.ai/research/engineering-llm-for-optical-diagnosis --- # Optiland vs Zemax: an engine cross-check by **Photonium** · June 2026 To validate our custom engine, we trace three designs in both engines: a classic Cooke triplet, a modern smartphone lens, and a wide-angle lens with a circular sensor. We use the same tracing methodology as in the rest of the corpus (sunflower-127, median-centroid, 4x-median radius). In all cases, the ray fans match Zemax to a few hundredths of a micron. RMS spots match in most cases - the differences come from two effects: (1) the same pupil coordinate maps to a slightly different real ray in each engine, which can leave the outlier filter trimming a slightly different set of rays, and (2) Optiland vignettes more rays at the far field of the wide-angle lens, causing larger differences there. ## Cooke triplet ![Cooke triplet: lens cross-section, RMS spot vs field, and tangential/sagittal ray fans vs Zemax](https://photonium.ai/research/the-photonium-patent-corpus/assets/optiland_vs_zemax/cooke-triplet_combined.png) *Figure:* Cooke triplet · 50 mm f/5 · HFOV 20.0°. Maximum engine-to-engine deviations: 3.2 % RMS spot, 0.015 µm tangential ray fan, 0.013 µm sagittal ray fan. ## Smartphone camera ![Smartphone corpus design: lens cross-section, RMS spot vs field, and ray fans vs Zemax](https://photonium.ai/research/the-photonium-patent-corpus/assets/optiland_vs_zemax/US-10495850-B2_exp7_v0_combined.png) *Figure:* US-10495850-B2 ex7 · 5.71 mm f/2.32 · HFOV 32.4°. Maximum engine-to-engine deviations: 4.2 % RMS spot, 0.003 µm tangential ray fan, 0.0004 µm sagittal ray fan. ## Wide angle camera Through ~90° every ray survives in both engines and the RMS tracks to ~10 %; past that, Optiland vignettes more of the pupil than Zemax (65 of 127 rays survive at the 106° corner vs all 127 in Zemax), so the corner RMS is computed over different surviving subsets. ![Wide-angle corpus design: lens cross-section, RMS spot vs field, and ray fans vs Zemax](https://photonium.ai/research/the-photonium-patent-corpus/assets/optiland_vs_zemax/US-2018095247-A1_exp3_v0_combined.png) *Figure:* US-2018095247-A1 ex3 · 1.6 mm f/2.03 · HFOV 106°. Engine-to-engine deviations: ≤9.5 % RMS spot through 90°, rising to ~60 % at the single 106° corner field where Optiland vignettes most of the pupil (65 of 127 rays survive vs all 127 in Zemax), so the two engines grade different surviving ray subsets; ray fans match to 0.004 µm. --- A companion to the **Photonium Patent Corpus** release. Source: https://photonium.ai/research/the-photonium-patent-corpus/engine-comparison.html