InsightLab AI
A research lab that designs surveys, simulates answers with synthetic AI populations, collects real answers on mobile and produces reproducible statistics and reports.
- My role
- Full-stack design and development
- Stack
- Next.js 16React 19TypeScriptFastAPISQLAlchemyCeleryPostgreSQLPandasSciPyReportLab
- AI in the project
- Claude APIOpenAIClaude Code
The problem
Before investing in a survey with real people you need to know whether the questions work and what results to expect. Doing that by hand is slow, and survey tools do not let you test a study on hypothetical populations or rigorously separate simulated data from real data.
The solution
A private platform for the whole cycle: design the survey, generate a reproducible synthetic population, simulate answers with Claude or OpenAI and analyze them with classical statistics. When the study is ready, real people answer through a link or QR code, and reports compare both worlds without mixing them.
By the numbers
- 217Automated backend tests
- 385 msMedian latency with 100 concurrent users in a load test
- 18Sections in the PDF report, plus Excel, CSV and JSON
- 9Question types with skip logic and versioning
What it looks like
Architecture
High-level view of the pieces and how they connect.
- Client
Frontend
Next.js 16 with React 19, accessible components and charts. The browser only talks to Next.
- Server
API
FastAPI with SQLAlchemy and Alembic migrations.
- Heavy work
Worker
Celery runs simulations in the background; they can be cancelled and resumed.
- AI
Providers
Claude, OpenAI or a free test provider, with a budget per simulation.
- Data
PostgreSQL
Studies isolated from each other; simulated and real data always kept apart.
- Analysis
Statistics and reports
Pandas, NumPy and SciPy for analysis; ReportLab and openpyxl for reports.
How I used AI
What AI did, what I decided and how I checked that it works.
01
What AI did
- Inside the product, it simulates each synthetic participant from their profile and helps draft surveys.
- During development, it wrote most of the backend and frontend code from specs.
- It generated tests, including the end-to-end smoke test.
02
What I decided
- That AI never computes statistics; every number comes from deterministic code.
- Strictly separating simulated from real data and labeling it in every report.
- Mandatory human approval of every survey and a cost estimate before simulating.
- Reproducible populations from a seed.
03
How I verified it
- 217 backend tests and end-to-end tests with Playwright.
- A smoke test that kills the worker mid-simulation and checks it resumes without losing or duplicating answers.
- A load test with 100 concurrent users.
Technical challenges
Simulating without fooling yourself
AI-generated answers can look like real data, and that is dangerous. The platform labels every synthetic result, warns that p-values and intervals do not describe a real population, and never mixes simulated answers with answers from people.
Long simulations that survive failures
A simulation with hundreds of participants can take minutes. It runs in a separate worker with a record of every job, so if the process dies it is detected and resumed exactly where it stopped, without losing or repeating answers.
Costs under control
Before simulating, the platform estimates the cost based on the model and population size, and respects a maximum budget. The test provider lets you check the whole flow without spending anything.
Results
- Platform delivered in November 2026, covering the full research cycle.
- 217 backend tests and a load test with a 385 ms median.
- 18-section reports with explicit methodology and limitations.
The video and screenshots use a fictional study with the test provider, on a demo database.
What I learned
When AI generates data, the product’s value lies in the honesty of the system: what gets labeled, what gets separated and what is never asked of the model. Designing those limits mattered more than any prompt.



