Architecting a transparent optimisation lab

Evidentia Lab is intentionally opinionated: every layer is built for clarity, reproducibility, and a future where science-grade experimentation fits in your pocket.

Core goals

  • Empower users to think like researchers: form hypotheses, run trials, and record evidence.
  • Guarantee audit trails so analysts can trace any recommendation back to raw inputs.
  • Deliver a delightful, responsive interface worthy of a modern iOS-grade experience.
  • Keep deployment frictionless: one repo handles the conversation flows, optimisation engine, and website.

The intake protocol

Intake is the most critical moment. Our system prompt acts like a data scientist sitting beside the user, nudging for coverage, accuracy, and clarity before anything touches the optimiser.

Conversational guardrails

The data-orchestrator LLM detects the user's language, mirrors it for comfort, but reasons internally in English to keep JSON keys consistent. It will not proceed until targets and features meet strict validation rules.

Schema compliance

Every iteration involves structural checks: ≥15 observations per variable, search spaces for controllable inputs, sensible feature types, and explicit target weights with directionality.

Build for iteration

If data falls short, the intake worker proposes concrete actions (e.g., “Log caffeine_after_14 for 5 more days”) instead of guessing. The user always knows why extra data is required.

JSON ready by design

Once validation passes, the worker prepares an analysis-ready configuration and stores a copy for audit trails or later downloads.

Optimisation engine walkthrough

The optimisation stage lives inside a managed engine deployed on Cloudflare's global network, keeping insights fast for users everywhere. Here's how each request flows:

  1. Vectorisation: Feature types are inferred or honoured from intake metadata, ensuring time fields become cyclical encodings and categoricals expand into one-hot arrays.
  2. Regression fit: A least-squares model estimates each target, computing orientation-aware statistics so lower-is-better objectives flip automatically.
  3. Historical scoring: Every observed day receives a combined score, revealing the ideal configuration the user already achieved.
  4. Experimental sampling: If a search space exists, 512 candidate plans are sampled and ranked to propose the best next test.
  5. Artifact bundling: Results surface as JSON and CSV-ready structures, primed for downloadable artifacts and future visualisations.

Insights that feel human

Data without explanation is noise. The second-stage LLM uses its own dedicated system prompt to narrate the findings, manage expectations, and recommend the next round of logging.

Mode awareness

The mentor adapts between analysis, experiment planning, and reflection modes so the user always knows what comes next.

Honest uncertainty

Every prediction is accompanied by confidence notes and reminders about sample size, keeping the dialogue grounded.

Future knowledge graph

Once literature search is connected, the mentor will queue scientific papers for review, creating a virtuous loop between lived experiments and published insights.

In short: scientific rigour wrapped in a glossy experience

From the sticky navigation bar to the glassmorphic cards, the UI is designed to make experimentation feel premium. But under every animation lies a deterministic workflow ready for audit logs and enterprise governance.

Jump to the live sandbox or continue reading.