Regulated and compliance documents
Chain of custody, certificates of analysis, labels and package inserts — documents whose fields exist because a regulator requires them.
A regulated document is easier to extract than an invoice and harder to extract well. Easier, because the field set is not yours to guess: an authority published it, the sections are numbered, the vocabulary is closed, and a supplier who omits a field has a compliance problem rather than a formatting preference. Harder, because that same authority usually specifies how the values are to be presented, and the presentation rules are lossy. A nutrition panel rounds. A calibration laboratory is told not to print the due date. A federal budget form computes indirect cost on a base that excludes half of what is on the page. Extract the numbers faithfully and your own arithmetic check will fail, correctly.
These pages are the document-specific layer. The general machinery — reading order, schema design, per-field confidence, review queues, redaction — has its own pages and is linked rather than restated. What is here is the part that only applies to this document: which body publishes the field list, which field is the join key to something physical, which value is derived and therefore checkable, and the failure that shows up on the second page of a real scan rather than in the specimen the vendor puts in their documentation.
Extracting Structured Fields From a Chain of Custody Form
A custody form is an ordered transfer log, so the extraction is a sequence and the validation is edge continuity between consecutive rows.
9 min read
Extracting Batch and Lot Numbers From a Manufacturing Traveler
Travelers carry a lot lineage rather than a lot number, and an extraction that returns only the final identifier destroys the genealogy a recall has to walk.
9 min read
Extracting Test Results From a Certificate of Analysis Table
The specification column of a CoA is a predicate, not a number, so the table only becomes structured data once each row's spec is parsed into a comparable form.
9 min read
Extracting Calibration Dates From an Equipment Calibration Certificate
A calibration certificate carries at least three different dates, and the one most people want is the one the accreditation rules discourage the laboratory from printing.
9 min read
Extracting Structured Data From a Material Test Report (Mill Certificate)
A mill certificate is two tables of different shapes joined by a heat number, and one of its values is derived, which makes the extraction checkable.
9 min read
Extracting Structured Answers From a Regulatory Compliance Questionnaire
The unit of extraction is a question and its answer bound together, and the binding breaks in a specific, predictable place: the page boundary.
8 min read
Extracting Ingredient Lists From a Food Product Label
An ingredient statement is an ordered, nested structure serialised into one comma-separated string, and both the order and the nesting carry regulatory meaning.
9 min read
Extracting Nutrition Facts Panel Values Into a Structured Record
Build an extractor for the US Nutrition Facts panel that keeps both columns of a dual-column label and validates values against the declaration rules rather than against naive arithmetic.
11 min read
Extracting Structured Fields From a Pharmaceutical Package Insert
US prescribing information has a mandated section order, so anchoring on section numbers beats anchoring on headings — and stops Highlights being mistaken for the real section.
10 min read
Extracting Adverse Event Details From a Pharmacovigilance Report
The reporter, the event and the outcome are three separate fields with different evidentiary weight, and causality assessment is a fourth that must never be merged into the event description.
10 min read
Extracting Structured Data From a Consent Form
Reading what a consent form says and confirming that it was executed are two different extractions, and only the second determines whether the document is worth anything.
9 min read
Extracting Structured Fields From an Intake Form With Mixed Handwriting and Print
On a form where labels are typeset and answers are handwritten, any confidence number averaged over the page is dominated by the half that was never in doubt.
9 min read
Extracting Structured Fields From a Voter Registration Form
The eligibility attestations are checkboxes whose absence is disqualifying, and the set of required fields is a function of the state the applicant selected.
9 min read
Extracting Terms From a Franchise Disclosure Document
The FDD's 23 items are mandated by number, not by wording, and the state addenda at the back silently amend the items in the body.
10 min read
Extracting Structured Data From a Grant Application Form
A federal budget form foots in two directions, which makes the extraction self-checking — provided the indirect cost line is checked against the right base.
10 min read
Extracting Milestones and Budget From a Grant Award Letter
An award notice states a period and a reporting frequency but rarely states the deadlines, so the calendar has to be derived from the dates it does state.
10 min read
Other topics
- LLM fundamentals & architecture
- Tokens, tokenization & context windows
- Prompt engineering
- Reasoning models & test-time compute
- Multimodal AI: vision, audio, video
- RAG & retrieval
- Embeddings & vector search
- AI agents & tool use
- Structured output & function calling
- Fine-tuning & post-training
- Local inference errors, string by string
- Running local models day to day
- Testing code that calls an LLM
- Snapshot and property testing for model output
- Regression suites for prompts
- Eval gates in CI
- Flaky tests against a model
- Determinism and the cost of testing
- Contract and streaming tests
- Testing tool calls and retrieval
- Inference, serving & latency
- Rolling out a prompt change
- Testing AI systems in practice
- Forecasting a time series
- Machine learning on tabular data
- Geospatial data and models
- Understanding audio that is not speech
- Understanding video
- Core computer vision tasks
- Machine learning on graphs
- Point clouds and 3D
- Evaluation, benchmarks & LLM-as-judge
- Sensor and IoT data
- Logs and event streams
- Models over biological sequences
- Machine learning on molecules
- Embedding and searching code
- Extracting invoices and purchase orders
- Receipts, statements and tax forms
- Insurance policies and contracts
- Deeds, court filings and patents
- Extracting from medical records
- Observability & LLMOps
- CVs, certificates and identity documents
- Shipping, customs and technical documents
- Meetings, email, chat and filled-in forms
- Building an extraction pipeline
- Business, property and inspection documents
- Contract clauses and insurance claims
- Consumer, travel and closing documents
- Mapping one chat API onto another
- SDK and framework migrations
- Hallucination & failure modes
- Re-embedding and model deprecation
- Cutting over between providers
- Parity gaps, shims and legacy endpoints
- Moving between model versions
- Migrating vector stores and caches
- Mapping capabilities and parameters
- Migrating pipelines and agents
- Contracts, runbooks and rollback
- Auditing a codebase before a cutover
- Compliance and fine-tune migration
- LLM cost engineering
- Routing, cost tracking and multi-tenancy
- What a migration does to your prompts
- AI security & prompt injection
- Privacy, compliance & data residency
- AI governance, policy & society
- Building reliable AI applications
- AI hardware, GPUs & compute
- Open-weight models & local inference
- AI for developers & coding agents
- AI in industry: vertical playbooks
- AGI, superintelligence, alignment & the long future
- Machine learning foundations
- NLP fundamentals & classical tasks
- Data engineering for AI
- Synthetic data & dataset curation
- AI product design & UX
- Search, ranking & recommendation
- Enterprise adoption & change management
- AI careers, skills & teams
- Reading AI research
- AI in science & discovery
- Robotics & embodied AI
- AI economics, markets & business models
- AI myths, hype & media literacy
- Context engineering
- Shipping AI features: patterns & anti-patterns
- Build it: end-to-end AI tutorials
- Python for AI: hands-on recipes
- TypeScript, React and the web
- Frameworks and SDKs
- Errors and troubleshooting
- AI facts, numbers and statistics
- The history of AI
- The maths behind AI
- Architectures beyond the transformer
- Reinforcement learning
- Diffusion and generative media
- Speech, audio and voice engineering
- Benchmarks, one at a time
- AI search visibility
- Infrastructure and operations
- Databases and storage for AI
- Knowledge graphs and structured knowledge
- Classical ML in production
- Regulation, jurisdiction by jurisdiction
- Prompt recipes and pattern library
- AI for people who do not write code
- Writing, media and creative work
- Edge and on-device AI
- Interpretability and model internals
- Field notes
- OpenAI model behaviour
- Claude model behaviour
- Gemini model behaviour
- Llama model behaviour
- Mistral model behaviour
- Qwen model behaviour
- DeepSeek model behaviour
- Cohere model behaviour
- Grok model behaviour
- Small model behaviour
- Hybrid model architectures
- Token cost by language and script
- Transliteration, romanization and script handling
- Locale-correct output
- Multilingual generation quality
- Multilingual pipelines
- The EU AI Act, article by article
- AI under the GDPR and EU data law
- US AI regulation, state and sector
- International AI governance and standards
- AI litigation and enforcement
- Running AI workloads on AWS
- Running AI workloads on Google Cloud
- Running AI workloads on Azure
- AI at the edge: Workers, Vercel and Netlify
- Serving models on Kubernetes
- Operating AI infrastructure
- Quantization formats and what they cost
- llama.cpp, flag by flag
- Ollama and the desktop local-model runtimes
- Local models on Apple Silicon
- Hardware for local inference
- Running speech and embedding models locally
- Model files, adapters and conversion
- VRAM arithmetic for local models