Operations teams need fast answers on delivery, stock and suppliers from transactional data.
Approach
Ten business questions answered in SQL on two years of simulated distributor data: CTEs, window functions, ABC-XYZ and a supplier root-cause check, with a read-only SQL playground.
Supply Chain SQL Analytics: Specification
Input
Two years of synthetic distributor data
Engine
DuckDB, one SQL query per business question
Model's role
None: plain SQL
Output
Charts, result tables and a read-only SQL playground
Tests
19 test functions (pytest), CI on main and pull requests
Standalone scripts in this repo, aimed at the same problems as the projects above, run on purchasing terms published by five OEMs, the official ZUGFeRD and XRechnung test corpora, and EU public award notices. Rule-based, with no language model, so the same input gives the same output.
6 purchasing terms · 115 pages · total parse
6.7 s
ZUGFeRD invoice · median, printed-text extraction
37 ms
XRechnung file · median, arithmetic checks
0.47 ms
Rule-based benchmark runs, the same figures as BENCHMARKS.md. The runtimes on the project sheets are the live demos, which call a model.
[Contract Auditor] Rule-based benchmark
6 public purchasing terms, 115 pages
5 OEMs. Each clause keeps its page and section. Checked against an example supplier policy: Net 30, 24 months warranty, EXW or FCA.
Clauses extracted from public OEM purchasing terms, with page and section citations
Document
Payment
Warranty
Default Incoterm
Spare parts
Parse
SiemensGeneral Conditions of Purchase, status 2025-10-01Spain · 5 pp.
Net 60 · 3% in 14 d Deviationp.2 · §5.1
36 months Deviationp.2 · §7.7
DDP Deviationp.1 · §4.1
—
930 ms
BoschTerms and Conditions of Purchase (Germany, English)Germany · 5 pp.
Net 30 p.1 · §7
36 months Deviationp.2 · §9.6
FCA p.1 · §6
—
661 ms
BMWInternational Terms and Conditions for the Purchase of Production Materials (IPC), version 2022-12-01Germany (international terms) · 21 pp. · saved by hand (site blocks scripts) sha256 1dca9e82ec2f…
Set per supply contract Reviewp.7 · §7.5
Up to 60 months Deviationp.11 · §10.2
FCA p.6 · §5
15 years p.14 · §14.1
1,538 ms
Mercedes-BenzMercedes-Benz Special Terms (MBST) 2025Germany · 75 pp.
Not stated
Not stated
Not stated
15 years p.10 · MBST 34/10 · §5
2,106 ms
Mercedes-BenzAllgemeine Einkaufsbedingungen, Stand 10/26Germany · 3 pp.
Not stated
Statutory period Reviewp.1 · §11
Not stated
—
525 ms
ZEISSTerms & Conditions of Purchase V2.1.1United States · 6 pp.
Net 45 Deviationp.1 · §9
12 months p.1 · §11
Not stated
—
921 ms
6 deviations from Net 30 / 24 mo / EXW/FCA
Siemens Net 60 vs baseline Net 30
Siemens 36 months vs baseline 24
Siemens DDP vs accepted EXW, FCA
Bosch 36 months vs baseline 24
BMW up to 60 months vs baseline 24
ZEISS Net 45 vs baseline Net 30
[Invoice Pipeline] Rule-based benchmark
30 hybrid invoices, 66 XRechnung files
The printed page is read with label rules; the XML embedded in the same PDF is the ground truth.
The first rule set scored 89.3% (134 of 150 fields). The rules were then fixed while looking at the same 30 files, so 98.7% is not a held-out score. The remaining misses are kept:
Mustangproject__MustangGnuaccountingBeispielRE-20201121_508_withBOM.pdfinvoice_id: XML RE-20201121/508, printed page RE-20190610/507. Upstream mismatch: the corpus PDF prints a different invoice number than its own XML.
intarsys__zugferd_2p0_EN16931_Rechnungskorrektur.pdftax_total: XML -1.12, printed page 1.12. Layout miss: the minus sign of this credit note sits on another line.
Deterministic checks only. No language model is involved in this benchmark.
[Spend analytics] Rule-based benchmark
100 German award notices on TED
Electrical equipment (CPV 31), transport (34) and industrial machinery (42), published 2026-12-01 to 2026-12-04: a snapshot of the latest notices, out of 47,424 matching.
Awarded · 51 of 100 notices publish a value
€92.4M
Value held by the 10 largest awards
83.8%
Buyer concentration (HHI) · 82 buyers
1,467
Awarded value by CPV division
CPV 31 Electrical machinery and equipment
€3,283,1275/12 priced
CPV 34 Transport equipment
€78,893,57633/71 priced
CPV 42 Industrial machinery
€10,235,85613/17 priced
Top buyers by share of awarded value
DB Regio AG (Bukr 12)
27.1%
Hamburger Energienetze GmbH
21.6%
Busservice Watzinger GmbH & Co. KG
9%
Vestische Straßenbahnen GmbH
8.3%
GfA A.d.ö.R
8.2%
49 notices publish no value. They are counted, not estimated.
Benchmarked deterministically on publicly published industrial purchasing terms (6 documents from 5 OEMs, 115 pages), official ZUGFeRD / KoSIT XRechnung test corpora, and EU TED public award notices. Zero proprietary or confidential data. No logos, no client relationships implied. BENCHMARKS.md ↗ (opens in a new tab)
[Measured runtimes]
Measured runtimes.
Two execution paths: the live demos, which call a language model where noted, and the rule-based benchmark scripts on public documents.
Measured runtimes: live demos and rule-based benchmarks
Measured runtime
Task & scope
Execution path
2.3 s
Contract Auditor (live demo)Extract and policy-check a one-page vendor contract.
Contract Auditor (public corpus)Parse 6 public OEM purchasing terms (115 pages) with clause citations.
Deterministic rules only · no LLM
37 msmedian · p95 47.2 ms
Invoice Pipeline (public corpus)Printed-text extraction checked against the embedded XML across 30 ZUGFeRD PDFs.
Deterministic rules only · no LLM
0.47 msmedian per file
XRechnung checks (public corpus)198 arithmetic checks across 66 KoSIT UBL/CII XML files.
Deterministic rules only · no LLM
19.2 s0.2 s math + 19.0 s briefing
Supply Chain Optimizer (live demo)Shortage and reorder math plus a written procurement plan.
pandas + CrewAI · measured 2026-12-02
0.34 s
Supply Chain SQL Analytics (live demo)Run ten operational SQL queries on two years of simulated data.
DuckDB SQL · no LLM · measured 2026-12-02
Every runtime above is measured directly—no assumed manual baselines. Reviewing outputs still takes a person.
[Shortage simulator] Interactive model
What happens when demand or delivery time changes?
A simplified version of the shortage check in the Supply Chain Optimizer. The reorder point is fixed in advance. Move the sliders to see when real demand or a slower delivery outruns it.
With 13 units a day and a 9-day lead time, stock runs out 3 times in 60 days, for about 3 days in total, first on day 19. About 40 units of demand go unmet.
Sample model over 60 days: 260 units at the start, 240 units per order, and a reorder point of 100 units (planned for 10 units a day and a 7-day lead time, plus 30 units of safety stock). Demand that cannot be met is lost.
Illustrative sample data, not a real result
Stock level
Reorder point
Shortage
Stockouts
3
Days short
3
Units unmet
40
Lowest stock
0
Use the left and right arrow keys to read the stock level day by day.
Show the numbers
Stock level every 5 days for the current settings (sample data)
Day
Units in stock
Status
0
260
In stock
5
195
In stock
10
130
In stock
15
65
In stock
20
0
Shortage
25
193
In stock
30
128
In stock
35
63
In stock
40
0
Shortage
45
191
In stock
50
126
In stock
55
61
In stock
60
0
In stock
[Race bike] Interactive model
A race bike, part by part.
I like motorcycles, and a race bike is also a good picture of the work: every part is one line in a bill of materials, with a supplier, a lead time and a reorder point. Scroll to take one apart.
Illustrative model, not a real motorcycle
01 / 10
MC-310Seat and tail unitLead time 21 days · Reorder point 4
Bill of materialsQty
MC-310Seat and tail unit1
MC-320Fairing and aero wings1
MC-220Fuel tank1
MC-410Clip-on bars and levers2
MC-420Front fork2
MC-130Exhaust system1
MC-510Drive chain and sprockets1
MC-110Engine, V41
MC-610Wheels, tyres and brake discs2
MC-010Frame and swingarm1
Bill of materials for the illustrative race bike (supplier, lead time and reorder point are sample values)
Code
Part
Qty
Supplier
Lead time
Reorder point
MC-310
Seat and tail unit
1
Supplier A
21 days
4 units
MC-320
Fairing and aero wings
1
Supplier B
35 days
3 units
MC-220
Fuel tank
1
Supplier A
28 days
3 units
MC-410
Clip-on bars and levers
2
Supplier C
14 days
10 units
MC-420
Front fork
2
Supplier D
42 days
4 units
MC-130
Exhaust system
1
Supplier E
30 days
3 units
MC-510
Drive chain and sprockets
1
Supplier C
10 days
12 units
MC-110
Engine, V4
1
Supplier F
56 days
2 units
MC-610
Wheels, tyres and brake discs
2
Supplier G
24 days
8 units
MC-010
Frame and swingarm
1
Supplier H
63 days
2 units
[Approach]
How I build
The model extracts, code decides. Every decision path is plain Python that can be unit tested.
Extractors sit behind an interface, so tests run on fakes with no network and no API key.
Strict typing, linting and CI on every project.
[Visual studies]
VS-01CALAD-1Concept site & motion studyConceptual aerospace site for a fictional unmanned Mach-5+ near-space airframe designed for the 80,000–150,000 ft ignorosphere—detailing passive avionics, dual-mode scramjet propulsion, and flight-envelope specs around an 80-frame scroll-scrubbed 180° orbit.Link soon
[Contact]
Send a message to Insan.SendamessagetoInsan.
Industrial engineering student, currently on exchange in Korea. Looking for a six-month internship in Germany from spring 2027, in Augsburg, Munich or Stuttgart.