Inspiration

High school and university STEM researchers routinely spend hours cleaning messy lab spreadsheets, manually hunting for broken sensor readings, and wondering whether their experimental results are statistically rigorous enough to trust. I built BioLens AI to give every student and lab researcher an instant, transparent co-scientist that catches statistical anomalies, flags hidden confounding variables, and proposes testable follow-up experiments right from raw experimental data.

What it does

BioLens AI is an interactive STEM laboratory workbench and research copilot built for real-world experimental workflows:

Automated Z-Score Anomaly Screening (|Z| > 2.0): Flags corrupted sensor runs or biological edge cases (such as thermal burn-in coupons or denatured enzyme trials) and lets researchers toggle Exclude Flagged Outliers to watch Pearson correlation (r), sample mean, and regression curves recalculate in real time. Experiment Rigor & Reproducibility Scorecard (0–100): Evaluates sample size adequacy (n), anomaly contamination rate, and statistical significance (p-value) to generate an actionable rigor score alongside targeted protocol recommendations. Grounded Dual-Engine AI Co-Scientist: Combines a deterministic client-side statistical engine (statsEngine.ts) with Google Gemini (gemini-3.5-flash-lite) to deliver 1-click Lab Synthesis reports (Empirical Findings, Confounding Bias Check, and 3 Next-Step Hypotheses) plus an interactive Research Q&A Chat grounded directly in the active dataset's math. Custom CSV Upload & 1-Click Markdown Lab Report Export: Researchers can explore three built-in STEM benchmarks (Solar Perovskite Efficiency, CRISPR-Cas9 Knockdown, Coastal Microplastics) or upload any raw .csv file and export a publication-ready .md lab report.

How we built it

Frontend & Deterministic Statistical Engine: Built with React, TypeScript, Vite, Tailwind CSS, and Recharts. All descriptive statistics, Ordinary Least Squares (OLS) linear regressions, Pearson r / R² / two-tailed p-values, and |Z| > 2.0 outlier filters are computed deterministically in the browser (src/utils/statsEngine.ts) so the AI never hallucinates numbers. Serverless AI Architecture: Deployed on Vercel with serverless /api/health and /api/gemini endpoints powered by the official @google/genai SDK (gemini-3.5-flash-lite), paired with an offline-ready Demo Intelligence Mode for instant zero-latency exploration and a transparent Statistical Context JSON Inspector.

Challenges we ran into

Preventing LLM Math Hallucinations: Rather than asking an LLM to eyeball raw CSV rows, we engineered a deterministic pre-computation pipeline (statsEngine.ts) that injects exact sample statistics, OLS equations, and |Z| > 2.0 outlier rows into Gemini's system context. Balancing Speed & Reliability Across Environments: Ensuring sub-second responsiveness while supporting both live Gemini inference during peak demand and offline local testing led us to build a dual-mode engine with clean client-side Markdown/Unicode rendering.

Accomplishments that we're proud of

Building a fast, zero-friction scientific workbench where toggling outlier exclusion dynamically updates regression metrics and visualizations in milliseconds. Engineering a grounded AI research assistant that cites exact row IDs, Z-scores, and p-values—and even catches multi-variable confounders (like thermal spikes) when values sit just below the Z-score threshold.

What we learned

Pairing deterministic client-side math engines with LLMs makes scientific AI tools dramatically more trustworthy, verifiable, and useful in real lab environments. Designing clear data-transparency features—such as the View Statistical Context JSON payload inspector and AI Disclosure modal—builds immediate confidence for researchers reviewing automated insights.

What's next for BioLens AI

Pairing deterministic client-side math engines with LLMs makes scientific AI tools dramatically more trustworthy, verifiable, and useful in real lab environments. Designing clear data-transparency features—such as the View Statistical Context JSON payload inspector and AI Disclosure modal—builds immediate confidence for researchers reviewing automated insights.

Built With

Share this project:

Updates

Submission history