DEV Community

Cover image for LabPulse AI: Hands-Free Diagnostic Bench Assistant for Molecular Biology
123qassim
123qassim

Posted on AI-assisted

LabPulse AI: Hands-Free Diagnostic Bench Assistant for Molecular Biology

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built LabPulse AI, an edge-first diagnostic bench assistant engineered for my classmate and lab partner Cynthia, a medical biotechnology researcher who spends hours running PCR assays, Nanodrop spectrophotometry, and gel electrophoresis runs.

The Problem

During bench experiments in molecular biology, your hands are suited in nitrile gloves wet with buffers, ethidium bromide, and reagents. You cannot touch a keyboard or trackpad without contaminating your workstation or ruining equipment. Observations get scribbled haphazardly on paper towels or dictated into fragmented voice notes on a smartphone:

"16S rRNA gene amplification from colony 4B. Annealing set to 57.5 C, 32 cycles. Strong band at 1500 bp, minor smear near 400 bp. Master mix buffer lot expired last week."

Converting these raw, unformatted bench notes into standard IMRAD (Introduction, Methods, Results, and Discussion) laboratory logs and structured datasets consumes hours after every shift. Closed-source APIs were completely out of the question:

  1. University wet labs are frequently located in basement rooms or rural research stations with dead-zone internet connectivity.
  2. Proprietary sequencing observations and unpublished diagnostic protocols cannot be piped into commercial closed-model clouds for corporate training.

LabPulse AI solves this with three targeted benchtop capabilities:

  1. Hands-Free Voice Dictation: Cynthia can dictate assay observations directly into the browser without de-gloving.
  2. Deterministic Schema Extraction: Open-weight Gemma 2 structures raw dictations into verified JSON parameters and flags reagent anomalies.
  3. Diagnostic Quality Control & Instant IMRAD Export: Automatically calculates spectrophotometric purity indices (A260/A280) and generates one-click, audit-ready lab notebook slips.

Demo

  • Live Application: https://labpulse-ai.onrender.com
  • Primary Capabilities: Glove-friendly voice dictation, real-time parameter extraction, anomaly detection (annealing variances, expired reagents, primer-dimer smears), diagnostic purity scoring, and persistent MongoDB Atlas audit logs.

LabPulse AI Interface

Example Structured Output (Instant IMRAD Slip)

Experimental Run Record: Spectrophotometry

Timestamp: 2026-10-04 09:49:51 UTC

Target Sample: Plasmid DNA

1. Methodology & Parameters

  • Annealing Temperature: N/A
  • Cycles: N/A
  • Optical Density (A260/A280): 1.84 [QC Status: Optimal Pure DNA]

2. Observations & Anomaly Analysis

  • Summary: Completed Spectrophotometry evaluation under standard protocol parameters.
  • Anomalies / Flags: None (sample validated)

Parsed and verified via LabPulse AI (Gemma 2 open-weight inference).


Code

The project is fully open source under the MIT License:

👉 GitHub Repository: https://github.com/123qassim/labpulse-ai

Architecture & Stack:

  • Inference Core: Google Gemma 2 open-weight architecture (quantized local execution fallback via Ollama + Hugging Face Serverless endpoint).
  • Backend Service: FastAPI with Pydantic v2 deterministic schema enforcement.
  • Data Persistence: MongoDB Atlas for structured experiment logs and audit tracking.
  • Deployment & Containerization: Docker on Render.

How I Built It

  1. Open-Weight Core (gemma-2-2b-it): LabPulse AI harnesses instruction-tuned Gemma 2 to extract domain-specific biological shorthand into strict JSON without relying on proprietary cloud endpoints.
  2. Dual-Tier Resilient Inference Pipeline: The backend queries a local Ollama instance running Gemma 2 when offline at the bench. When connectivity is available, it routes to cloud-hosted Gemma 2. If a network drop occurs mid-run, an internal heuristic parser steps in automatically to prevent data loss.
  3. Diagnostic Intelligence Layer: The front-end evaluates spectrophotometric A260/A280 absorbance ratios in real time, automatically categorizing pure nucleic acids (1.8/2.0) versus protein/phenol contamination risks.
  4. Database Integration: Structured records are indexed and stored in MongoDB Atlas, populating an instant audit history table for research verification.

Why Does Open Innovation Matter?

  1. Scientific Data Sovereignty: Molecular research data and novel protocol designs should remain under the researcher's control. Open-weight models like Gemma 2 ensure researchers process findings locally without sending sensitive lab records to third-party providers.
  2. Field-Ready Offline Operation: Labs located in dead zones or basement facilities require software that functions without steady internet. Open weights can be quantized and executed directly on benchtop laptops.
  3. Zero Marginal Inference Cost: High-throughput laboratory work generates hundreds of micro-logs daily. Open-weight models remove prohibitive per-token API costs for student researchers.

Cynthia's Reaction

I loaded the app on her laptop and tested it against a set of messy gel electrophoresis notes from her notebook.

Her reaction:

"The hands-free dictation is the real game-changer. Being able to dictate observations while holding a pipette without having to take off my gloves and touch the keyboard—and then getting an instant IMRAD entry with our purity ratios calculated—cuts my lab report write-up time in half."


Prize Categories

  • Best Use of Gemma (Gemma 2 open-weight inference architecture)
  • Best Use of Render (Automated Docker containerized deployment)
  • Best Use of MongoDB Atlas (Experiment record persistence and schema validation)

Top comments (1)

Collapse
 
123qassim profile image
123qassim • • Edited

Thanks everyone for checking out LabPulse AI!
Building this for Cynthia came directly out of our shared benchtop frustration—balancing pipettes, biohazard protocols, and scribbled paper notes just to log PCR cycle parameters and OD ratios shouldn't be the hardest part of molecular diagnostics.

A few quick notes for anyone trying it out:
Test the Live Demo: You can test both the PCR and Nanodrop spectrophotometry runs at labpulse-ai.onrender.com, or hit the
Voice Dictation button to test hands-free logging.
Offline Resiliency: The architecture includes an automatic heuristic fallback so that even if connectivity cuts out in a basement wet lab, structured data extraction continues without data loss.
Feedback & Bench Protocols: If you're in molecular biology, diagnostics, or bioinformatics, I’d love your thoughts on what additional diagnostic assays (e.g., RT-qPCR cycle thresholds, Western blot band quantitation) would be most useful to support next.

Feel free to explore the code, report issues, or drop a star on GitHub! 🧬⚡ #hf26challenge #hacktoberfest #devchallenge #weekendchallenge #gemma #mongodb #render #bioinformatics #molecularbiology #opensource #fastapi #ai