One uses GPU-accelerated foundation models to extract structured knowledge from unstructured documents. The other uses Aho-Corasick finite state automata to match curated taxonomy terms in nanoseconds. Both are in production. Both work. And the decision of which to use has almost nothing to do with the technology.
The GPU-Accelerated Path: NVIDIA RAPIDS and Domain-Specific Foundation Models
IQVIA — the clinical research organisation operating in 100+ countries — announced in January 2025 their partnership with NVIDIA to apply GPU-accelerated AI to the $80 billion clinical trials market.
The pipeline: ingest unstructured clinical documents — PDFs, trial protocols, regulatory submissions, patient records — and extract structured triples. Drug X treats Condition Y. Patient cohort A matches Eligibility Criteria B.
GPU-accelerated KG construction makes this tractable at scale. Multimodal PDF extraction turns tables, charts, images, and free text into structured triples. Foundation models trained on healthcare vocabulary resolve synonyms and inconsistent terminology.
This is impressive engineering. It is also extraordinarily expensive, non-deterministic, and operationally complex. You need an ML Ops team. You need GPU infrastructure. You need to manage model drift. When the foundation model hallucinates a relationship that does not exist, the error propagates silently through the graph.
The Deterministic Path: Aho-Corasick Automata
At Zestic AI, we took a different path. We operate across multiple domains simultaneously: clinical research, financial deal lifecycle, argument analysis, and our own internal AI operations. No single foundation model covers all of these. Training a custom model per domain was economically absurd.
Instead, we built Terraphim: a knowledge graph indexed with Aho-Corasick automata compiled from curated taxonomy files.
The core data structure is the RoleGraph — a knowledge graph specific to a role. A “CTO” graph prioritises strategic documents. A “Terraphim Engineer” graph prioritises implementation details.
The thesaurus compiles into an Aho-Corasick automaton at build time:
let ac = AhoCorasick::builder()
.match_kind(MatchKind::LeftmostLongest)
.ascii_case_insensitive(true)
.build(keys)?;
The numbers that matter:
- Match speed: 5-10 nanoseconds per pattern match
- BERT baseline: ~50ms for transformer inference. That is a 5,000x difference.
- Automata rebuild: ~20ms when the taxonomy changes
- Determinism: 100% reproducible
- Infrastructure: CPU-only. Compiles to WebAssembly.
Head-to-Head
| Dimension | RAPIDS / Foundation Model | Terraphim Automata |
|---|---|---|
| Inference speed | 50ms+ | 5-10ns (5,000x faster) |
| Determinism | Probabilistic | 100% reproducible |
| Infrastructure | GPU required | CPU-only, WASM-compatible |
| Update latency | Hours to days | ~20ms |
| Error mode | Hallucination | Missing coverage |
| Explainability | Embedding similarity | Exact thesaurus entry + graph path |
When to Use Which
Choose GPU-accelerated KG when: massive volumes of unstructured data, probabilistic errors tolerable, update cycles in weeks, you have the budget for ML Ops.
Choose deterministic automata when: curated knowledge base that changes frequently, 100% reproducibility required, errors of commission more dangerous than omission, multiple domains, constrained infrastructure budget.
The Hybrid Opportunity
Most production systems will use both. GPU-accelerated extraction hallucinates. Deterministic automata miss things. A well-designed system uses automata as the primary retrieval layer and falls back to LLM-based reasoning when the automata return nothing. When the LLM succeeds on a novel query, the system captures the result, the automata are rebuilt in 20ms, and the next occurrence costs nothing.
This is the architecture Terraphim runs in production. It gets cheaper as it learns.
What Actually Matters
The technology choice is the least important decision. What determines whether your knowledge graph actually works in production is curation discipline. The willingness to define your domain vocabulary precisely. The rigour to maintain it as the domain evolves.
NVIDIA can accelerate triple extraction. Terraphim can match curated terms in nanoseconds. Neither matters if the terms are wrong, the relationships are stale, or nobody owns the ontology.
Curation is primary. Everything else is implementation detail.