ai newsMo., 26. Okt.

I Built SnoozeOps: An Open-Source AI Data Janitor That Does the Boring Spreadsheet Work

This is a submission for the Hacktoberfest Open-Source AI Challenge: Week 3 — Slow and Steady I Built SnoozeOps: An Open-Source AI Data Janitor That Does the Boring Spreadsheet Work "You snooze. Your data gets cleaned." 1. The Problem: The Agony of Spreadsheet Inspection Nobody got into software en

dev.toMontag 02:13 · 26.10.7 Min. Lesezeit
Bild: dev.to

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge: Week 3 — Slow and Steady

Nobody got into software engineering or data analysis because they dreamed of squinting at 5,000 spreadsheet rows looking for broken formulas, decimal slips, and negative customer tenures.

Yet every week, millions of developers and analysts open CSV files and perform the same soul-draining manual inspection:

Missing these issues is embarrassingly easy for human eyes after 20 minutes of scrolling. But letting bad data slip into production downstream destroys analytics dashboards, corrupts machine learning training sets, and triggers costly billing reconciliations.

October 20 is International Sloth Day, celebrating animals that conserve their energy and refuse to do unnecessary manual labor. That was the spark: what if an open-weight AI agent could do the tedious inspection work while you take a nap, and hand you a clean, reviewable dataset with a cryptographic audit trail when you wake up?

SnoozeOps is an open-source, local-first AI data janitor that automates spreadsheet inspection. It is not another generic chatbot where you paste a table into a prompt window; it is a dedicated developer tool that:

You can load built-in sample datasets (E-Commerce Retail, Clinical Health, SaaS Metrics, or the Seeded Benchmark) with one click, or drag and drop any CSV file from your computer.

SnoozeOps separates statistical anomaly detection, neural tabular residual prediction, and natural-language explanation into dedicated, decoupled components:

┌────────────────────────────────────────────────────────┐ │ Next.js 14 Frontend │ │ Spreadsheet Grid • Anomaly Review • Settings │ └───────────────────────────┬────────────────────────────┘ │ REST JSON API ┌───────────────────────────▼────────────────────────────┐ │ FastAPI Backend │ │ │ │ ┌──────────────────┐ ┌───────────────────────────┐ │ │ │ Column Profiler │ │ Statistical Detectors │ │ │ │ (Stats & Bins) │ │ (MAD, Tukey, Slip, Typos)│ │ │ └────────┬─────────┘ └─────────────┬─────────────┘ │ │ │ │ │ │ └──────────────┬─────────────┘ │ │ │ │ │ ┌──────────────────▼──────────────────┐ │ │ │ TabPFN Tabular Prediction Engine │ │ │ │ (Prior Labs TabPFN / IsoForest) │ │ │ └──────────────────┬──────────────────┘ │ │ │ │ │ ┌──────────────────▼──────────────────┐ │ │ │ LLM Janitor & Deterministic Engine │ │ │ │ (Open-Weight Gemma 2 / Rule Fallback│ │ │ └──────────────────┬──────────────────┘ │ │ │ │ │ ┌──────────────────▼──────────────────┐ │ │ │ Audit Engine & Cryptographic Signer │ │ │ │ (Raw Preservation & SHA-256 Hashes) │ │ │ └─────────────────────────────────────┘ │ └────────────────────────────────────────────────────────┘ Enter fullscreen mode Exit fullscreen mode The Component Breakdown: Next.js 14 Frontend: Built with TypeScript, Tailwind CSS, and Lucide icons. Uses a forest-green and warm-cream palette inspired by developer tools like Linear and Supabase. Includes an interactive spreadsheet grid that highlights anomalous cells with live tooltips.

FastAPI Engine ( backend/ ): High-performance asynchronous Python backend with NumPy and Pandas. Statistical Engine ( backend/detectors/statistical.py ): Computes non-parametric Tukey fences ($Q_1 - 1.5 \times \text{IQR}$) and MAD Z-scores ($0.6745 \times \frac{|x - \text{median}|}{\text{MAD}}$) to remain resilient against extreme outliers that fool standard deviation tests. TabPFN Residual Detector ( backend/detectors/tabpfn_detector.py ): Prior Labs' TabPFN tabular foundation model fits a prior-data fitted network across numeric dimensions to evaluate multivariate conditional residuals ($>3.0\sigma$).

Gemma Reasoning Engine ( backend/llm_janitor.py ): Synthesizes grounded natural-language explanations and safe corrections using Google's open-weight Gemma 2 ( gemma2:2b or gemma2-9b-it ). Audit & Cryptographic Signer ( backend/audit.py ): Applies approved transformations to a working copy, calculates input/output SHA-256 hashes, and records itemized provenance logs. 5.

Key Engineering Decisions Decision 1: Never Fake Model Inference Too many AI demos hardcode fake LLM responses in the frontend. SnoozeOps takes a transparent architectural stance:

# From backend/llm_janitor.py if self. provider in [ " ollama ", " groq ", " huggingface " ] and ( self. provider == " ollama " or self. api_key ): try: enhanced, meta = await self. _call_gemma_model ( anomalies, df_context ) return enhanced, meta except Exception as e: enhanced, meta = self. _deterministic_fallback ( anomalies ) meta [ " is_fallback " ] = True meta [ " fallback_reason " ] = f " Model ' { self. model } ' unavailable: { str ( e )[: 150 ] }. Used deterministic janitor. " return enhanced, meta Enter fullscreen mode Exit fullscreen mode Decision 2: Decoupling Heuristics from Language Models Language models are notoriously bad at basic floating-point arithmetic and computing column percentiles across thousands of numbers.

Asking an LLM "Find the 99th percentile outlier in this 20,000-row column" is expensive, slow, and unreliable.

Instead, SnoozeOps uses Python and NumPy for high-speed statistical bounds and TabPFN for tabular regression. Gemma is used for what it excels at: grounded causal reasoning and semantic formatting (e.g., explaining why a decimal was shifted and providing human-readable context).

TabPFN is a powerful foundation model for tabular data, but eagerly importing PyTorch and neural network weights on application startup adds 3–5 seconds of cold-start latency.

In backend/detectors/tabpfn_detector.py, I implemented lazy evaluation:

_tabpfn_module = None _tabpfn_attempted = False def _get_tabpfn (): global _tabpfn_module, _tabpfn_attempted if not _tabpfn_attempted: _tabpfn_attempted = True try: from tabpfn import TabPFNRegressor _tabpfn_module = TabPFNRegressor except Exception: _tabpfn_module = None return _tabpfn_module Enter fullscreen mode Exit fullscreen mode This ensures standard statistical analysis and API health checks start in under 5 milliseconds.

Building SnoozeOps around open-weight models and open-source tooling is not just an aesthetic choice; it fundamentally alters the software economics and privacy guarantees:

To prove that SnoozeOps delivers measurable results rather than hand-wavy marketing, the repository includes a seeded 100-row ground-truth evaluation dataset ( backend/data/ground_truth_test_data.csv ) containing 20 pre-labeled real-world anomalies.

Anyone can run the live benchmark directly in the UI or via Python:

python -c "import urllib.request, json; print(json.loads(urllib.request.urlopen('http://127.0.0.1:8000/api/evaluate').read())['evaluation']['comparison'])" Enter fullscreen mode Exit fullscreen mode Reproducible Benchmark Results: Metric Naive 3-Sigma Z-Score Baseline SnoozeOps Hybrid AI Janitor Gain Anomaly Recall 35.0% (Missed 13 of 20) 100.0% (Caught 20 of 20) +65.0% Recall Precision 100.0% 100.0% Zero degradation False Positives 0 0 Clean baseline F1 Score 0.52 1.00 +0.48 F1 Runtime Latency 2.1 ms 320.4 ms Sub-second Why Did Naive 3-Sigma Miss 65% of Anomalies? Standard $3\sigma$ standard deviation baselines only catch astronomical numerical spikes. They are completely blind to:

SnoozeOps caught every single one of these subtle corruptions in 320 milliseconds without a single false positive.

# 1. Clone repository git clone https://github.com/Megh-Shah-08/snooze-ops.git cd snooze-ops # 2. Setup backend python -m venv venv # On Windows:. \v env \S cripts \a ctivate # On Linux/macOS: source venv/bin/activate pip install -r backend/requirements.txt python -m uvicorn backend.main:app --port 8000 # 3. Setup frontend (in a separate terminal) cd frontend npm install npm run dev Enter fullscreen mode Exit fullscreen mode Open http://localhost:3000 in your browser.

I captured the architectural session behind SnoozeOps using DevRelay. You can inspect the interactive session transcript with code prompts, detector implementations, and benchmark runs here:

Building SnoozeOps: Open-Source AI Spreadsheet Janitor You Build SnoozeOps for Hacktoberfest 2026 Week 3: Slow and Steady. It should automate tedious spreadsheet inspection: detect suspicious anomalies (decimal slips, domain violations, typos, formula errors), evaluate TabPFN tabular residuals, explain errors using open-weight Gemma, prepare safe reviewable fixes, and generate SHA-256 audit reports.

Architecting SnoozeOps data quality engine with a hybrid pipeline: 1. Profiler: Pandas schema inference, null percentages, statistical moments, and distribution histograms. 2. Anomaly Engine: Multi-tier detectors (MAD Z-Score, Tukey IQR, decimal point shifts, non-negative constraints, string typos, revenue formula checks). 3. TabPFN tabular prediction: Conditional residual detection for tabular anomalies. 4. Gemma Janitor: Grounded explanations and safe proposed corrections with explicit deterministic fallback. 5. Cryptographic Provenance: Preserves raw data and computes SHA-256 signatures for before/after validation.

def detect_anomalies(df):... Output Built statistical.py and tabpfn_detector.py with sub-millisecond lazy loading. You How does SnoozeOps benchmark against standard 3-sigma z-score baselines?

Running reproducible benchmark evaluation on 100-row seeded dataset with 20 ground-truth anomalies: - Naive 3-Sigma Baseline: Recall 35.0%, Precision 100.0%, F1 0.52, missed 13 subtle domain anomalies (negative tenure, decimal shifts). - SnoozeOps Hybrid Engine: Recall 100.0%, Precision 100.0%, F1 1.00, 0 False Positives, latency 320ms. Empirical gain: +65.0% recall improvement.

python -m unittest tests/test_core.py Output Ran 6 tests in 0.198s. OK. You Now deploy the Next.js frontend and FastAPI backend on Render, and provide verified cloud URLs.

Configured render.yaml with Infrastructure-as-Code: - Frontend: Next.js 14 on Render Web Service ( https://snooze-ops-frontend.onrender.com ) - Backend: FastAPI Python 3.11 on Render Web Service ( https://snooze-ops-backend.onrender.com ) - Open Model Service: Containerized Ollama with open-weight Gemma on Render ( https://snooze-ops.onrender.com ) All health checks passing with zero data egress guarantees.

Direct session link: https://dev.to/agent_sessions/building-snoozeops-open-source-ai-spreadsheet-janitor-uv5bns

This project was built from scratch during the Hacktoberfest 2026 challenge window for Week 3: Slow and Steady (International Sloth Day).

Life is too short to spend your afternoons hunting down missing commas and misplaced decimal points in spreadsheets. Take a nap. Let open-source AI do the cleaning.

If you found this useful, star the project on GitHub or share your thoughts in the comments!

Quelle: dev.to (dev.to). Original öffnen