LabPilot is an AI copilot for experiment optimization in R&D labs.
It helps scientists decide the next best experiment by combining:
- a surrogate model trained on historical experiment data,
- adaptive decision policies (random/greedy/UCB/contextual LinUCB),
- literature evidence and explanation layers for trust and interpretability.
Lab optimization is expensive and slow when done by trial-and-error. Teams need to:
- reduce experiment cycles to reach target yield faster,
- justify why a recommendation is reasonable (not a black-box guess),
- keep a traceable thread of decisions and outcomes.
LabPilot is built as a decision-support loop, not a generic chatbot:
- Ingest data
- Train a surrogate model
- Recommend next experiment
- Submit observed result
- Adapt model/session and continue
backend/- FastAPI service, SQLite persistence, orchestration logicmodeling/- shared modeling components and utilitiesscripts/- organized CLI entrypoints (training/,workflows/,analysis/,benchmarks/,demos/)labpilot_frontend/- React/Vite frontend (embedded in this repo)docs/- PRD, build guide, modeling quickstart, progress notesprompts/- LLM prompt templates for reasoning outputs
- Dataset upload (
.csv,.xlsx,.xls) - Surrogate model training (RandomForest-based)
- Next-experiment recommendation (top-k ranked candidates + uncertainty)
- Session loop with
submit-resultand follow-up recommendation - Conversation threads with metadata-rich responses
- Literature search (Tavily) + literature relevance explanation
- Fair evaluation snapshot and comparison suite runs
- Python, FastAPI, SQLAlchemy/SQLite
- pandas, scikit-learn, joblib, matplotlib
- RandomForest surrogate + uncertainty estimate
- UCB/adaptive/greedy/random/contextual LinUCB policies
- Nebius Token Factory (LLM reasoning/classification)
- Tavily API (literature retrieval and citation snippets)
- React + Vite + TypeScript
- Wouter routing
- Recharts for evaluation visualizations
- Modeling layer predicts yield and uncertainty from condition vectors.
- Policy layer ranks candidate experiments (exploit vs explore tradeoff).
- Reasoning layer explains recommendation intent and follow-up decision rule.
- Evidence layer adds literature support when requested/triggered.
- App layer stores sessions, runs, and threaded conversation history.
- Upload dataset from UI (
Inputpage quick-start or API) - Trigger training run
- Create conversation + session linked to trained model
- Ask chat for recommendation or literature review
- Submit observed yield/conditions
- Receive updated follow-up recommendation in the same thread
POST /api/datasets/uploadPOST /api/training/runsPOST /api/conversationsPOST /api/conversations/{id}/messagesPOST /api/sessionsPOST /api/sessions/{id}/nextPOST /api/sessions/{id}/submit-resultPOST /api/recommendations/nextPOST /api/recommendations/next_with_evidencePOST /api/literature/explainGET /api/evaluation/snapshotPOST /api/evaluation/compare-suite
cd /Users/rajatpatel/research/nebius_ai_hack/LabPilot
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn backend.main:app --host 127.0.0.1 --port 8010Swagger: http://127.0.0.1:8010/docs
cd /Users/rajatpatel/research/nebius_ai_hack/LabPilot/labpilot_frontend
npm install --legacy-peer-deps
npm run devCreate LabPilot/.env (not committed) for optional integrations:
NEBIUS_API_KEYNEBIUS_API_BASE(optional override)TAVILY_API_KEYINTENT_MODE(rules,llm,hybrid)TAVILY_AUTO_UNCERTAINTY_THRESHOLD
LabPilot emphasizes fair, defensible claims:
- holdout-first reporting for generalization,
- multi-run comparisons across strategies,
- random baseline included,
- clear methodology and artifact traceability in the UI.
