-
-
Copilot answers from governed documents with citations and confidence, and refuses rather than guess on safety.
-
Measured, not claimed: 0 unsafe answers in 15 adversarial tests, 100% cited answers, graded without an LLM judge.
-
Two sources disagree on HE-303 pressure: 18.5 bar vs 16.2 bar. Authority levels and blast radius shown; a human decides.
-
Management of Change: engineering-track changes wait for human sign-off before a superseded fact is closed.
-
Plant overview: open conflicts, quarantine backlog, compliance gaps and live health of every datastore in one view.
-
Governance controls: conflicts, quarantine, Management of Change, SLA, timestamp drift, push volume, circuit breaker.
-
Temporal knowledge graph for EQ-101. Every relationship carries authority, verification status and a validity window.
-
13 layers across five planes: perception, knowledge, governance, retrieval and delivery, on a FastAPI core.
-
A critical permit-to-work brief that cannot proceed without two distinct signatures, backed by linked evidence.
-
Immutable evidence vault. Documents are never deleted; superseding one closes its validity window instead.
-
Compliance cockpit: OISD and ISO 45001 clauses checked per asset, with every missing or unverified document flagged.
-
Field technician on mobile: briefs arrive before work starts, each backed by the source documents that justify it.
-
Kairos turns scattered plant documents into one governed answer, with the source behind every claim.
Inspiration
A technician is standing in front of a pump that keeps losing its mechanical seal. Somewhere in the plant, the answer already exists. The same seal failed twice before. The OEM quietly revised the flush plan in a service bulletin. The isolation valve on that line is overdue for inspection. A retired engineer once wrote in a shift log exactly why it happens every monsoon.
None of it reaches the technician, because it lives in a dozen disconnected places: scanned P&IDs in one archive, maintenance history in another, procedures, permits, inspection reports and regulatory filings somewhere else again. Search does not help, because the most dangerous gaps are the ones nobody knows to search for. And every year, more of the people who carry that context in their heads retire.
I kept seeing the same pattern in every AI tool pitched at this problem: a chatbot over a pile of PDFs. That is the wrong shape for an industrial plant. In a refinery a confident wrong answer about a pressure limit is not a bad user experience, it is an incident. A superseded procedure is not "older context", it is a hazard. So I set out to build the thing a plant would actually trust at the point of action.
What it does
Kairos turns fragmented plant knowledge into a governed, temporal knowledge graph, and delivers the right fact to the right person at the moment they need it, with a source behind every claim.
Three rules shape everything it does:
Never assert without provenance. Never auto-promote unverified input. Refuse rather than hedge on a safety-critical question.
- Ingests the real mess. PDFs, engineering drawings, scanned and handwritten forms, spreadsheets, email, voice notes, and Hindi or Hinglish text go through OCR, entity extraction, graph linking and indexing into an immutable, deduplicated evidence vault. If any span of a scan is read with low confidence, the whole document is held for a human instead of silently entering the graph.
- Remembers how knowledge changes. Every fact is a time-bounded edge carrying its authority, source document, confidence and verification status. You can ask what was true last March, and watch a revised OEM limit supersede the old one without losing history.
- Answers like an expert, and refuses like one. The Copilot combines exact, semantic and graph retrieval, streams a cited answer with a confidence score, and on a safety-critical question with weak evidence returns an explicit refusal instead of a hedged guess.
- Delivers before anyone asks. Opening a work order, issuing a permit-to-work, a lockout/tagout or an alarm assembles a contextual brief automatically. An EEMUA 191 style governor caps pushes so operators are not flooded, and permit-to-work briefs require two distinct signatures.
- Explains failures. Work-order history, failure records, OEM manuals and inspection findings are fused into root-cause timelines and hypotheses, with a blast-radius view of everything a change touches.
- Governs accuracy. Conflicting sources are adjudicated on two tracks, quarantined knowledge is promoted only by a human, and Management of Change, SLA escalation, timestamp-drift reports and a per-asset-class model gate keep the graph honest.
- Proves compliance. OISD, ISO 45001, Factory Act and PESO clauses are mapped against current documents per asset, gaps are detected automatically, and audit-evidence packs are signed by a person. Exports redact personal data at export time, not at ingestion, so retrieval keeps working.
- Captures what is about to be lost. Short structured interviews and voice notes, launched straight from a work order, pull undocumented expertise out of the people who hold it.
Five role-aware workspaces (field technician, engineer, reliability engineer, compliance officer, administrator) run on desktop and mobile, because the person who needs the answer is usually not at a desk.
How we built it
Kairos is a 13-layer platform organised into five planes: perception, knowledge, governance, retrieval and delivery.
| Plane | What runs there |
|---|---|
| Perception | NVIDIA NIM Nemotron OCR v2 and a Llama 3.2 11B Vision model for OCR and entity extraction, Groq Whisper for speech, a confidence gate on every span |
| Knowledge | Neo4j Aura temporal graph, Qdrant Cloud vectors (Jina embeddings v3), Elasticsearch exact search, Supabase Postgres and an immutable Storage vault |
| Governance | OPA policy for authorisation that fails closed, a quarantine layer, dual-track conflict adjudication, full audit log |
| Retrieval | Hybrid search fused by reciprocal rank, NVIDIA NIM Nemotron 3 Super synthesis with a fallback cascade, a two-pass safety gate |
| Delivery | Redis event streams, Temporal durable workflows, Celery workers, Go OT connectors, a Next.js 16 and React 19 interface |
The backend is FastAPI on Python 3.12. Everything runs from one Docker Compose file.
Time is part of every fact. Each edge carries six properties on every write: valid_from, valid_to, authority_level, document_id, confidence and verification_status. An edge is true at time \( t \) when
$$ t_{\text{from}} \le t < t_{\text{to}}, \qquad t_{\text{to}} = \texttt{9999-12-31} \text{ while the fact is current.} $$
Superseding a fact closes its window instead of deleting it, so the vault never loses history.
Fusion without comparing apples to oranges. Elasticsearch relevance scores and Qdrant cosine similarities live on different scales, so adding them lets whichever engine emits bigger numbers win. Kairos fuses by rank instead:
$$ \mathrm{RRF}(d) = \sum_{r \in R} \frac{1}{60 + \mathrm{rank}_r(d)} $$
Results are then ordered by authority first, so a regulation or OEM bulletin outranks a shift note on the same question.
The safety gate. Authority runs from 1 (strongest) to 5. A safety-critical answer is allowed only when the relevant, same-asset evidence satisfies
$$ c \ge 0.7 \quad \lor \quad a \le 3 $$
where \( c \) is confidence and \( a \) is authority level. The gate runs twice: once on the evidence before synthesis, and again on the generated answer. If either pass fails, the user gets a refusal card that says why, never a softened guess.
Challenges we ran into
- A safety gate that looked right and did nothing. The gate first kept the "top K" results by position. But search results are sorted by authority, so the top K were simply the highest-authority documents, relevant or not. An unrelated regulation could clear a safety question about the wrong pump. The fix was to rank candidates by relevance and let only same-asset evidence count. It taught me to test a guard by trying to get past it, not by checking that it exists.
- Conflicts that were not conflicts. Early on, two documents that merely mentioned the same asset were flagged as contradicting each other. A conflict needs two claims. Provenance edges such as "documented by" or "mentions person" now never count, and the filter lives inside the graph query so counts and pagination stay correct.
- Authentication that failed silently. Supabase issues ES256 tokens. A hand-written HS256 decode rejected every token without an error, and authorisation quietly fell back to development behaviour. Now there is exactly one token verifier, and I verify the boundary by logging in as a restricted persona against the live API and confirming a 403, because policy unit tests cannot tell you the layer is actually reached.
- Test data drowning the real corpus. Integration runs had left 87 of 108 active vault documents as test artifacts. Deleting them was not an option: the golden dataset lives in cloud stores with no backup. Test artifacts are now filtered on read by one shared predicate, and every view reports how many it excluded.
- A model disappeared. NVIDIA retired the Llama 3.1 70B endpoint I was synthesising with. I moved synthesis to Nemotron 3 Super, kept a fallback cascade through OpenRouter and Gemini, and made the benchmark mark any run answered by a fallback model as suspect so a score never silently comes from a different model.
- Streams and flaky connections. The Copilot stream once ended in an error event on every answer because of a single misplaced line, and cloud Postgres dropped idle HTTP/2 connections, causing intermittent server errors. Reads now retry once on a fresh connection. Writes are never replayed, because a write that died mid-flight may already have landed.
Accomplishments that we're proud of
- Zero unsafe answers. Across 15 adversarial safety questions designed to bait a confident guess, Kairos gave 0 unsafe answers. When the evidence is not strong enough, it refuses and says why.
- Every correct answer is traceable. 41 of 41 correct answers cite the exact source document, so an engineer can check the claim in seconds instead of trusting a model.
- A real product, not a demo. Ingestion, the temporal graph, governance, retrieval, proactive briefs, root-cause analysis, compliance and knowledge capture all work end to end on live data across five role-based workspaces, with no fixture data dressed up as real results.
- Honest measurement. Every number below comes from a reproducible harness in the repository, graded deterministically with required facts, accepted answers, negation checks and a provenance gate. No LLM grades another LLM.
| Metric | Result |
|---|---|
| Retrieval: the needed fact reaches the model | 46/46 (100%) |
| Answer quality on 46 domain-expert questions | 41/46 (89.1%) |
| Correct answers that cite their source | 41/41 (100%) |
| Adversarial safety questions answered unsafely | 0 of 15 |
| Compliance gap detection | precision 1.000, recall 0.838, F1 0.912 |
| Entity extraction F1 | 0.805 on 40 labels |
| Proactive brief quality | 6/6 graded checks |
| Load test | 2,275 requests, 0% errors, knee at 50 virtual users |
| Soak test | no memory or connection leak |
Quality gates: 494 backend tests and 271 frontend tests passing, a 46-step end-to-end flow suite, 13/13 layer smoke checks, and CI with CodeQL, dependency audits and linting on every push.
What we learned
- In safety-critical domains, refusing is a feature. The most valuable answer Kairos gives is sometimes "I will not answer this, here is why, here is who to ask."
- Time is not metadata. Treating validity windows as first-class turned "which document is right?" into a question the system can answer.
- Deterministic evaluation keeps you honest. Grading with an LLM judge would have hidden several of the failures above.
- Verify through the real path. Mocked tests passed on bugs that only a live request with a real token exposed.
What's next for Kairos
- A pilot on one real unit, rolled out the way the architecture is designed: retrieval first, then human-in-the-loop answers with feedback on every output, and proactive briefs only once operators trust what they see.
- Live historian integration. The Go connector has a working PI Web API client, and without an endpoint it serves simulated telemetry stamped
mock: trueso it is never mistaken for real data. Next is an OPC UA client and connecting a pilot site's real historian. - Air-gapped and edge deployment, with local models, for sites that cannot send data to the cloud.
- Multi-site knowledge, so a failure mode learned at one plant warns every sister plant running the same equipment.
Built With
- celery
- docker
- elasticsearch
- fastapi
- gin
- go
- grafana
- groq
- jina-ai
- neo4j
- next.js
- nvidia-nim
- open-policy-agent
- opentelemetry
- postgresql
- pydantic
- python
- qdrant
- react
- redis
- supabase
- tailwind-css
- temporal
- typescript
- whisper
Log in or sign up for Devpost to join the conversation.