Skip to content

P-04 / TRACE

Trace

An evidence-driven AI system for engineering drawings — upload a PDF, extract objects and relationships with traceable source regions, and get grounded Q&A that highlights back to the exact area of the drawing it answered from.

Status
In Development
Domain
Evidence / AI
Stack
TypeScript / Cloudflare Workers / D1 / R2
[P-04]TRACE
PRIVATE CORE

Technical record

ARCHITECTURE ONLY

Trace turns engineering drawings into a queryable evidence graph: a PDF is ingested, structured into objects, relations, and source page regions, and every chat answer is bound to evidenceIds and highlightIds that link back to the exact region it came from — when evidence is insufficient the system says so rather than guessing. Production is backed by an AI cost-control layer (unified router, per-request and daily budgets, circuit breakers, audited usage events) and multi-tenant infrastructure (RBAC, credit ledger, cross-tenant isolation, deletion pipelines). A research track (Pipeline v3) ran a 30-drawing bootstrap benchmark — the gold annotations are still pending human double-review, not yet frozen — and the quality gate correctly returned rollback_required on the extraction scores, so production stays on the v2 pipeline until accuracy clears the bar: a fail-closed rollout decision documented rather than hidden.

TECH STACK

TypeScriptReactCloudflare WorkersD1R2OpenAI Files APIPDF.js

SYSTEM SPECS

INTERFACEGrounded PDF drawing Q&A
DEPLOYMENTCloudflare Workers + D1 + R2
AI COST CONTROLBudgets, circuit breaker, audit trail
QUALITY GATEv3 → rollback_required, v2 stays production
BENCHMARK30/30 drawings, 270 standard regions
EXTRACTION SCORESObject F1 0.25 / Relation F1 0.01 — below gate
PHASEGold double-review + deterministic extraction fixes

SYSTEM ARCHITECTURE

TRACE — EVIDENCE GRAPH STACK
01
PDF INGESTIONUpload → R2 / OpenAI Files → structured DrawingGraph
02
EVIDENCE GRAPHObjects, relations, and source page regions with provenance
03
GROUNDED Q&AAnswers bound to evidenceIds / highlightIds — no evidence, no guess
04
AI COST ROUTERBudgets, rate limits, circuit breaker, usage audit
05
TENANT COREOrg/RBAC, credit ledger, cross-tenant isolation, deletion pipeline
06
PIPELINE V3 RESEARCHBootstrap gold benchmark (pending double-review) + automatic rollback on failed quality gate
AI ENGINEERING ·EVIDENCE GRAPH ·GROUNDED QA ·CLOUDFLARE WORKERS ·COST CONTROL ·QUALITY GATES ·MULTI TENANT