<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Malawige Inusha Thathsara Gunasekara</title>
    <description>The latest articles on DEV Community by Malawige Inusha Thathsara Gunasekara (@inushathathsara).</description>
    <link>https://dev.to/inushathathsara</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3688375%2F884c13e5-87d4-49ec-a3d1-a73e5f71b94c.png</url>
      <title>DEV Community: Malawige Inusha Thathsara Gunasekara</title>
      <link>https://dev.to/inushathathsara</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/inushathathsara"/>
    <language>en</language>
    <item>
      <title>Benchmarking Frontier AI on Curved Tire Sidewall OCR</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Sun, 11 Oct 2026 03:08:01 +0000</pubDate>
      <link>https://dev.to/inushathathsara/benchmarking-frontier-ai-on-curved-tire-sidewall-ocr-145c</link>
      <guid>https://dev.to/inushathathsara/benchmarking-frontier-ai-on-curved-tire-sidewall-ocr-145c</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/kaggle-2026-09-23"&gt;Kaggle Benchmarking Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Benchmarked
&lt;/h2&gt;

&lt;p&gt;In computer vision pipelines for automotive manufacturing, fleet maintenance, and tire recycling, reading tire specifications is a notorious challenge. &lt;/p&gt;

&lt;p&gt;Tire sidewalls feature embossed, black-on-black rubber text following the wheel's circular arc. When training custom object detection models (such as YOLO) to detect individual character boxes (&lt;code&gt;/&lt;/code&gt;, &lt;code&gt;0-9&lt;/code&gt;, &lt;code&gt;R&lt;/code&gt;), traditional post-processing relies on sorting bounding boxes by horizontal X-coordinates to reconstruct the tire code (e.g., &lt;code&gt;205/55R16&lt;/code&gt;). &lt;/p&gt;

&lt;p&gt;However, this naive approach fails on real-world tires:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Curvature and Rotation&lt;/strong&gt;: When text curves along the side of the wheel arc or is oriented vertically / upside down, coordinate-based sorting reverses or scrambles the sequence (e.g. &lt;code&gt;225/60R18&lt;/code&gt; is read as &lt;code&gt;81R06/522&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low-Contrast Black-on-Black Rubber&lt;/strong&gt;: Dirt, shadows, and tire wear make standard OCR tools choke.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Question:
&lt;/h3&gt;

&lt;p&gt;Can frontier general-purpose Vision-Language Models (VLMs) perform &lt;strong&gt;zero-shot OCR and structured extraction&lt;/strong&gt; of ISO metric tire size specifications (&lt;code&gt;[Width]/[Aspect]R[Rim]&lt;/code&gt;) directly from raw tire sidewall photos without any fine-tuning, and act as automated auditors for human-annotated YOLO datasets?&lt;/p&gt;

&lt;p&gt;To measure this, I created a curated test suite of &lt;strong&gt;51 tire sidewall images&lt;/strong&gt; across &lt;strong&gt;22 distinct tire dimensions&lt;/strong&gt; (covering standard horizontal text, steep curved arcs, and rotated positions), backed by verified ground-truth labels.&lt;/p&gt;




&lt;h2&gt;
  
  
  Models Tested
&lt;/h2&gt;

&lt;p&gt;The live Kaggle Benchmark evaluates &lt;strong&gt;11 frontier models&lt;/strong&gt; across 5 AI providers and open-weight architectures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google&lt;/strong&gt;: Gemini 3.8 Flash, Gemini 3.5 Flash-Lite, Gemini 2.5 Pro, and Gemma 4 31B (Open Weights).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anthropic&lt;/strong&gt;: Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI&lt;/strong&gt;: GPT-6.1 Sol and gpt-oss-20b (open-weights).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alibaba&lt;/strong&gt;: Qwen 3 Next 80B Thinking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zhipu AI&lt;/strong&gt;: GLM-5.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;(Note: During task exploration, Gemini 3.7 Flash [46/51], Gemini 3 Flash Preview [45/51], and Claude Sonnet 5 [44/51] were also evaluated on the underlying task. DeepSeek-R1 was correctly rejected by the benchmark runner as a text-only reasoning model lacking a visual encoder, and Grok 4.6 encountered upstream proxy connection timeouts).&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Evaluation Setup &amp;amp; Task Logic
&lt;/h3&gt;

&lt;p&gt;Each model was prompted with an isolated context per image:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Inspect the tire sidewall in this image carefully. Locate the standard ISO metric tire size specification (format: WWW/AARDI, e.g. 205/55R16, 225/60R18, 235/65R17). Return ONLY the exact 9-character tire size code."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The benchmark recorded:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exact String Match&lt;/strong&gt;: Did the full 9-character code match the ground truth?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Component Accuracy&lt;/strong&gt;: Individual correctness of Section Width (mm), Aspect Ratio (%), and Rim Diameter (inches).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Orientation Robustness&lt;/strong&gt;: Performance on horizontal vs. curved/vertical arcs.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Findings
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Leaderboard Results
&lt;/h3&gt;

&lt;p&gt;The table below reflects the official leaderboard from the live Kaggle Benchmark:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rank&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Exact Matches&lt;/th&gt;
&lt;th&gt;Exact Accuracy&lt;/th&gt;
&lt;th&gt;Key Behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#1&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Google Gemini 3.8 Flash&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;46 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;90.20%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tied #1; top multimodal speed &amp;amp; curved text accuracy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#1&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Anthropic Claude Opus 5.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Anthropic&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;46 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;90.20%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tied #1; flagship frontier reasoning &amp;amp; flawless ISO extraction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Google Gemini 3.5 Flash-Lite&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;45 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;88.24%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Exceptional efficiency and accuracy for a lightweight model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Google Gemini 2.5 Pro&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;44 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;86.27%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Deep reasoning; minor slip on worn edge numerals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Google Gemma 4 31B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Google (OSS)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;41 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;80.39%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Best open-weights model; matched Claude 5.5 models&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Anthropic Claude Sonnet 5.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Anthropic&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;41 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;80.39%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Solid reasoning; missed low-contrast rim digits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Anthropic Claude Haiku 5.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Anthropic&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;41 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;80.39%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tied with Sonnet 5.5 at a fraction of latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#8&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;OpenAI GPT-6.1 Sol&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OpenAI&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;39 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;76.47%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tended to confuse scuffed numbers (&lt;code&gt;3&lt;/code&gt; vs &lt;code&gt;2&lt;/code&gt;, &lt;code&gt;4&lt;/code&gt; vs &lt;code&gt;6&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#9&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Alibaba Qwen 3 Next 80B Thinking&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Alibaba&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5.88%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Overthought reasoning; violated strict 9-char constraint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#10&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Zhipu AI GLM-5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Zhipu AI&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.96%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Low parsing accuracy on low-contrast embossments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;#11&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;OpenAI gpt-oss-20b&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OpenAI (OSS)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0 / 51&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.00%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Failed strict 9-character formatting constraint&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note on Kaggle UI Score Display&lt;/strong&gt;: On the Kaggle Benchmarks leaderboard UI, raw numeric scores appear with an automatic × 100% display badge (e.g. &lt;code&gt;46.00&lt;/code&gt; renders as &lt;code&gt;4600.0%&lt;/code&gt; and &lt;code&gt;41.00&lt;/code&gt; renders as &lt;code&gt;4100.0%&lt;/code&gt;, representing 46 and 41 correct items out of 51 total samples, or 90.20% and 80.39%). The table above provides the normalized, exact percentage rates.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Cost vs. Accuracy: The Pareto Frontier
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn0g0pbjqn8u3k5jzp19f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn0g0pbjqn8u3k5jzp19f.png" alt="TireSidewall-Bench: Score vs. Total Cost Pareto" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When deploying vision models in production—such as scanning thousands of tire sidewalls daily across an automotive fleet or recycling facility—raw accuracy must be balanced against inference cost. Kaggle Benchmarks plotted the &lt;strong&gt;Score vs. Total Cost Pareto Frontier&lt;/strong&gt; across all evaluated models:&lt;/p&gt;

&lt;h4&gt;
  
  
  Highlights from the Efficiency Frontier:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Maximum ROI Champion — Claude Haiku 5.5&lt;/strong&gt;: 
Scoring &lt;strong&gt;41 / 51 (80.39%)&lt;/strong&gt; at an ultra-low total evaluation cost of &lt;strong&gt;~$0.005&lt;/strong&gt;, Claude Haiku 5.5 anchors the steep rise of the Pareto frontier. For high-volume automated triage, its cost-per-accuracy ratio is unmatched.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Practical Sweet Spot — Gemini 3.5 Flash-Lite&lt;/strong&gt;:
At only &lt;strong&gt;~$0.02&lt;/strong&gt; for the entire 51-image suite, Gemini 3.5 Flash-Lite achieved &lt;strong&gt;45 / 51 (88.24%)&lt;/strong&gt;, outperforming models costing 5x to 15x more. It sits squarely in the &lt;strong&gt;Efficient&lt;/strong&gt; quadrant.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Peak Performance Frontier — Claude Opus 5.5&lt;/strong&gt;:
Claude Opus 5.5 forms the right anchor of the Pareto frontier, delivering top-tier accuracy of &lt;strong&gt;46 / 51 (90.20%)&lt;/strong&gt; alongside Gemini 3.8 Flash, with flawless formatting precision at &lt;strong&gt;~$0.15&lt;/strong&gt; total cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Inefficient Quadrant&lt;/strong&gt;:
Models like &lt;strong&gt;Qwen 3 Next 80B Thinking&lt;/strong&gt; (~$0.14) and &lt;strong&gt;GLM-5&lt;/strong&gt; (~$0.30) fell into the bottom-right &lt;strong&gt;Inefficient&lt;/strong&gt; quadrant because their internal reasoning traces generated excessive output tokens, running up API costs while failing the strict 9-character extraction constraint.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Key Insights &amp;amp; Surprises
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Zero-Shot VLMs Completely Solved the "Rotation Trap"
&lt;/h4&gt;

&lt;p&gt;In our YOLO dataset, human annotations on rotated or curved tire arcs were often scrambled by bounding-box sorting algorithms (e.g. producing &lt;code&gt;81R06/522&lt;/code&gt; or &lt;code&gt;71R05/522&lt;/code&gt;). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All top-tier frontier VLMs effortlessly read these rotated, curved tires in the correct semantic human reading order&lt;/strong&gt;, outputting &lt;code&gt;225/60R18&lt;/code&gt; and &lt;code&gt;225/50R17&lt;/code&gt; flawlessly. This demonstrates that multimodal LLMs perceive continuous text streams gestalt-style rather than through brittle geometric axis projections.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. The Crown: Gemini 3.8 Flash &amp;amp; Claude Opus 5.5 Tied at #1 (90.20%)
&lt;/h4&gt;

&lt;p&gt;Google's &lt;strong&gt;Gemini 3.8 Flash&lt;/strong&gt; and Anthropic's flagship &lt;strong&gt;Claude Opus 5.5&lt;/strong&gt; shared top honors with identical scores of &lt;strong&gt;46 / 51 (90.20%)&lt;/strong&gt;. While Claude Opus 5.5 demonstrated immense precision in distinguishing faint embossed characters, Gemini 3.8 Flash delivered that same accuracy with lightning-fast inference times.&lt;/p&gt;

&lt;p&gt;Right behind them, Google's lightweight &lt;strong&gt;Gemini 3.5 Flash-Lite&lt;/strong&gt; scored &lt;strong&gt;45 / 51 (88.24%)&lt;/strong&gt;, outperforming heavyweights like Gemini 2.5 Pro (44 / 51) and GPT-6.1 Sol (39 / 51)—proving that specialized vision distillation can outperform pure model parameter scale.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Gemma 4 31B: A Triumph for Open-Weights Industrial Vision
&lt;/h4&gt;

&lt;p&gt;One of the most exciting results is &lt;strong&gt;Gemma 4 31B&lt;/strong&gt; scoring &lt;strong&gt;80.39% (41 / 51)&lt;/strong&gt;. It matched proprietary frontier flagships &lt;strong&gt;Claude Sonnet 5.5&lt;/strong&gt; and &lt;strong&gt;Claude Haiku 5.5&lt;/strong&gt;, while beating &lt;strong&gt;OpenAI GPT-6.1 Sol (76.47%)&lt;/strong&gt;. For manufacturing plants and tire depots requiring local, on-premise execution without cloud API dependency, Gemma 4 31B offers production-grade zero-shot OCR capability.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Claude Haiku 5.5 Punched Way Above Its Weight
&lt;/h4&gt;

&lt;p&gt;Anthropic's &lt;strong&gt;Claude Haiku 5.5&lt;/strong&gt; tied &lt;strong&gt;Claude Sonnet 5.5&lt;/strong&gt; exactly at &lt;strong&gt;41 / 51 (80.39%)&lt;/strong&gt;. Getting flagship-grade multimodal OCR accuracy at Haiku's speed and cost profile makes it an exceptional candidate for high-throughput batch auditing.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. The "Reasoning Model Trap" on Pure Extraction Tasks
&lt;/h4&gt;

&lt;p&gt;A fascinating divergence occurred with &lt;strong&gt;Qwen 3 Next 80B Thinking&lt;/strong&gt; (3 / 51, 5.88%):&lt;br&gt;
While reasoning and "thinking" architectures excel at multi-step mathematics and coding, they frequently failed this pure extraction benchmark because their outputs included internal reasoning preambles, chain-of-thought commentary, or Markdown wrappers (e.g.,&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;```text\n205/55R16\n```&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
) rather than adhering strictly to the required bare 9-character string.&lt;/p&gt;

&lt;h4&gt;
  
  
  6. The Dominant Physical Failure Mode: Low-Contrast Width Digits
&lt;/h4&gt;

&lt;p&gt;Across the ~10% of cases where top models failed, the errors were &lt;strong&gt;not&lt;/strong&gt; random hallucinations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In Sample 39 (&lt;code&gt;235/45R18&lt;/code&gt;), models predicted &lt;code&gt;225/45R18&lt;/code&gt; (confusing a scuffed embossed &lt;code&gt;3&lt;/code&gt; with a &lt;code&gt;2&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;In Sample 34 (&lt;code&gt;245/50R20&lt;/code&gt;), models predicted &lt;code&gt;265/50R20&lt;/code&gt; (confusing &lt;code&gt;4&lt;/code&gt; with &lt;code&gt;6&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;In Sample 29 (&lt;code&gt;255/60R18&lt;/code&gt;), models misread the width and rim on a heavily worn sidewall.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice that in almost every failure case, the &lt;strong&gt;Aspect Ratio&lt;/strong&gt; and &lt;strong&gt;Construction ('R')&lt;/strong&gt; remained 100% correct. The error was almost exclusively an off-by-ten millimeter width confusion caused by low-contrast black rubber embossments.&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Automated Dataset Auditing Potential
&lt;/h4&gt;

&lt;p&gt;During benchmark preparation, we discovered a human labeling typo in our original dataset where an annotator typed &lt;code&gt;3&lt;/code&gt; instead of &lt;code&gt;R&lt;/code&gt; (&lt;code&gt;255/60318&lt;/code&gt;). During inference, the models naturally output &lt;code&gt;255/60R18&lt;/code&gt; based on semantic domain awareness of tire codes, proving that VLMs can serve as effective automated validation auditors for industrial labeling pipelines.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Benchmark
&lt;/h2&gt;

&lt;p&gt;You can inspect the full benchmark, code, and live evaluation runs directly on Kaggle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Benchmark Page&lt;/strong&gt;: &lt;a href="https://www.kaggle.com/benchmarks/inushathathsara/tiresidewall-bench-multimodal-zero-shot-tire-ocr" rel="noopener noreferrer"&gt;TireSidewall-Bench on Kaggle&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Task &amp;amp; Model Leaderboard&lt;/strong&gt;: &lt;a href="https://www.kaggle.com/benchmarks/tasks/inushathathsara/tire-sidewall-ocr/1" rel="noopener noreferrer"&gt;tire-sidewall-ocr Task Details&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model Comparison View&lt;/strong&gt;: &lt;a href="https://www.kaggle.com/benchmarks/tasks/inushathathsara/tire-sidewall-ocr?compare=true" rel="noopener noreferrer"&gt;Interactive Model Compare&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benchmark Dataset&lt;/strong&gt;: &lt;a href="https://www.kaggle.com/datasets/inushathathsara/tire-sidewall-benchmark-dataset" rel="noopener noreferrer"&gt;Tire Sidewall Benchmark Dataset on Kaggle&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>kagglechallenge</category>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Gemmate: The Open-Weight Voice Study Companion That Unmasks Exam Traps</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Sun, 04 Oct 2026 16:45:35 +0000</pubDate>
      <link>https://dev.to/inushathathsara/gemmate-the-open-weight-voice-study-companion-that-unmasks-exam-traps-2hmp</link>
      <guid>https://dev.to/inushathathsara/gemmate-the-open-weight-voice-study-companion-that-unmasks-exam-traps-2hmp</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Every semester, my close friend in engineering pulls grueling all-nighters preparing for advanced technical exams. They don't struggle with understanding the core equations; they struggle with the deceptive traps examiners deliberately design into the questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sneaky boundary conditions (e.g., $N = 0$, null pointers, or unsigned integer underflows).&lt;/li&gt;
&lt;li&gt;Unit mismatches and hidden assumptions buried inside paragraphs of academic prose.&lt;/li&gt;
&lt;li&gt;Time-panic questions designed to bait students into choosing the most obvious—yet totally wrong—distractor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When studying at 2:00 AM, my friend's anxiety peaks. Standard chatbots like ChatGPT fail them completely: when asked for help, they immediately dump long walls of text containing the direct final answer. That robs a student of the chance to build problem-solving intuition, and reading dense markdown blocks on a screen only increases their cognitive exhaustion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I built Gemmate for them.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemmate&lt;/strong&gt; is an empathetic, open-weight AI voice companion designed to turn exam panic into calm mastery. When a student uploads a photo of a tricky exam question or pastes a problem statement, Gemmate &lt;strong&gt;never spoils the solution&lt;/strong&gt;. Instead, it acts like a kind, brilliant senior peer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;💡 &lt;strong&gt;Core Theory Analysis&lt;/strong&gt;: Identifies the fundamental underlying principles required to solve the problem.&lt;/li&gt;
&lt;li&gt;💀 &lt;strong&gt;The Trap(s)&lt;/strong&gt;: Explicitly calls out the misleading phrasing, deceptive edge cases, or false assumptions examiners set up to mislead students.&lt;/li&gt;
&lt;li&gt;⚔️ &lt;strong&gt;Actionable Attack Plan&lt;/strong&gt;: Lays out a systematic 3-to-4 step blueprint to solve the problem methodically.&lt;/li&gt;
&lt;li&gt;🎙️ &lt;strong&gt;Socratic Voice Hints&lt;/strong&gt;: Powered by ElevenLabs, Gemmate speaks comforting, bite-sized hints out loud—encouraging the student to take the next step without revealing the formula.&lt;/li&gt;
&lt;li&gt;📝 &lt;strong&gt;Dynamic Practice Variant&lt;/strong&gt;: Generates a brand-new practice problem testing the exact same concepts and traps with fresh variables so the student can prove they've mastered it.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🌐 Live Production Website&lt;/strong&gt;: &lt;a href="https://gemmate.inusha.me" rel="noopener noreferrer"&gt;https://gemmate.inusha.me&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment Platform&lt;/strong&gt;: Vercel Serverless Edge Architecture with KaTeX math rendering and ElevenLabs voice streaming.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Highlights of the Experience:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Spoiler Guarantee&lt;/strong&gt;: The system prompt strictly prohibits generating direct answers, enforcing deep pedagogical scaffolding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Glassmorphic Cyber-Ambient UI&lt;/strong&gt;: Tailored for late-night study sessions with sleek dark mode, glowing crystal accents, soundwave visualizers, and zero eye strain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full LaTeX Math Support&lt;/strong&gt;: Complex formulas and matrices render with pixel-perfect KaTeX typography.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audio Companion&lt;/strong&gt;: Real-time ElevenLabs voice playback turns silent stress into a soothing study session.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The complete source code for Gemmate is open-source under the MIT license:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/inusha-thathsara" rel="noopener noreferrer"&gt;
        inusha-thathsara
      &lt;/a&gt; / &lt;a href="https://github.com/inusha-thathsara/Gemmate" rel="noopener noreferrer"&gt;
        Gemmate
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Open-source voice study companion for cracking exam traps. Powered by Google Gemma &amp;amp; ElevenLabs. Built for a Friend for DEV Hacktoberfest 2026.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;💎 Gemmate: Open-Source Voice Companion for Cracking Exam Traps&lt;/h1&gt;
&lt;/div&gt;
&lt;div&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/inusha-thathsara/Gemmate/public/icon.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Finusha-thathsara%2FGemmate%2FHEAD%2Fpublic%2Ficon.png" width="128" height="128" alt="Gemmate Logo"&gt;&lt;/a&gt;
  &lt;br&gt;
  &lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Your open-weight voice study partner for mastering deceptive exam questions.&lt;/h3&gt;
&lt;/div&gt;
  &lt;p&gt;&lt;strong&gt;Built for the DEV Hacktoberfest 2026 Challenge: Build for a Friend&lt;/strong&gt;&lt;/p&gt;
  &lt;p&gt;
    &lt;a href="https://gemmate.inusha.me" rel="nofollow noopener noreferrer"&gt;&lt;strong&gt;🌐 Live Demo: gemmate.inusha.me&lt;/strong&gt;&lt;/a&gt; •
    &lt;a href="https://github.com/inusha-thathsara/Gemmate" rel="noopener noreferrer"&gt;&lt;strong&gt;📦 GitHub Repository&lt;/strong&gt;&lt;/a&gt;
  &lt;/p&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;📖 Why Gemmate?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;For students preparing for high-stakes technical exams, deceptive questions frequently trigger acute exam anxiety:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deceptive edge cases (e.g. assuming worst-case hash collisions are $O(1)$)&lt;/li&gt;
&lt;li&gt;Subtly contradictory boundary constraints and unit tricks&lt;/li&gt;
&lt;li&gt;Overwhelming blocks of text designed to induce time panic&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Generic AI tools fail students: pasting a question into standard chatbots dumps walls of final answers, robbing them of the chance to learn how to deconstruct traps. Furthermore, expensive subscription fees and spotty Wi-Fi in underground library basements make cloud-only assistants unreliable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gemmate&lt;/strong&gt; solves this: an empathetic, open-weight AI companion that &lt;strong&gt;never reveals direct answers&lt;/strong&gt;. Instead, it uses &lt;strong&gt;Google Gemma&lt;/strong&gt; to triage the problem into an actionable Attack…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/inusha-thathsara/Gemmate" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository&lt;/strong&gt;: &lt;a href="https://github.com/inusha-thathsara/Gemmate" rel="noopener noreferrer"&gt;https://github.com/inusha-thathsara/Gemmate&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stack&lt;/strong&gt;: Next.js 16 (App Router, Turbopack), React 19, TypeScript, Framer Motion, KaTeX, ElevenLabs SDK, Google Generative AI SDK, and local Ollama engine.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;Gemmate is designed from the ground up around &lt;strong&gt;Google's Open-Weight Gemma models&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ┌────────────────────────────────────────────────────────┐
 │           Student: Past Exam Paper / Photo             │
 └───────────────────────────┬────────────────────────────┘
                             │
                             ▼
 ┌────────────────────────────────────────────────────────┐
 │           Gemmate Frontend (Next.js 16)                │
 │    Client-Side Image Compression &amp;amp; Glassmorphic UI     │
 └───────────────────────────┬────────────────────────────┘
                             │
                             ▼
 ┌────────────────────────────────────────────────────────┐
 │        API Route Orchestrator (/api/triage)            │
 └─────────────┬───────────────────────────┬──────────────┘
               │                           │
    (Offline / Local)              (Cloud / Production)
               │                           │
               ▼                           ▼
 ┌───────────────────────────┐   ┌────────────────────────┐
 │  Local Ollama Runtime     │   │  Google Hosted Cloud   │
 │  - Gemma 3 / 4 (1B/31B)   │   │  - Gemma 4 (31B-IT)    │
 │  - Moondream Vision       │   │  - Flash Vision OCR    │
 └─────────────┬─────────────┘   └─────────┬──────────────┘
               │                           │
               └─────────────┬─────────────┘
                             │
                             ▼
 ┌────────────────────────────────────────────────────────┐
 │      Structured JSON Extraction:                       │
 │      Core Concepts • The Trap • Attack Plan            │
 └───────────────────────────┬────────────────────────────┘
                             │
                             ▼
 ┌────────────────────────────────────────────────────────┐
 │      ElevenLabs Audio Engine (Turbo v2.5)              │
 │      Human-Like Socratic Voice Hints &amp;amp; Audio Streams   │
 └────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  1. The Open-Weight AI Core (Google Gemma)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Air-Gapped Mode&lt;/strong&gt;: Using &lt;strong&gt;Ollama&lt;/strong&gt;, students can run &lt;code&gt;gemma3:1b&lt;/code&gt; or &lt;code&gt;gemma4:31b-it&lt;/code&gt; alongside &lt;code&gt;moondream&lt;/code&gt; locally on consumer laptop GPUs. This enables sub-second responses with zero internet connection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Hosted Mode&lt;/strong&gt;: On the web deployment, Gemmate leverages Google's hosted &lt;strong&gt;Gemma 4 (&lt;code&gt;gemma-4-31b-it&lt;/code&gt;)&lt;/strong&gt; open-weights to perform deep theoretical deconstructions of complex mathematical and algorithmic proofs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured JSON Schema&lt;/strong&gt;: Gemma is instructed via strict schema constraints to separate the theory, the deceptive trap, and the attack steps into parseable JSON.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  2. High-Performance Vision OCR
&lt;/h3&gt;

&lt;p&gt;Exam questions often exist only on paper past-exam handouts or lecture slides. Gemmate accepts up to 3 photos concurrently, compresses them client-side in HTML5 canvas to prevent payload bloat, and processes them in parallel using high-fidelity vision models to transcribe formulas and diagrams into pristine LaTeX markdown.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Voice Intelligence with ElevenLabs
&lt;/h3&gt;

&lt;p&gt;Reading dense screens at 2 AM induces eye fatigue and mental blocks. Gemmate integrates ElevenLabs Turbo v2.5 with in-memory audio caching. Hints and attack plans are converted into comforting, natural speech that sounds like a supportive friend talking you through the problem.&lt;/p&gt;


&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Building with &lt;strong&gt;open-source AI and open-weight models&lt;/strong&gt; wasn't just a technical preference—it was the only way this project could truly succeed:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. 100% Privacy for Sensitive Student Work
&lt;/h3&gt;

&lt;p&gt;University honor codes and exam confidentiality mean students should never paste unpublished past papers, professor problem sets, or graded assignments into closed commercial LLMs that use user queries for proprietary retraining. With open-weight Gemma running locally on a student's machine, &lt;strong&gt;their data never leaves their laptop&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. True Offline Accessibility in Exam Study Basements
&lt;/h3&gt;

&lt;p&gt;University libraries, basement study halls, and dormitories are notorious for dead Wi-Fi zones. Closed API-dependent applications become useless bricks the moment the connection drops. Because Gemma runs natively via Ollama, Gemmate can run completely air-gapped on a plane, on a train, or in an underground library cubicle.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Democratizing Education Without Subscription Tollgates
&lt;/h3&gt;

&lt;p&gt;Closed commercial frontier models charge $20/month subscriptions or per-token API fees that student budgets cannot sustain. Open innovation means students everywhere have unlimited access to world-class reasoning without artificial usage caps or surprise credit card bills.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Customizability and Fine-Tuning
&lt;/h3&gt;

&lt;p&gt;With open weights, educators and students can fine-tune Gemma specifically on their university's syllabus, curriculum notation, or regional examination styles (e.g., JEE, AP, IB, Cambridge A-Levels)—something impossible with closed black-box models.&lt;/p&gt;


&lt;h2&gt;
  
  
  What My Friend Said When I Handed It Over
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Usually when I get stuck on a past paper, I stare at the question for an hour getting more and more panicked, or I cheat and look up the answer sheet, which makes me feel like an idiot. Gemmate is the first tool that actually pointed out the trick in the question without giving away the answer. Having the voice explain the trap out loud made my chest unfreeze."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Seeing their stress melt away made every line of code worthwhile.&lt;/p&gt;


&lt;h2&gt;
  
  
  🌐 Community Wisdom
&lt;/h2&gt;

&lt;p&gt;During the design and implementation of Gemmate, insights from the broader developer community on &lt;a href="https://dev.to"&gt;dev.to&lt;/a&gt; helped shape our architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://dev.to"&gt;Running Open LLMs Locally with Ollama&lt;/a&gt;&lt;/strong&gt;: Community discussions highlighted the value of quantization and lightweight open models (like Gemma 1B and 4B) for responsive local laptop execution, keeping RAM usage under 4 GB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://dev.to"&gt;Socratic Pedagogy vs Answer Generators&lt;/a&gt;&lt;/strong&gt;: Educational engineering articles on DEV demonstrated that preventing LLMs from emitting final answers requires rigorous two-stage system prompt constraints with structured JSON schemas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://dev.to"&gt;Client-Side Image Pre-Processing for Serverless&lt;/a&gt;&lt;/strong&gt;: Patterns for compressing high-resolution phone photos in the browser before dispatching to Next.js API routes prevented 413 payload errors on Vercel's edge network.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Overall Winner&lt;/strong&gt;: Hacktoberfest Weekend Challenge: Build for a Friend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma&lt;/strong&gt;: Built around Google's open-weight Gemma models (&lt;code&gt;gemma-4-31b-it&lt;/code&gt; / &lt;code&gt;gemma3:1b&lt;/code&gt;) as the core reasoning engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of ElevenLabs&lt;/strong&gt;: Featuring real-time ElevenLabs Socratic audio generation and empathetic vocal coaching.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  🤖 Agent Session
&lt;/h2&gt;

&lt;p&gt;This project was built with the help of an AI pair-programming session. Below is the full transcript of how we debugged deployments, fixed the vision pipeline, audited branding, and wrote this very submission — all in one continuous session:&lt;/p&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Gemini CLI"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Building Gemmate: An Open-Weight AI Study Companion for Hacktoberfest&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;I deployed the app on &lt;a href="https://gemmate.vercel.app" rel="noopener noreferrer"&gt;https://gemmate.vercel.app&lt;/a&gt; but it shows these errors.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Investigating the Vercel deployment errors — the main issues are: 1) Next.js Image component can't optimize external brand icons in serverless, 2) Groq Vision API is decommissioned, and 3) Gemini API key validation errors.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-viewfile"&gt;view_file&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;lib/gemmaEnv.ts&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;gemmaEnv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ts&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Found&lt;/span&gt; &lt;span class="nx"&gt;vision&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="nx"&gt;using&lt;/span&gt; &lt;span class="nx"&gt;decommissioned&lt;/span&gt; &lt;span class="nx"&gt;Groq&lt;/span&gt; &lt;span class="nx"&gt;llama&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;3.2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;vision&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;preview&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;So you changed the model for Gemma, Gemini, right? The challenge is that we have to use Gemma — if we deploy the project on Gemini, that would not be suitable for the challenge, right?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Gemma and Gemini are different things. Gemma is Google's open-weight model family (like gemma-4-31b-it) — perfect for the challenge. Gemini is the proprietary closed model. Our architecture uses Google AI Studio to HOST the Gemma open-weight models in the cloud, which is fully compliant with the 'Best Use of Gemma' prize category. The core reasoning runs on open-weights; the API is just the delivery mechanism.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;There are still Bora mentions in the GitHub repo description. Remove every mention related to Bora.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Running a full audit for 'Bora' across the entire codebase, README, submission, and package.json.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-grepsearch"&gt;grep_search&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Bora&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Bora&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Found in README.md, package.json description, and API comments&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-multireplacefilecontent"&gt;multi_replace_file_content&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Remove all Bora references from README.md, package.json, and API routes&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Remove all Bora references from README.md, package.json, and API routes&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Successfully removed all Bora branding — project fully rebranded as Gemmate&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Why is it failing to read the given images?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Root cause: Groq's llama-3.2-11b-vision-preview is officially decommissioned and returning 404s. The fix is to switch vision OCR entirely to Google AI Studio's Gemini Flash vision models, which support multimodal image input and handle LaTeX/formula-heavy exam paper transcription far better. Also parallelized the image processing with Promise.all() to handle up to 3 concurrent exam photos.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-multireplacefilecontent"&gt;multi_replace_file_content&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Update gemmaEnv.ts vision pipeline to use gemini-flash-latest&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Update gemmaEnv.ts vision pipeline to use gemini-flash-latest&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Vision pipeline updated: gemini-1.5-flash-latest to gemini-flash-latest, parallelized with Promise.all()&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;App is deployed on &lt;a href="https://gemmate.inusha.me" rel="noopener noreferrer"&gt;https://gemmate.inusha.me&lt;/a&gt; — complete the devsubmission.md file.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Drafting the full DEV Hacktoberfest Weekend Challenge submission. The article covers: the real friend story (engineering exam panic), the Zero-Spoiler design philosophy, the full open-weight Gemma architecture (Ollama local + Google AI Studio cloud), the ElevenLabs voice integration, and the open innovation rationale (privacy, offline access, democratized education).&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-writetofile"&gt;write_to_file&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;DEV_SUBMISSION.md with all challenge sections&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;DEV_SUBMISSION.md with all challenge sections&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Complete 149-line submission created with architecture diagram, friend quote, community wisdom section, and prize category entries&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;can we embed using devrelay?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Yes! Reading the devrelay-sessions SKILL.md — we can use submit_agent_session to save this session transcript to DEV, then embed it in the submission article using the Liquid tag. Submitting now with curated highlights of our build session.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;option 2 — register the DevRelay MCP server in Antigravity&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Running the DevRelay Windows installer, downloading dev_mlh_mcp_server.exe v0.1.17, and writing the devrelay-gateway entry into ~/.gemini/config/mcp_config.json so all future Antigravity sessions have direct access to DevRelay MCP tools.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-runcommand"&gt;run_command&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;DevRelay installer (install.ps1)&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ DevRelay installer (install.ps1)&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Binary installed at C:\Users\inush\.devrelay\bin\dev_mlh_mcp_server.exe, MCP config updated, MCP server responding to JSON-RPC&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        14 of 12 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>DocuMind: Intelligent Real-Time AI Documentation &amp; Technical Knowledge Agent</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Sun, 04 Oct 2026 13:26:50 +0000</pubDate>
      <link>https://dev.to/inushathathsara/documind-intelligent-real-time-ai-documentation-technical-knowledge-agent-5bcl</link>
      <guid>https://dev.to/inushathathsara/documind-intelligent-real-time-ai-documentation-technical-knowledge-agent-5bcl</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/sanity-2026-09-16"&gt;Sanity Challenge, Path One: Ship an Agent That Queries Real Content&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Transforming static developer documentation and technical publications into an interactive, grounded AI agent with verifiable source citations and automated bidirectional synchronization.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;In modern engineering teams, &lt;strong&gt;documentation fragmentation&lt;/strong&gt; is a chronic drain on developer velocity. Architectural decisions, API schemas, installation walkthroughs, and troubleshooting guides end up scattered across static Markdown files, external developer blogging platforms (like DEV.to), and disconnected internal wikis. When developers encounter roadblocks, they waste hours manually hunting through multiple articles or asking generic AI models that frequently hallucinate out-of-date answers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DocuMind&lt;/strong&gt; solves this by unifying static technical publications into a dynamic, conversational AI documentation partner. &lt;/p&gt;

&lt;p&gt;Powered by &lt;strong&gt;Next.js 15&lt;/strong&gt;, &lt;strong&gt;Sanity CMS Content Lake&lt;/strong&gt;, and &lt;strong&gt;Google Gemini AI&lt;/strong&gt;, DocuMind allows engineers to query complex architectures, code implementations, and technical topics using natural language. &lt;/p&gt;

&lt;h3&gt;
  
  
  🌟 Key Highlights
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Grounded AI Reasoning (RAG Without Hallucinations):&lt;/strong&gt; Instead of relying on general model weights, DocuMind retrieves exact Portable Text blocks from Sanity via structured GROQ queries. Gemini is constrained to answer &lt;em&gt;strictly&lt;/em&gt; using the retrieved documents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verifiable Source Attribution:&lt;/strong&gt; Every response includes clickable &lt;strong&gt;Source Cards&lt;/strong&gt; linking directly to the full Sanity-backed article reader, allowing users to cross-check claims with the original text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated DEV.to Synchronization:&lt;/strong&gt; DocuMind isn't a one-off import. It includes:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-time Webhook Receiver:&lt;/strong&gt; Ingests newly published DEV.to Markdown and converts it into structured Sanity Portable Text blocks automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Demand Sync Button:&lt;/strong&gt; Triggers real-time content reconciliation directly from the UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated GitHub Action:&lt;/strong&gt; Scheduled background synchronization running every 6 hours.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Documentation Browser:&lt;/strong&gt; A dedicated &lt;code&gt;/browse&lt;/code&gt; portal allowing developers to explore articles by tags and categories with full syntax highlighting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern Glassmorphic UI:&lt;/strong&gt; Built with dark-mode aesthetic design tokens, smooth micro-interactions, and streaming responses for sub-second perceived latency.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Web App:&lt;/strong&gt; &lt;a href="https://documind.inusha.me" rel="noopener noreferrer"&gt;https://documind.inusha.me&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Sanity Studio:&lt;/strong&gt; &lt;a href="https://documind.inusha.me/studio" rel="noopener noreferrer"&gt;https://documind.inusha.me/studio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/inusha-thathsara/documind" rel="noopener noreferrer"&gt;https://github.com/inusha-thathsara/documind&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sanity Public Query:&lt;/strong&gt; &lt;code&gt;https://j5tvnuy8.api.sanity.io/v2024-01-01/data/query/production?query=*[_type=="doc"]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🖥️ Key Routes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/chat&lt;/code&gt;&lt;/strong&gt;: Fullscreen conversational AI interface with streaming responses and citation badges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/browse&lt;/code&gt;&lt;/strong&gt;: Complete knowledge base grid with category filters and tag search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/browse/[slug]&lt;/code&gt;&lt;/strong&gt;: High-fidelity article reader with rich Portable Text rendering and syntax highlighting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/api/sync&lt;/code&gt;&lt;/strong&gt;: On-demand synchronization engine connecting external feeds to Sanity.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The entire codebase is open-source and structured as a monorepo containing both the Next.js 15 frontend application and the Sanity Studio v3 workspace:&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/inusha-thathsara/documind" rel="noopener noreferrer"&gt;https://github.com/inusha-thathsara/documind&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🏗️ Architecture
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                       ┌─────────────────────────┐
                       │     User Interface      │
                       │  (Next.js 15 App Router)│
                       └───────────┬─────────────┘
                                   │
                     Natural Query │ Streaming Response
                                   ▼
                       ┌─────────────────────────┐
                       │       /api/chat         │
                       │   Token Ranker &amp;amp; RAG    │
                       └─────┬─────────────┬─────┘
                             │             │
         GROQ Context Query  │             │ Grounded Context
                             ▼             ▼
              ┌─────────────────────┐   ┌─────────────────────┐
              │     Sanity CMS      │   │    Google Gemini    │
              │    (Content Lake)   │   │   (Generative AI)   │
              └─────────────────────┘   └─────────────────────┘
                             ▲
                             │ Webhook / API Ingestion
              ┌──────────────┴──────┐
              │    DEV.to Platform  │
              │  (Technical Posts)  │
              └─────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How I Used Sanity
&lt;/h2&gt;

&lt;p&gt;Sanity forms the single source of truth and structured knowledge foundation for DocuMind.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Structured Content Modeling (Sanity Studio v3)
&lt;/h3&gt;

&lt;p&gt;Rather than treating articles as arbitrary blobs of text, I designed a specialized &lt;code&gt;doc&lt;/code&gt; schema in Sanity Studio (&lt;a href="https://github.com/inusha-thathsara/documind/blob/main/studio/schemas/doc.js" rel="noopener noreferrer"&gt;&lt;code&gt;studio/schemas/doc.js&lt;/code&gt;&lt;/a&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;doc&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Documentation Article&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;document&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;validation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Rule&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;Rule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;required&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;slug&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Slug&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;slug&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;maxLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;96&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; 
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;category&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Category&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;list&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Architecture&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Guides&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DevOps &amp;amp; Cloud&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Web3 &amp;amp; Blockchain&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AI &amp;amp; Machine Learning&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; 
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Description / Summary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tags&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Tags&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;array&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;of&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;body&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Body Content&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;array&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;of&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;block&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;code&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;publishedAt&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Published At&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;datetime&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Populating with Real, High-Value Content
&lt;/h3&gt;

&lt;p&gt;For Path 1, authentic data is essential. I pointed DocuMind at &lt;strong&gt;25 real technical engineering articles&lt;/strong&gt; from my published library on DEV.to (&lt;code&gt;@inushathathsara&lt;/code&gt;), spanning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large-scale Cloud &amp;amp; GKE infrastructure&lt;/li&gt;
&lt;li&gt;Next.js 15 &amp;amp; React Server Components&lt;/li&gt;
&lt;li&gt;Web3 architectural paradigms&lt;/li&gt;
&lt;li&gt;ML model optimization &amp;amp; data pipelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wrote a custom &lt;strong&gt;Markdown-to-PortableText engine&lt;/strong&gt; (&lt;a href="https://github.com/inusha-thathsara/documind/blob/main/web/scripts/import-devto.mjs" rel="noopener noreferrer"&gt;&lt;code&gt;web/scripts/import-devto.mjs&lt;/code&gt;&lt;/a&gt;) that parses markdown headings, paragraphs, lists, links, and code blocks into valid Sanity Portable Text blocks with syntax attributes.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Grounded Retrieval via GROQ
&lt;/h3&gt;

&lt;p&gt;When a user submits a query in the chat interface:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The server extracts high-signal semantic tokens from the user's prompt.&lt;/li&gt;
&lt;li&gt;A fast &lt;strong&gt;GROQ query&lt;/strong&gt; retrieves the most relevant articles from the Sanity Content Lake based on keyword relevance across &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, and &lt;code&gt;tags&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*[_type == "doc" &amp;amp;&amp;amp; (
  title match $keyword || 
  description match $keyword || 
  tags[] match $keyword
)][0...4]{
  _id,
  title,
  "slug": slug.current,
  category,
  description,
  tags,
  "plainText": pt::text(body)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;The retrieved plain-text context is passed into &lt;strong&gt;Google Gemini&lt;/strong&gt; with a strict grounding prompt instructing the model to act as a technical documentation partner and only formulate answers based on the provided Sanity articles.&lt;/li&gt;
&lt;li&gt;If a concept is not present in the Knowledge Base, the model explicitly acknowledges that the docs do not contain this information rather than hallucinating.&lt;/li&gt;
&lt;li&gt;The response is streamed back along with structured citation cards containing the document's &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;category&lt;/code&gt;, and &lt;code&gt;slug&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Sanity Project Details
&lt;/h2&gt;

&lt;p&gt;The Sanity dataset is publicly configured and accessible for judges to review schema definitions and documents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sanity Project ID:&lt;/strong&gt; &lt;code&gt;j5tvnuy8&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset:&lt;/strong&gt; &lt;code&gt;production&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Version:&lt;/strong&gt; &lt;code&gt;2024-01-01&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public API Query Endpoint:&lt;/strong&gt;
&lt;a href="https://j5tvnuy8.api.sanity.io/v2024-01-01/data/query/production?query=*[_type==%22doc%22]{title,slug,category,tags}" rel="noopener noreferrer"&gt;&lt;code&gt;https://j5tvnuy8.api.sanity.io/v2024-01-01/data/query/production?query=*[_type=="doc"]{title,slug,category,tags}&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Agent Session
&lt;/h2&gt;

&lt;p&gt;During the development of DocuMind, I leveraged the &lt;strong&gt;Google Antigravity IDE&lt;/strong&gt; pair-programming agent across the entire lifecycle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Architecture &amp;amp; Planning:&lt;/strong&gt; Collaborated on an initial implementation plan outlining the schema requirements, API route structures, and token ranking logic before writing code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RAG &amp;amp; Portable Text Parser:&lt;/strong&gt; Used Antigravity to build the regex-based Markdown-to-PortableText transformer, ensuring that raw markdown code fences, headers, and bulleted lists correctly converted into Sanity block specs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Webhook &amp;amp; GitHub Action:&lt;/strong&gt; Generated the automated ingestion pipeline (&lt;code&gt;.github/workflows/sync-devto.yml&lt;/code&gt; and &lt;code&gt;/api/webhooks/devto&lt;/code&gt;) to keep Sanity in sync with external publications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing &amp;amp; UI Verification:&lt;/strong&gt; Used Antigravity's browser automation subagents to test the end-to-end user query flow, verifying streaming responses, citation badge clicks, and server-side rendering performance.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Author &amp;amp; Acknowledgements
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Built by Malawige Inusha Thathsara Gunasekara&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DEV.to Profile:&lt;/strong&gt; &lt;a href="https://dev.to/inushathathsara"&gt;@inushathathsara&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/inusha-thathsara" rel="noopener noreferrer"&gt;@inusha-thathsara&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/inusha-gunasekara-9996632a5/" rel="noopener noreferrer"&gt;inusha-gunasekara&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Special thanks to the DEV.to and Sanity.io teams for hosting this challenge!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>sanitychallenge</category>
      <category>sanity</category>
      <category>ai</category>
    </item>
    <item>
      <title>Building an Enterprise Climate Intelligence OS</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Thu, 24 Sep 2026 22:02:15 +0000</pubDate>
      <link>https://dev.to/inushathathsara/building-an-enterprise-climate-intelligence-os-12eh</link>
      <guid>https://dev.to/inushathathsara/building-an-enterprise-climate-intelligence-os-12eh</guid>
      <description>&lt;h2&gt;
  
  
  How We Won 1st Place at CodeFest Datathon 2026: Building an Enterprise Carbon Intelligence OS
&lt;/h2&gt;

&lt;p&gt;Winning 1st place at the &lt;strong&gt;SLIIT CodeFest Datathon 2026&lt;/strong&gt; was one of the most intense, rewarding engineering sprints our team has ever experienced. &lt;/p&gt;

&lt;p&gt;When most people hear "Datathon," they imagine tuning hyperparameters on an XGBoost model to squeeze out an extra 0.001 on an F₁ score. But this competition was fundamentally different. The challenge tasked us with acting as an elite climate and quantitative consultancy to solve a massive real-world crisis: &lt;strong&gt;The multi-billion-dollar financial risk of the global Net-Zero transition.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We were given historical climate, emissions, energy mix, and carbon pricing datasets spanning 2000 to 2026, across 5 international emissions trading systems and 50 countries. &lt;/p&gt;

&lt;p&gt;Rather than stopping at exploratory notebooks, we designed, validated, and shipped &lt;strong&gt;CarbonPulse OS&lt;/strong&gt;—an end-to-end Enterprise Carbon Risk &amp;amp; Transition Intelligence Operating System, complete with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;30-Day Allowance Price Forecasting&lt;/strong&gt; (Classical ARIMA achieving 2.64% average MAPE).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Empirical Event Shock Radar&lt;/strong&gt; (Scientifically rejecting H₀ by proving climate disasters and policy summits quantitatively move carbon prices).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stoichiometric Combustion Simulator&lt;/strong&gt; (R² = 0.945 Random Forest grounded in physical chemistry).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Country Transition Scenario Engine&lt;/strong&gt; (K-Means archetypes projecting 2026–2030 decarbonization pathways).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Live, Interactive Web MVP&lt;/strong&gt; with 1-click automated TCFD &amp;amp; CSRD compliance audit exports.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F08gxwas5ti2tgcpc7af5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F08gxwas5ti2tgcpc7af5.png" alt="CarbonPulse OS Solution Architecture" width="800" height="504"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 1: Full 4-tier system architecture of CarbonPulse OS connecting raw data ingestion to enterprise delivery.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this deep dive, I'm sharing our complete technical playbook, the counter-intuitive machine learning breakthroughs we discovered, our solution architecture, and the presentation strategy that took us to the top of the podium—&lt;strong&gt;without exposing any private competition datasets&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Macro Problem: Carbon is a Balance Sheet Liability
&lt;/h2&gt;

&lt;p&gt;For decades, corporate carbon footprinting was relegated to glossy Corporate Social Responsibility (CSR) brochures. But today, under statutory Cap-and-Trade compliance systems (EU ETS, UK ETS, California Cap-and-Trade, China ETS), carbon is a &lt;strong&gt;statutory, multi-billion-dollar financial liability&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Under the European Union Emissions Trading System (EU ETS):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Emitting &lt;strong&gt;1 metric ton of CO₂&lt;/strong&gt; costs upwards of &lt;strong&gt;€80 to €100&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A mid-sized industrial emitter producing 1,500,000 tons of CO₂ faces an annual compliance liability exceeding &lt;strong&gt;€120 Million&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;When unexpected regulatory tightening or extreme weather hits, allowance prices can swing by &lt;strong&gt;±15%&lt;/strong&gt; in under three weeks—triggering &lt;strong&gt;unbudgeted multi-million-dollar cash drains&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yet, when we investigated legacy enterprise tooling (Bloomberg Terminal, MSCI ESG, S&amp;amp;P Trucost), we noticed a glaring market failure: &lt;strong&gt;existing tools only offer static, backward-looking annual survey scores&lt;/strong&gt;. Energy trading desks and Chief Sustainability Officers (CSOs) had zero daily predictive intelligence linking real-world climate catastrophes and forward policy negotiations to commodity allowance prices.&lt;/p&gt;

&lt;p&gt;That became our mission for the Datathon: &lt;strong&gt;Bridge physical climate science with quantitative financial econometrics.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Breakthrough 1: Why Classical ARIMA Crushed Machine Learning on Carbon Prices
&lt;/h2&gt;

&lt;p&gt;The first challenge required predicting daily carbon allowance prices for the next 30 trading days across 5 global markets (EU ETS in EUR, California in USD, RGGI in USD, UK ETS in GBP, and China ETS in CNY).&lt;/p&gt;
&lt;h3&gt;
  
  
  The Battle: ARIMA vs. Gradient Boosted ML
&lt;/h3&gt;

&lt;p&gt;Like many teams, our initial instinct was to throw state-of-the-art Gradient Boosted Trees (&lt;code&gt;LightGBM&lt;/code&gt;) at the problem. We engineered multi-scale lag buffers (1, 2, 3, 5, 7, 10, 14, 21, 30 days), rolling statistics (7, 14, 30 days), and momentum return proxies.&lt;/p&gt;

&lt;p&gt;Then, we benchmarked this against a classical econometric formulation: &lt;strong&gt;ARIMA(1, 1, 1)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here were our out-of-sample held-out test results:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Carbon Market&lt;/th&gt;
&lt;th&gt;Currency&lt;/th&gt;
&lt;th&gt;Classical ARIMA (RMSE)&lt;/th&gt;
&lt;th&gt;Classical ARIMA (MAPE)&lt;/th&gt;
&lt;th&gt;LightGBM ML (MAPE)&lt;/th&gt;
&lt;th&gt;Outperformance&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;California CAT&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;USD&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.144&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.92%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3.82%&lt;/td&gt;
&lt;td&gt;ARIMA (+23.6%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;China ETS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CNY&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.008&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.19%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3.28%&lt;/td&gt;
&lt;td&gt;ARIMA (+33.2%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;EU ETS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;EUR&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.278&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.22%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2.55%&lt;/td&gt;
&lt;td&gt;ARIMA (+12.9%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RGGI (US)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;USD&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.523&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.17%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3.17%&lt;/td&gt;
&lt;td&gt;ARIMA (+31.5%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;UK ETS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;GBP&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.148&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.69%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;6.01%&lt;/td&gt;
&lt;td&gt;ARIMA (+38.6%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OVERALL AVG&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.64%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.77%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;ARIMA (+30.0% Lead)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FMadhuravishan%2FSLIIT-Datathon-Round-02%2Fmain%2FQuestion_1%2Foutputs%2Fq1_1_carbon_price_forecast.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FMadhuravishan%2FSLIIT-Datathon-Round-02%2Fmain%2FQuestion_1%2Foutputs%2Fq1_1_carbon_price_forecast.png" alt="30-Day Carbon Allowance Price Forecasting - ARIMA vs LightGBM" width="800" height="920"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 2: 30-Day out-of-sample price forecast comparison across all 5 international allowance markets. Notice how ARIMA's mean-reverting path (red dashed) stays locked to the actual test trajectory.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Why Did Classical Econometrics Win?
&lt;/h3&gt;

&lt;p&gt;This was one of our biggest presentation hooks for the judging panel. &lt;/p&gt;

&lt;p&gt;When performing &lt;strong&gt;multi-step recursive forecasting&lt;/strong&gt; (30 trading days out), any single-step machine learning model must feed its own predicted values back into its lag feature buffer for step t+2, t+3, ..., t+30. This causes &lt;strong&gt;compounding error drift&lt;/strong&gt;—small estimation errors snowball exponentially.&lt;/p&gt;

&lt;p&gt;In contrast, ARIMA(1, 1, 1) utilizes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;First-order Differencing (d = 1)&lt;/strong&gt;: Stabilizes the stochastic drift and enforces financial stationarity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moving Average (q = 1) Shock Absorption&lt;/strong&gt;: Quickly absorbs idiosyncratic price shocks back toward the structural mean.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# The Winning Econometric Baseline
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;statsmodels.tsa.arima.model&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ARIMA&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;train_arima_baseline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;train_series&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;steps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ARIMA&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;train_series&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;fitted_model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;forecast&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fitted_model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forecast&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;steps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;forecast&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Lesson&lt;/strong&gt;: Never assume deep learning or gradient boosting is universally superior. In non-stationary commodity time-series, mathematically constrained mean-reverting econometrics often outclasses unconstrained recursive tree ensembles.&lt;/p&gt;


&lt;h2&gt;
  
  
  Breakthrough 2: Teaching Machine Learning the Laws of Chemistry
&lt;/h2&gt;

&lt;p&gt;The next objective was to predict sovereign emissions per capita (&lt;code&gt;co2_per_capita_t&lt;/code&gt;) using country power generation mixes (Coal, Oil, Gas, Nuclear, Hydro, Solar, Wind, and Other Renewables).&lt;/p&gt;

&lt;p&gt;A naive regression model using raw percentages failed because raw percentages ignore economic reality. A financial hub like Singapore and an oil-producing state might have similar fossil percentages, yet completely different per-capita carbon intensities.&lt;/p&gt;
&lt;h3&gt;
  
  
  Domain-Driven Feature Engineering
&lt;/h3&gt;

&lt;p&gt;We engineered four domain-specific features grounded in IPCC stoichiometric combustion chemistry:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Carbon-Weighted Combustion Intensity Index&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Index = (Coal% × 1.0) + (Oil% × 0.8) + (Gas% × 0.5)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Reflecting molecular carbon emissions per gigajoule of chemical energy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clean-to-Fossil Generation Ratio&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Ratio = (Renewables% + Nuclear%) / (Fossil Total% + 0.0001)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Coal-to-Gas Switching Efficiency&lt;/strong&gt;:
Measures whether fossil generation is transitioning from high-carbon coal to lower-carbon natural gas bridge fuels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fossil-GDP Interaction Metric&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Interaction = Fossil Total% × Carbon Intensity of GDP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Benchmark Results (5-Fold Cross-Validation, 80/20 Test Split)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model Architecture&lt;/th&gt;
&lt;th&gt;5-Fold CV R²&lt;/th&gt;
&lt;th&gt;Test Set R²&lt;/th&gt;
&lt;th&gt;Test RMSE (t/person)&lt;/th&gt;
&lt;th&gt;Test MAE (t/person)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Linear Regression (OLS)&lt;/td&gt;
&lt;td&gt;0.810 ± 0.038&lt;/td&gt;
&lt;td&gt;0.798&lt;/td&gt;
&lt;td&gt;3.272&lt;/td&gt;
&lt;td&gt;2.146&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ridge Regression (L₂)&lt;/td&gt;
&lt;td&gt;0.804 ± 0.041&lt;/td&gt;
&lt;td&gt;0.784&lt;/td&gt;
&lt;td&gt;3.382&lt;/td&gt;
&lt;td&gt;2.216&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LightGBM Regressor&lt;/td&gt;
&lt;td&gt;0.933 ± 0.025&lt;/td&gt;
&lt;td&gt;0.926&lt;/td&gt;
&lt;td&gt;1.975&lt;/td&gt;
&lt;td&gt;0.978&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Random Forest Regressor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.922 ± 0.028&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.9449&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.709&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.901&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg9uthkm066xj9cg9bezp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg9uthkm066xj9cg9bezp.png" alt="CO2 per Capita: Actual vs Predicted" width="800" height="746"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 3: Out-of-sample actual vs. predicted emissions per capita for Random Forest (R² = 0.9449, RMSE = 1.71 t/person).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm58dw5gcsq6cnv6kff22.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm58dw5gcsq6cnv6kff22.png" alt="Top Predictive Combustion Drivers" width="800" height="478"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 4: Feature importance ranking. Notice how engineered stoichiometric and economic interaction features (blue) completely dominate raw fuel percentages.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Our non-linear Random Forest achieved a &lt;strong&gt;Test R² of 0.9449&lt;/strong&gt;, slashing linear error by &lt;strong&gt;58%&lt;/strong&gt; down to less than &lt;strong&gt;0.90 tons of CO₂ per person&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Our feature importance analysis confirmed that &lt;code&gt;fossil_gdp_interaction&lt;/code&gt; (48.2%) and &lt;code&gt;fuel_carbon_intensity_idx&lt;/code&gt; (21.4%) accounted for over &lt;strong&gt;69% of the model's total predictive power&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  Breakthrough 3: Rejecting the Null Hypothesis (H₀)
&lt;/h2&gt;

&lt;p&gt;The central research hypothesis of Question 2 was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Do carbon allowance prices react systematically to real-world climate disasters and international policy shifts, or are price movements purely technical?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  The Weekend Data Trap Most People Miss
&lt;/h3&gt;

&lt;p&gt;When joining daily trading records with climate event logs, approximately &lt;strong&gt;30% of major international events (including the historic Paris Agreement) occur on weekends or holidays&lt;/strong&gt; when financial exchanges are closed!&lt;/p&gt;

&lt;p&gt;If you perform a naive relational join on &lt;code&gt;date == event_date&lt;/code&gt;, you drop these events entirely. Worse, if you align them incorrectly, you introduce future lookahead bias.&lt;/p&gt;

&lt;p&gt;We engineered an &lt;strong&gt;Effective Market Trading Date&lt;/strong&gt; algorithm that dynamically maps weekend events to the exact opening minute of the following trading session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Calendar Synchronization Without Lookahead Leakage
&lt;/span&gt;&lt;span class="n"&gt;all_trading_dates&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df_carbon&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;date&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;unique&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;map_to_next_trading_day&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event_date&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;searchsorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;all_trading_dates&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;datetime64&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event_date&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;all_trading_dates&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_datetime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;all_trading_dates&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;event_date&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Cumulative Abnormal Returns (CAR) Event Study
&lt;/h3&gt;

&lt;p&gt;Using financial event study methodology on the EU ETS, we analyzed price action across [-10, +15] trading-day event windows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fukushima Nuclear Disaster (2011)&lt;/strong&gt;: Triggered an immediate &lt;strong&gt;+11.4% Cumulative Abnormal Return (CAR)&lt;/strong&gt; as European utilities scrambled to secure coal and gas allowances to offset nuclear baseload shutdowns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EU Fit-for-55 Policy Announcement (2021)&lt;/strong&gt;: Catalyzed a massive &lt;strong&gt;+15.2% CAR surge&lt;/strong&gt; within 15 trading days.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fklyex5xgajmmtxcwxj79.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fklyex5xgajmmtxcwxj79.png" alt="Cumulative Abnormal Returns (CAR) Around Major Climate Shocks" width="800" height="430"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 5: Cumulative Abnormal Returns (CAR %) around historical climate disasters and policy treaties (t = 0 denotes announcement date).&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Verdict: Directional Movement Lift Across ALL 5 Markets
&lt;/h3&gt;

&lt;p&gt;We trained identical LightGBM classifiers to predict next-day directional movement (UP vs. DOWN/FLAT) on an 80/20 chronological test split:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Baseline Model&lt;/strong&gt;: Technical price lags and rolling return indicators only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Event-Augmented Model&lt;/strong&gt;: Technical lags + Event proximity features (&lt;code&gt;days_since_last_event&lt;/code&gt;, &lt;code&gt;days_until_next_policy&lt;/code&gt;, exponential decay τ = 30d, and regional jurisdiction matching).&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Carbon Market&lt;/th&gt;
&lt;th&gt;Test Samples&lt;/th&gt;
&lt;th&gt;Baseline Directional Acc.&lt;/th&gt;
&lt;th&gt;Event-Augmented Acc.&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Accuracy Lift&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;Event-Augmented AUC&lt;/th&gt;
&lt;th&gt;Hypothesis Verdict&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;UK ETS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;253&lt;/td&gt;
&lt;td&gt;51.78%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;52.96%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+1.19%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.518&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;REJECT H₀&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RGGI (US)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;913&lt;/td&gt;
&lt;td&gt;49.18%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;50.16%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.99%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.532&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;REJECT H₀&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;EU ETS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,091&lt;/td&gt;
&lt;td&gt;48.49%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;49.40%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.92%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.507&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;REJECT H₀&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;China ETS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;244&lt;/td&gt;
&lt;td&gt;53.28%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;54.10%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.82%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.588 (+0.051)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;REJECT H₀&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;California&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;644&lt;/td&gt;
&lt;td&gt;49.53%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;50.31%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+0.78%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.512&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;REJECT H₀&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxvhf9rqjbvxpg9mdtz41.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxvhf9rqjbvxpg9mdtz41.png" alt="EU ETS Directional Movement ROC Curves - Baseline vs Event-Augmented" width="799" height="684"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 6: ROC curve comparison on the EU ETS. Event-augmented features shifted the ROC frontier higher across all probability thresholds.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1mk6jxfai9kd7vqjzphb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1mk6jxfai9kd7vqjzphb.png" alt="Feature Importance - Technical Lags vs Event Shocks" width="800" height="519"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 7: Top event features. The forward-looking countdown feature (&lt;code&gt;event_days_until_policy&lt;/code&gt;) emerged as the strongest shock predictor.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Across &lt;strong&gt;every single carbon market on Earth&lt;/strong&gt;, event-augmented features generated a verified positive accuracy lift. &lt;/p&gt;

&lt;p&gt;The single most influential feature was &lt;code&gt;event_days_until_policy&lt;/code&gt;. Markets don't just react after a treaty is signed—traders &lt;strong&gt;speculatively accumulate allowances weeks ahead of scheduled UN COP summits&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Breakthrough 4: Uncovering 2030 Sovereign Transition Archetypes
&lt;/h2&gt;

&lt;p&gt;Using unsupervised &lt;strong&gt;K-Means Clustering (k = 3)&lt;/strong&gt; on 26 years of annualized renewable adoption rates across 50 countries, the world grouped cleanly into three distinct decarbonization archetypes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbnya9vhf1xtongutq4ss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbnya9vhf1xtongutq4ss.png" alt="Energy Mix vs CO2 Initial Footprint - K-Means Archetypes" width="800" height="519"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 8: Spatial separation of sovereign decarbonization archetypes across 50 countries.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx4h7ayik0d284tf5iks8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx4h7ayik0d284tf5iks8.png" alt="Renewables Trajectories by Country Archetype" width="800" height="438"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 9: 26-year historical trajectory of renewable energy penetration for representative countries in each archetype.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We projected emissions through 2030 under three compound annual growth scenarios:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Business-as-Usual (BAU)&lt;/strong&gt;: Continuing the recent 5-year trend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moderate Transition&lt;/strong&gt;: -2.0% annual CAGR reduction modifier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accelerated Transition&lt;/strong&gt;: -5.0% annual CAGR reduction modifier (Net-Zero trajectory).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj43ch5j3w7807r8pfwj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj43ch5j3w7807r8pfwj9.png" alt="CO2 Emissions Potential Forecast Scenarios (2026-2030)" width="800" height="496"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 10: Multi-pathway forecast curves (2026–2030) for top sovereign emitters.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Macro Insight&lt;/strong&gt;: Under an Accelerated Transition, top global emitters reach &lt;strong&gt;Peak Emissions before 2029&lt;/strong&gt;, reversing decades of upward momentum.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Interactive Web MVP: Live Demonstration
&lt;/h2&gt;

&lt;p&gt;Judges love working software. Rather than showing static notebook screenshots, we built a fully responsive, dark-mode, glassmorphism dashboard:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FMadhuravishan%2FSLIIT-Datathon-Round-02%2Fmain%2FQuestion_4%2Foutputs%2Fq4_interactive_simulation_output.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FMadhuravishan%2FSLIIT-Datathon-Round-02%2Fmain%2FQuestion_4%2Foutputs%2Fq4_interactive_simulation_output.png" alt="CarbonPulse OS Interactive Simulation Dashboard" width="799" height="246"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 11: The live CarbonPulse OS interface displaying real-time price monitoring, shock injection, and stoichiometric fuel sliders.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Core MVP Capabilities:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Market Allowance Monitor&lt;/strong&gt;: Live currency tickers across EU ETS (€), California ($), UK ETS (£), RGGI ($), and China ETS (¥) with toggleable 30-day forecast curves and 95% confidence bounds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Event Shock Injector&lt;/strong&gt;: Interactive buttons allowing traders to inject simulated historical or forward shocks (e.g., &lt;em&gt;Nuclear Baseload Trip +11.4% CAR&lt;/em&gt;, &lt;em&gt;Statutory Cap Cut +15.2% CAR&lt;/em&gt;) and observe the projected volatility cone in real time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stoichiometric Fuel Sliders&lt;/strong&gt;: Interactive sliders for Coal, Oil, Gas, Nuclear, and Renewables that dynamically recompute corporate Scope 1 emissions and 2030 financial liabilities using our trained Random Forest model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1-Click TCFD Audit Export&lt;/strong&gt;: Generates a certified executive compliance report ready for board auditing under EU CSRD (ESRS E1) guidelines.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The Commercial Strategy: Pitching for the Win
&lt;/h2&gt;

&lt;p&gt;The final 10-minute presentation required translating technical modeling into an investment-ready business pitch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Target Market&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TAM&lt;/strong&gt;: &lt;strong&gt;$12.4 Billion&lt;/strong&gt; by 2030 (Global climate risk analytics and ESG carbon accounting).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SAM&lt;/strong&gt;: &lt;strong&gt;$2.8 Billion&lt;/strong&gt; (~15,000 compliance industrial facilities under mandatory ETS + top 400 energy hedge funds).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SOM&lt;/strong&gt;: &lt;strong&gt;$85 Million&lt;/strong&gt; (Capturing 3% of European and North American industrial emitters in 36 months).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise SaaS Monetization&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Analyst Tier&lt;/em&gt;: &lt;strong&gt;$1,500/month&lt;/strong&gt; (projections, monthly PDF reports).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Trading Desk Tier&lt;/em&gt;: &lt;strong&gt;$5,000/month&lt;/strong&gt; (sub-second API, shock radar alerts).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Enterprise Industrial Suite&lt;/em&gt;: &lt;strong&gt;$75,000 – $150,000/year&lt;/strong&gt; (custom plant transition simulator, dedicated quant support).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unit Economics&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Customer Acquisition Cost (CAC): &lt;strong&gt;$12,000&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Annual Contract Value (ACV): &lt;strong&gt;$48,000&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Lifetime Value (LTV): &lt;strong&gt;$144,000&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LTV / CAC Ratio&lt;/strong&gt;: &lt;strong&gt;12.0x&lt;/strong&gt; (Payback period: &lt;strong&gt;3.5 months&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Projected Year 3 ARR: &lt;strong&gt;$18.24 Million&lt;/strong&gt; (EBITDA positive at Month 22).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0nqumi59z9yapu3u987n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0nqumi59z9yapu3u987n.png" alt="3-Year Enterprise ARR Growth Projection" width="800" height="445"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 12: 3-Year Annual Recurring Revenue (ARR) growth trajectory reaching $18.2M by Year 3.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5 Lessons for Winning Datathons and Hackathons
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Question Deep Learning Defaults&lt;/strong&gt;: In non-stationary time-series data, classical statistical models (like ARIMA with differencing) frequently outperform deep learning and recursive tree ensembles. Benchmarking both shows intellectual honesty and deep domain expertise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature Engineering Trumps Model Tuning&lt;/strong&gt;: Encoding the physical laws of chemistry into our features increased R² from 0.79 (OLS) to 0.945 (Random Forest). Domain-specific features beat brute-force hyperparameter search every time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handle Edge Cases at the Ingestion Boundary&lt;/strong&gt;: The weekend trading calendar problem in Question 2 could have wrecked our hypothesis test. Catching and smoothing weekend events demonstrated true data engineering maturity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't Stop at the Notebook&lt;/strong&gt;: Turning code into an interactive web interface transformed our project from a collection of CSVs into a viable commercial product.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tell a Financial Story&lt;/strong&gt;: Judges care about impact. Framing technical discoveries around corporate balance sheets, regulatory compliance deadlines, and SaaS unit economics separated our presentation from purely academic submissions.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;CarbonPulse OS was created for the SLIIT CodeFest Datathon 2026 Final Round, where it was awarded 1st Place. All models were developed in Python using Statsmodels, Scikit-Learn, LightGBM, and deployed with Vanilla ES6 &amp;amp; CSS3.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;💬 &lt;strong&gt;Have you seen classical statistical models beat modern ML in your own projects? How are you approaching climate risk in your data pipelines? Let's discuss in the comments below!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>python</category>
      <category>webdev</category>
    </item>
    <item>
      <title>From 48M Records to Top 8 Finalists: How We Built an End-to-End Urban Flow AI</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Thu, 24 Sep 2026 20:50:13 +0000</pubDate>
      <link>https://dev.to/inushathathsara/from-48m-records-to-top-8-finalists-how-we-built-an-end-to-end-urban-flow-ai-53gp</link>
      <guid>https://dev.to/inushathathsara/from-48m-records-to-top-8-finalists-how-we-built-an-end-to-end-urban-flow-ai-53gp</guid>
      <description>&lt;p&gt;We have some exciting news to share! 🎉 &lt;/p&gt;

&lt;p&gt;Our team, &lt;strong&gt;DataMinds&lt;/strong&gt;, competed in the prestigious &lt;strong&gt;SLIIT CodeFest Datathon 2026&lt;/strong&gt; and proudly &lt;strong&gt;secured a spot as Finalists (Top 8 teams)&lt;/strong&gt; in the Urban Flow Analytics Data Challenge!&lt;/p&gt;

&lt;p&gt;In this competition, we tackled a massive, real-world urban transit dataset containing &lt;strong&gt;48.6 million trip records across 260+ urban zones&lt;/strong&gt;. The challenge demanded much more than just training a model in a Jupyter Notebook: it required building a production-ready, mathematically sound, and business-viable end-to-end data platform covering everything from chunked streaming data pipelines and spatio-temporal forecasting to an AI-powered executive platform.&lt;/p&gt;

&lt;p&gt;Here is the complete behind-the-scenes breakdown of our architectural strategy, the data engineering traps we avoided, our modeling breakthroughs, and the engineering principles that helped us reach the Top 8.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎥 The 4-Minute Walkthrough
&lt;/h2&gt;

&lt;p&gt;If you prefer a visual walkthrough, check out our official demo video demonstrating the full pipeline, interactive dashboard, and conversational AI mobility assistant:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/rUpk545ku88" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Link: &lt;a href="https://youtu.be/rUpk545ku88" rel="noopener noreferrer"&gt;https://youtu.be/rUpk545ku88&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ High-Level System Architecture
&lt;/h2&gt;

&lt;p&gt;Rather than treating the challenge as isolated competition tasks, we engineered a cohesive &lt;strong&gt;4-Tier Architecture&lt;/strong&gt; that bridges raw streaming telemetry to executive decision-making:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi1g7rsnjkm1ermmhc49g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi1g7rsnjkm1ermmhc49g.png" alt="Architectural Diagram" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Taming 48.6 Million Records Without Running Out of Memory
&lt;/h2&gt;

&lt;p&gt;Working with tens of millions of raw geospatial records presents two massive hurdles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Memory limits&lt;/strong&gt;: A naive &lt;code&gt;pd.read_csv()&lt;/code&gt; on 48.6 million rows with 20+ columns will immediately crash standard workstations or cloud instances with Out-Of-Memory (OOM) errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-world data anomalies&lt;/strong&gt;: Real mobility data is filled with sensor noise, GPS dropouts, fare metering glitches, and data logging bugs.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Chunked Streaming Ingestion
&lt;/h3&gt;

&lt;p&gt;To maintain sub-gigabyte RAM footprints during data auditing, we used Python generators with chunked processing (&lt;code&gt;chunksize=100_000&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;stream_audit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;csv_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chunk_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100_000&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;total_records&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="n"&gt;anomalies&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;negative_fare&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;excessive_speed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;zero_duration&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;csv_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chunksize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;chunk_size&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Calculate trip duration and implied speed
&lt;/span&gt;        &lt;span class="n"&gt;duration_hours&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dropoff_datetime&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;pickup_datetime&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="n"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;total_seconds&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;3600.0&lt;/span&gt;
        &lt;span class="n"&gt;implied_mph&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;trip_distance&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;duration_hours&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nan&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="c1"&gt;# Track edge cases
&lt;/span&gt;        &lt;span class="n"&gt;anomalies&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;negative_fare&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;fare_amount&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;anomalies&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;excessive_speed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;implied_mph&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;anomalies&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;zero_duration&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;duration_hours&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;total_records&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;total_records&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;anomalies&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The "Speed Trap" and Temporal Anomaly Cleaning
&lt;/h3&gt;

&lt;p&gt;Through our systematic audit across all 48.6M rows, we discovered and programmatically filtered out critical real-world edge cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Teleportation glitches&lt;/strong&gt;: Trips logging positive distance but zero duration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Physical speed violations&lt;/strong&gt;: Urban taxi trips logging implied velocities exceeding 100 mph (often GPS drift or corrupt timestamps).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Billing corrections &amp;amp; disputes&lt;/strong&gt;: Trips with negative fares or negative tip amounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zone boundary mismatches&lt;/strong&gt;: Trips with missing or non-existent zone IDs.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Preventing Data Leakage (The Competition Trap)
&lt;/h2&gt;

&lt;p&gt;A common mistake in ML hackathons is &lt;strong&gt;data leakage&lt;/strong&gt;. If you leak post-trip information into an upfront prediction model, your leaderboard score looks amazing, but your model is completely useless in production.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chronological Holdouts vs. Random Splits
&lt;/h3&gt;

&lt;p&gt;Random &lt;code&gt;train_test_split&lt;/code&gt; on time-series mobility data is fatal—it allows models to learn from the future to predict the past. We enforced strict chronological partitioning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Training Period&lt;/strong&gt;: 9 months of historical data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation Period&lt;/strong&gt;: 2 months of subsequent data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing Holdout&lt;/strong&gt;: Final future month (never seen during feature extraction or tuning)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pre-Trip Only Features
&lt;/h3&gt;

&lt;p&gt;For our Upfront Fare and Duration models, we restricted feature engineering strictly to information available &lt;strong&gt;before the passenger steps into the vehicle&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cyclical Temporal Encodings&lt;/strong&gt;: &lt;code&gt;sin(2π * hour / 24)&lt;/code&gt; and &lt;code&gt;cos(2π * hour / 24)&lt;/code&gt; to preserve diurnal continuity (midnight connects smoothly to 1 AM).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Historical Zone Congestion&lt;/strong&gt;: Rolling 4-week historical pickup velocity per zone pair.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Surge Multipliers&lt;/strong&gt;: Real-time demand-to-supply ratio proxy computed dynamically.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. The Supervised Modeling Tournament
&lt;/h2&gt;

&lt;p&gt;We benchmarked multiple architectures across our holdout test set to select the optimal production model:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model Architecture&lt;/th&gt;
&lt;th&gt;Fare R²&lt;/th&gt;
&lt;th&gt;Fare RMSE ($)&lt;/th&gt;
&lt;th&gt;Duration R²&lt;/th&gt;
&lt;th&gt;Duration RMSE (min)&lt;/th&gt;
&lt;th&gt;Inference Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ordinary Least Squares (OLS)&lt;/td&gt;
&lt;td&gt;0.812&lt;/td&gt;
&lt;td&gt;$7.14&lt;/td&gt;
&lt;td&gt;0.621&lt;/td&gt;
&lt;td&gt;9.85 min&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.8 ms&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Random Forest Regressor&lt;/td&gt;
&lt;td&gt;0.941&lt;/td&gt;
&lt;td&gt;$4.12&lt;/td&gt;
&lt;td&gt;0.789&lt;/td&gt;
&lt;td&gt;6.94 min&lt;/td&gt;
&lt;td&gt;45.2 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LightGBM Regressor (Winner - Fare)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.9657&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$3.25&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.8142&lt;/td&gt;
&lt;td&gt;6.55 min&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.1 ms&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;XGBoost Regressor (Winner - Duration)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.9612&lt;/td&gt;
&lt;td&gt;$3.41&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.8268&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;6.39 min&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.4 ms&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Why Gradient Boosting Triumphed
&lt;/h3&gt;

&lt;p&gt;Gradient boosting trees handled the non-linear relationship between Manhattan distance, toll zones, and peak-hour traffic multipliers effortlessly. LightGBM provided lightning-fast inference with sub-cent precision, while XGBoost effectively captured the heavy-tailed variance in urban traffic delays.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Spatio-Temporal Forecasting &amp;amp; Origin-Destination Corridors
&lt;/h2&gt;

&lt;p&gt;Urban mobility is heavily spatial. Having accurate pricing is only half the battle; fleet operators must know &lt;strong&gt;where demand will surge 24, 48, and 72 hours in advance&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Autoregressive Lag-Based Forecasting
&lt;/h3&gt;

&lt;p&gt;We aggregated zone-level trip demand into hourly buckets and engineered multi-scale temporal lag features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Immediate Autoregressive Lags&lt;/strong&gt;: &lt;code&gt;t-1&lt;/code&gt;, &lt;code&gt;t-2&lt;/code&gt;, &lt;code&gt;t-3&lt;/code&gt; hours.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diurnal Seasonality Lags&lt;/strong&gt;: &lt;code&gt;t-24&lt;/code&gt;, &lt;code&gt;t-48&lt;/code&gt;, &lt;code&gt;t-72&lt;/code&gt; hours (same hour over preceding days).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weekly Seasonality Lags&lt;/strong&gt;: &lt;code&gt;t-168&lt;/code&gt; hours (same day and hour of the previous week).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our forecaster achieved a test &lt;strong&gt;RMSE of ~1.00 to 1.22 trips/hour&lt;/strong&gt; across all major urban zones, allowing dispatchers to pre-position fleet vehicles before surges materialized.&lt;/p&gt;

&lt;h3&gt;
  
  
  4 Time-Slice OD Flow Clustering
&lt;/h3&gt;

&lt;p&gt;By clustering pickup-to-dropoff vectors across Morning Rush (07:00–10:00), Midday (11:00–14:00), Evening Rush (16:00–19:00), and Late Night (22:00–02:00), we revealed major commercial arterial corridors and airport shuttle dynamics, illuminating severe deadheading (empty return) imbalances.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. From Raw Code to Executive Decision-Making
&lt;/h2&gt;

&lt;p&gt;Judges at modern hackathons don't just want &lt;code&gt;.ipynb&lt;/code&gt; files; they want to see how engineering impacts business. We translated our models into an &lt;strong&gt;Executive Command Center&lt;/strong&gt; built with Streamlit:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Conversational AI Mobility Assistant
&lt;/h3&gt;

&lt;p&gt;We integrated a natural language interface that allows city planners and dispatch managers to ask plain-English questions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"What are the top 5 revenue-generating pickup zones during the Friday evening rush?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;The Innovation — Ambiguity Guardrails&lt;/strong&gt;:&lt;br&gt;
Real users often ask vague questions like &lt;em&gt;"Show me the best zones"&lt;/em&gt;. Rather than letting the AI hallucinate or make unsafe assumptions, our engine implements strict guardrails that detect ambiguity and clarify whether the user intends "highest volume", "highest fare margin", or "fastest turnaround time".&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The $51.8M ROI Financial Model
&lt;/h3&gt;

&lt;p&gt;We mapped model improvements directly to bottom-line business metrics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deadhead Reduction&lt;/strong&gt;: Pre-dispatching idle vehicles based on our 24h forecaster reduces empty miles by &lt;strong&gt;14.2%&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Airport Reverse-Trips&lt;/strong&gt;: Pairing drop-offs at airport terminals with immediate outbound demand captures substantial hidden margins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Estimated Annual Network Gain&lt;/strong&gt;: Over &lt;strong&gt;$51.8 Million&lt;/strong&gt; across the city transit ecosystem.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Four Lessons That Helped Us Secure the Top 8
&lt;/h2&gt;

&lt;p&gt;If you are competing in data science competitions or datathons, here are four principles that made the difference for Team DataMinds:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clean Data Beats Fancy Ensembles&lt;/strong&gt;: Spending 40% of our time auditing anomalies across the 48.6M records yielded vastly higher accuracy gains than endless hyperparameter tuning on noisy data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Respect the Temporal Dimension&lt;/strong&gt;: Never use standard K-fold cross-validation or random splits on temporal data. A leak-free validation strategy ensures that your local score matches real-world performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build Modular, Reusable Code&lt;/strong&gt;: We moved all logic out of messy notebooks into modular Python packages (&lt;code&gt;src/data_cleaner.py&lt;/code&gt;, &lt;code&gt;src/supervised_models.py&lt;/code&gt;, &lt;code&gt;src/demand_forecaster.py&lt;/code&gt;). This allowed our notebook, test scripts, and UI to share the exact same underlying logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tell a Clear Story&lt;/strong&gt;: A technical report or dashboard should not just be a collection of charts. Frame your findings as a business narrative: &lt;em&gt;Problem → Solution → Measurable Economic Value&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🏁 Looking Forward to the Finals!
&lt;/h2&gt;

&lt;p&gt;Reaching the Top 8 Finalist stage among brilliant teams across the country is an incredible milestone for &lt;strong&gt;Team DataMinds&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;A huge thank you to the &lt;strong&gt;SLIIT CodeFest Datathon 2026&lt;/strong&gt; organizers and judges for organizing such an inspiring, high-impact data challenge.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Are you building with large-scale mobility data or competing in data challenges? Drop your thoughts or questions in the comments below!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>datascience</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>I Tackled the Planet of Lana Language Challenge by Building an AI Translator &amp; Voice Synthesizer</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Wed, 09 Sep 2026 14:26:05 +0000</pubDate>
      <link>https://dev.to/inushathathsara/i-tackled-the-planet-of-lana-language-challenge-by-building-an-ai-translator-voice-synthesizer-gdp</link>
      <guid>https://dev.to/inushathathsara/i-tackled-the-planet-of-lana-language-challenge-by-building-an-ai-translator-voice-synthesizer-gdp</guid>
      <description>&lt;p&gt;I tackled the challenge in a different way, and created this project as my answer.&lt;/p&gt;

&lt;p&gt;When the indie studio Wishfully released the official &lt;strong&gt;Language Companion&lt;/strong&gt; booklet (&lt;code&gt;PoL_LanguageCompanion.pdf&lt;/code&gt;) for &lt;em&gt;Planet of Lana II: Children of the Leaf&lt;/em&gt;, they ended it on page 13 with an irresistible invitation to the community:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Congratulations, you’ve reached the end of this intensive crash course in Novo Terali! We hope you’ve enjoyed learning a bit more about Lana’s native tongue, and that your understanding of Novo as a whole has deepened in the process.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Now that you are completely fluent, we would love to hear from you in your best Novo Terali! Share a short (or long!) shoutout in your new favorite language on social media and tag us @planetoflana - we can’t wait to see it!"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most players reading that would string together three words from the mini-glossary—like &lt;em&gt;"Tiai Lana!"&lt;/em&gt; ("Hello Lana!")—tweet it with a screenshot, and call it a day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I couldn't stop there.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The booklet provided around 80 canonical vocabulary words, basic commands, pronouns, numbers, and a handful of translated game scenes. But how can anyone truly be "fluent" when whole swathes of everyday vocabulary and grammar are still undiscovered?&lt;/p&gt;

&lt;p&gt;Instead of just posting a one-line tweet, I asked myself: &lt;/p&gt;

&lt;p&gt;&lt;em&gt;What if anyone could translate anything into Novo Terali? What if we could reverse-engineer the linguistic rules from the booklet, marry them with an LLM extrapolation engine, back it with an acoustic voice synthesizer, and build a living, self-healing codex that speaks the language in real time?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That question led to &lt;strong&gt;NovoGen&lt;/strong&gt; — an open-source, full-stack conlang translator, speech synthesizer, and dictionary manager for &lt;em&gt;Planet of Lana&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyquxg6njf1u74ueyojfw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyquxg6njf1u74ueyojfw.png" alt="Home screen of the NovoGen" width="799" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the story of how it was engineered, the technical hurdles encountered along the way, and what it takes to bring a fictional language to life with modern web and AI technologies.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Deconstructing Novo Terali: The Lore &amp;amp; Linguistics
&lt;/h2&gt;

&lt;p&gt;In the &lt;em&gt;Planet of Lana&lt;/em&gt; universe, &lt;strong&gt;Novo Terali&lt;/strong&gt; (literally &lt;em&gt;"New Speak"&lt;/em&gt;) was created on Earth as an accessible auxiliary language designed to unite humanity during the multi-generational &lt;em&gt;Fata te Cora&lt;/em&gt; ("Seed and Leaf") space mission. Centuries later, on the planet Novo, survivors preserved and evolved it into the melodic dialect spoken by Lana, her sister Elo, and the villagers of Tailo.&lt;/p&gt;

&lt;p&gt;Before writing a single line of backend code, I extracted and analyzed every rule documented in the booklet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  ┌──────────────────────────────────────────────┐
                  │          NOVO TERALI PHONOTACTICS            │
                  ├──────────────────────────────────────────────┤
                  │  Vowels:      a [ah], e [eh], i [ee],        │
                  │               o [oh], u [oo] (pure Italian)  │
                  │  Diphthongs:  ai, ia, ea, oa, ui (unclipped) │
                  │  Consonants:  t/d aspirated, rolled 'r',     │
                  │               'h' voiced, no silent letters  │
                  │  Stress:      Light stress on first syllable │
                  │  Rhythm:      Calm, melodic, even pacing     │
                  └──────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Morphological Patterns Discovered:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Subject-Verb-Object (SVO)&lt;/strong&gt; sentence structure (&lt;em&gt;"Ona fatum tia"&lt;/em&gt; = "I believe you").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Negation&lt;/strong&gt;: Direct marker &lt;em&gt;dieh&lt;/em&gt; placed before verbs (&lt;em&gt;"Ona dieh fatum"&lt;/em&gt; = "I do not believe").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agglutinative Suffixes&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-em&lt;/code&gt;: Plural/verbal inflection (&lt;em&gt;olai&lt;/em&gt; → &lt;em&gt;olaiem&lt;/em&gt; = "go" → "did you go?").&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-ari&lt;/code&gt;: Agent/actor noun suffix (&lt;em&gt;djimo&lt;/em&gt; "make" → &lt;em&gt;djimari&lt;/em&gt; "maker/creator"; &lt;em&gt;capitari&lt;/em&gt; "director").&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;oti-&lt;/code&gt;: Honorific or co-prefix (&lt;em&gt;oti-capitari&lt;/em&gt; = "co-director").&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Philosophical Roots&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fata&lt;/strong&gt;: Predecessor, seed, origin, parent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cora&lt;/strong&gt;: Successor, leaf, progeny, child, future.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Architecture Overview: Local-First Meets Cloud-Native
&lt;/h2&gt;

&lt;p&gt;One core design philosophy was that NovoGen must never depend exclusively on third-party cloud APIs. If a user runs it offline without an API key, it should function seamlessly using local compute. If deployed to production, it should scale on serverless infrastructure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                     ┌───────────────────────────────┐
                     │       Next.js App Router      │
                     │    Tailwind / Vanilla CSS     │
                     └───────────────┬───────────────┘
                                     │
                        POST /api/translate
                                     │
                     ┌───────────────▼───────────────┐
                     │   In-Memory Rate Limiter      │
                     │  (Sliding-Window, 30 req/min) │
                     └───────────────┬───────────────┘
                                     │
                     ┌───────────────▼───────────────┐
                     │  Multi-Tier Translation Engine │
                     └───────────────┬───────────────┘
                                     │
         ┌───────────────────────────┼───────────────────────────┐
         │                           │                           │
 1. Exact SQLite Match      2. Rule Agglutination       3. LLM Extrapolation
    (Canonical Lore DB)        (Suffixes &amp;amp; Modifiers)       (Gemini 3.1 / Ollama)
         │                           │                           │
         └───────────────────────────┼───────────────────────────┘
                                     │
                     ┌───────────────▼───────────────┐
                     │  Phonotactic Quarantine Guard │
                     │ (Anti-Gibberish Verification) │
                     └───────────────┬───────────────┘
                                     │
                     ┌───────────────▼───────────────┐
                     │      ElevenLabs Voice API     │
                     │    (Gigi Voice Model Tuning)  │
                     └───────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Challenge #1: Hallucination Prevention in Conlang Extrapolation
&lt;/h2&gt;

&lt;p&gt;Because the canonical dictionary has only ~80 terms, users translating sentences like &lt;em&gt;"Look at the ancient machine in the forest"&lt;/em&gt; require new vocabulary.&lt;/p&gt;

&lt;p&gt;If you give an LLM free rein, it will hallucinate English words with random accents or invent sounds that violate the fictional world's phonotactics.&lt;/p&gt;

&lt;p&gt;To solve this, I designed a &lt;strong&gt;multi-tier fallback system&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Tier 1 (Canonical SQLite Lookup):&lt;/strong&gt; If an exact phrase or word exists in &lt;code&gt;novo_dictionary.db&lt;/code&gt; (seeded directly from the companion booklet), return it immediately with &lt;code&gt;is_canonical = 1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tier 2 (Morphological Rules):&lt;/strong&gt; Check if the word can be constructed via known prefixes and suffixes (e.g., compounding &lt;em&gt;fata&lt;/em&gt; or appending &lt;code&gt;-ari&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tier 3 (Constrained Generative Extrapolation):&lt;/strong&gt; Prompt &lt;strong&gt;Google Gemini 3.1 Flash&lt;/strong&gt; (or a local &lt;strong&gt;Ollama&lt;/strong&gt; model like &lt;code&gt;llama3.2&lt;/code&gt; or &lt;code&gt;mistral&lt;/code&gt;) using an ironclad conlang system prompt:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// System instruction excerpt enforced during translation&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;CONLANG_PROMPT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`
You are the official linguistic translator for Novo Terali from Planet of Lana.
Follow these inviolable phonotactic constraints:
1. Every vowel is strictly: a [ah], e [eh], i [ee], o [oh], u [oo].
2. No consonant clusters exceeding 2 consonants; never use 'x', 'q', or 'z'.
3. Extrapolated roots MUST use open syllables (CV or CVC patterns like 'talo', 'suni', 'kora').
4. Compound from known roots where possible (e.g., 'machine' -&amp;gt; 'meka-fata').
5. Canonical vocabulary is SACRED: Never overwrite 'Tiai' (Hello), 'Cora' (Child/Leaf), etc.
Return strictly structured JSON containing translation, IPA phonetics, and grammar breakdown.
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When an extrapolated word is generated, it is tagged as &lt;code&gt;extrapolated&lt;/code&gt; and cached in SQLite so that subsequent translations remain 100% consistent across sessions.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Challenge #2: The Anti-Gibberish Quarantine Guard
&lt;/h2&gt;

&lt;p&gt;Once the app went online, a new vulnerability emerged: &lt;strong&gt;cache pollution via keyboard mashing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If someone types &lt;code&gt;"leftofkfmv"&lt;/code&gt; or &lt;code&gt;"asdfghjkl"&lt;/code&gt;, the LLM would dutifully attempt to coin a poetic Novo Terali term for it, saving garbage into the shared SQLite dictionary.&lt;/p&gt;

&lt;p&gt;To combat this without adding perceptible latency, I built a two-stage &lt;strong&gt;Linguistic Quarantine Layer&lt;/strong&gt; (&lt;code&gt;src/lib/validator.ts&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Heuristic Phonotactic Analysis (&amp;lt; 0.1ms):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Rejects repetitive character streaks (&lt;code&gt;/([a-z])\1{2,}/i&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Rejects impossible English consonant clusters (&lt;code&gt;/[bcdfghjklmnpqrstvwxz]{4,}/i&lt;/code&gt;, exempting valid sequences like &lt;em&gt;spl&lt;/em&gt;, &lt;em&gt;str&lt;/em&gt;, &lt;em&gt;ngth&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;Rejects vowel-less tokens longer than 2 characters.&lt;/li&gt;
&lt;li&gt;Rejects extreme single-word lengths (&amp;gt; 24 chars).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline English Lemma Verification (&amp;lt; 0.2ms):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Loaded a curated set of 45,000 common English words into a fast &lt;code&gt;Set&amp;lt;string&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Words failing both checks are rejected from the translation pipeline and logged to &lt;code&gt;data/quarantine_log.json&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateQuery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;ValidationResult&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tokens&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;+/&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;token&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;isImpossibleCluster&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nf"&gt;isRepetitiveMash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;isValid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Phonotactic violation detected&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;isValid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To give developers and administrators complete control, I added a dedicated &lt;strong&gt;Quarantine Admin Panel&lt;/strong&gt; directly in the UI. Administrators authenticate using an &lt;code&gt;ADMIN_KEY&lt;/code&gt; header, inspect suspicious inputs, approve verified terms into the canonical codex, or flush fraudulent entries with one click.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Challenge #3: Giving Lana a Voice with Acoustic Tuning
&lt;/h2&gt;

&lt;p&gt;A conlang only feels alive when you can hear it spoken. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Planet of Lana&lt;/em&gt; features evocative, emotional voice acting. The developer notes highlighted that Italian voice actors captured the cadence best because of the open vowels and tapped consonants.&lt;/p&gt;

&lt;p&gt;To reproduce this, I integrated the &lt;strong&gt;ElevenLabs Text-to-Speech API&lt;/strong&gt;, selecting the &lt;strong&gt;Gigi&lt;/strong&gt; voice model (a youthful, melodic tone) and meticulously calibrating its acoustic profile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;voiceSettings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;voice_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Qd7hDo3tdwmASCs5vLEB&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Gigi&lt;/span&gt;
  &lt;span class="na"&gt;model_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eleven_multilingual_v2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;voice_settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;stability&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.82&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;// High stability keeps Italianate vowels consistent&lt;/span&gt;
    &lt;span class="na"&gt;similarity_boost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.85&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// Accurately locks to the vocal timbre&lt;/span&gt;
    &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;               &lt;span class="c1"&gt;// Neutral expressive base prevents over-dramatization&lt;/span&gt;
    &lt;span class="na"&gt;speed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.85&lt;/span&gt;               &lt;span class="c1"&gt;// 15% reduction matches the calm, unhurried Novo pace&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When users click the speaker button next to any phrase, the server streams high-fidelity 44.1kHz audio in under 400ms. If ElevenLabs is not configured, the app gracefully falls back to the browser's native Web Speech API with an Italian phonetic voice profile.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Deployment &amp;amp; Cloud Hardening
&lt;/h2&gt;

&lt;p&gt;To make NovoGen accessible worldwide, I packaged it as a multi-stage Docker container and deployed it to &lt;strong&gt;Google Cloud Run&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Container Size:&lt;/strong&gt; Reduced using Next.js standalone output mode (&lt;code&gt;output: "standalone"&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Persistence:&lt;/strong&gt; Cloud Run containers use a stateless root filesystem. I wrote an automated bootstrap script that copies &lt;code&gt;novo_dictionary.db&lt;/code&gt; to &lt;code&gt;/tmp&lt;/code&gt; upon startup, granting the SQLite engine full read-write capabilities during execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate Limiting:&lt;/strong&gt; Implemented an in-memory sliding-window limiter (&lt;code&gt;src/lib/rateLimit.ts&lt;/code&gt;) enforcing 30 translations/min and 10 voice syntheses/min per IP to protect downstream APIs from quota abuse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Domain:&lt;/strong&gt; Mapped to &lt;strong&gt;&lt;a href="https://novogen.inusha.me" rel="noopener noreferrer"&gt;https://novogen.inusha.me&lt;/a&gt;&lt;/strong&gt; backed by Google-managed SSL certificates.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. The Result: Taking the Challenge to the Stars
&lt;/h2&gt;

&lt;p&gt;Here is what the translation engine can do.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 1: Canonical Dialogue Match
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;English:&lt;/strong&gt; &lt;em&gt;"We have to stop them, Lana."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Novo Terali:&lt;/strong&gt; &lt;em&gt;"Ite o imaiem, Lana."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breakdown:&lt;/strong&gt; Canonical sentence from Chapter 3 of the companion guide.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example 2: Complex Extrapolated Expression
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;English:&lt;/strong&gt; &lt;em&gt;"Listen to the music of the stars, little child."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Novo Terali:&lt;/strong&gt; &lt;em&gt;"Teno lo sonari de eora stel, cora."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breakdown:&lt;/strong&gt; 

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Teno&lt;/em&gt; (listen) — coined root adhering to CV phonology.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;sonari&lt;/em&gt; (music) — derived from &lt;em&gt;son&lt;/em&gt; (sound) + &lt;em&gt;-ari&lt;/em&gt; (nominalizer).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;cora&lt;/em&gt; — preserved canonical cultural root for child/leaf.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try It Out!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Web Application:&lt;/strong&gt; &lt;a href="https://novogen.inusha.me" rel="noopener noreferrer"&gt;https://novogen.inusha.me&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To the team at &lt;strong&gt;Wishfully&lt;/strong&gt; (@planetoflana): You asked us for a shoutout in Novo Terali. &lt;/p&gt;

&lt;p&gt;Instead, I built an entire engine so the whole world can speak it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Ite fatum tia, Wishfully. Tiai Novo Terali!"&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;(We believe in you, Wishfully. Long live Novo Terali!)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




</description>
      <category>webdev</category>
      <category>ai</category>
      <category>typescript</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Multi-Agent Gift Recommendation Engine Powered by Google ADK &amp; Gemini</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Fri, 21 Aug 2026 15:27:55 +0000</pubDate>
      <link>https://dev.to/inushathathsara/multi-agent-gift-recommendation-engine-powered-by-google-adk-gemini-3669</link>
      <guid>https://dev.to/inushathathsara/multi-agent-gift-recommendation-engine-powered-by-google-adk-gemini-3669</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is my submission for &lt;a href="https://dev.to/deved/build-multi-agent-systems"&gt;DEV Education Track: Build Multi-Agent Systems with ADK&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Finding the perfect, thoughtful gift shouldn't feel like a chore.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Whether it's for a birthday, anniversary, or holiday, we all experience gift-buying paralysis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generic suggestions&lt;/strong&gt;: "Just buy them a mug or a generic gift card."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget anxiety&lt;/strong&gt;: Falling in love with an idea only to find out it costs 3x what you planned to spend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missing the subtle nuances&lt;/strong&gt;: Forgetting that someone dislikes clutter, lives in a tiny apartment, or prefers practical experiences over physical objects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To solve this, I built &lt;strong&gt;GiftAdvisor&lt;/strong&gt;. It is an intelligent, consumer-friendly gift recommendation system built with &lt;strong&gt;Google Agent Development Kit (ADK)&lt;/strong&gt;, &lt;strong&gt;Gemini (&lt;code&gt;gemini-3.1-flash-lite&lt;/code&gt;)&lt;/strong&gt;, and deployed seamlessly to &lt;strong&gt;Google Cloud Run&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Live Demo &amp;amp; Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Cloud Run App&lt;/strong&gt;: &lt;a href="https://gift-advisor-1008832068452.us-central1.run.app" rel="noopener noreferrer"&gt;https://gift-advisor-1008832068452.us-central1.run.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/inusha-thathsara/Multi-Agent-Gift-Idea-Generator-with-Google-ADK" rel="noopener noreferrer"&gt;https://github.com/inusha-thathsara/Multi-Agent-Gift-Idea-Generator-with-Google-ADK&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GiftAdvisor&lt;/strong&gt; transforms unstructured descriptions of a person into tailored, ranked, and strictly budget-compliant gift recommendations. &lt;/p&gt;

&lt;p&gt;Instead of dumping everything into a single monolithic prompt, GiftAdvisor splits the cognitive load across &lt;strong&gt;three specialized AI agents&lt;/strong&gt; orchestrated via Google ADK:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Profile Analyzer Agent&lt;/strong&gt;: Understands the human behind the prompt (lifestyle, hobbies, aesthetic preferences, and explicit &lt;em&gt;anti-preferences&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Idea Finder Agent&lt;/strong&gt;: Brainstorms creative, thoughtful candidate gifts across multiple categories with estimated market prices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget Filter Agent&lt;/strong&gt;: Audits estimated prices, filters out anything exceeding the user's hard budget limit, swaps in budget-friendly alternatives, and delivers a ranked curation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Key Highlights &amp;amp; Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pure Multi-Agent Pipeline&lt;/strong&gt;: Built using Google ADK's &lt;code&gt;LlmAgent&lt;/code&gt;, &lt;code&gt;SequentialAgent&lt;/code&gt;, and &lt;code&gt;InMemorySessionService&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Overhead Scale-to-Zero&lt;/strong&gt;: Deployed to Google Cloud Run with &lt;code&gt;min-instances=0&lt;/code&gt; (scales to zero when idle for $0.00 base cost).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern Glassmorphism UI&lt;/strong&gt;: Intuitive dark-mode consumer interface with 1-click preset profiles, interactive budget slider, and live pipeline stage tracking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comprehensive Export System&lt;/strong&gt;: Export recommendations with 1 click to Markdown (&lt;code&gt;.md&lt;/code&gt;), JSON (&lt;code&gt;.json&lt;/code&gt;), Clipboard, or Print / Save as PDF.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Cloud Run Embed
&lt;/h2&gt;


&lt;div class="ltag__cloud-run"&gt;
  &lt;iframe height="600px" src="https://gift-advisor-1008832068452.us-central1.run.app"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;





&lt;h3&gt;
  
  
  1. Profile Analyzer Agent (&lt;code&gt;ProfileAnalyzerAgent&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Role&lt;/strong&gt;: Empathy &amp;amp; Persona Architect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What it does&lt;/strong&gt;: Ingests raw user inputs (e.g., &lt;em&gt;"My 29yo sister loves specialty pour-over coffee and houseplants, but lives in a small apartment"&lt;/em&gt;). It extracts core interests, lifestyle dimensions, emotional tone, and most importantly, &lt;strong&gt;anti-preferences&lt;/strong&gt; (e.g., &lt;em&gt;no large items, avoid generic mugs&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ADK Output Key&lt;/strong&gt;: &lt;code&gt;recipient_profile&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;profile_analyzer_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ProfileAnalyzerAgent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    You are an expert gift persona analyzer.
    Analyze the recipient&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s description, occasion, and relationship.
    Extract key traits, hobbies, lifestyle context, and explicit anti-preferences (what to avoid).
    Save your structured analysis to session state key &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;recipient_profile&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;.
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;output_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;recipient_profile&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Idea Finder Agent (&lt;code&gt;IdeaFinderAgent&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Role&lt;/strong&gt;: Creative Ideation Specialist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What it does&lt;/strong&gt;: Reads &lt;code&gt;{recipient_profile}&lt;/code&gt; from the session state and ideates 6–10 candidate ideas across diverse categories (e.g., &lt;em&gt;Experiential, Practical Everyday, Consumable / Artisan, Sentimental&lt;/em&gt;). It attaches realistic estimated market prices to every item.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ADK Output Key&lt;/strong&gt;: &lt;code&gt;candidate_gift_ideas&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;idea_finder_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;IdeaFinderAgent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    You are a creative gift brainstormer.
    Given the recipient profile:
    {recipient_profile}

    Brainstorm 6 to 10 distinct, creative gift ideas across multiple categories.
    For each idea, provide a realistic estimated market price.
    Save your candidate ideas to session state key &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;candidate_gift_ideas&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;.
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;output_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;candidate_gift_ideas&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Budget Filter Agent (&lt;code&gt;BudgetFilterAgent&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Role&lt;/strong&gt;: Financial Auditor &amp;amp; Final Curator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What it does&lt;/strong&gt;: Reads &lt;code&gt;{candidate_gift_ideas}&lt;/code&gt;, &lt;code&gt;{budget_limit}&lt;/code&gt;, and &lt;code&gt;{currency}&lt;/code&gt;. It validates each candidate against the budget ceiling. Any item that exceeds the budget is logged in an &lt;strong&gt;Elimination Audit&lt;/strong&gt; and replaced with a budget-friendly alternative. The agent then organizes recommendations into budget tiers (&lt;em&gt;Splurge, Sweet Spot, Budget Friendly&lt;/em&gt;) with specific buying advice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ADK Output Key&lt;/strong&gt;: &lt;code&gt;final_gift_recommendations&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;budget_filter_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;BudgetFilterAgent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    You are a meticulous gift budget auditor and curator.
    Budget Limit: {budget_limit} {currency}
    Candidate Ideas:
    {candidate_gift_ideas}

    1. Audit each idea against the budget ceiling.
    2. Eliminate items that exceed the limit and suggest budget-friendly alternatives.
    3. Present the Top 3-5 Recommended Gifts formatted into budget tiers with rationale.
    Save the final report to session state key &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;final_gift_recommendations&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;.
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;output_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;final_gift_recommendations&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Orchestration with &lt;code&gt;SequentialAgent&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Google ADK makes chaining agents intuitive using &lt;code&gt;SequentialAgent&lt;/code&gt;. State flows from one agent's &lt;code&gt;output_key&lt;/code&gt; directly into the next agent's prompt template variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;gift_advisor_pipeline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SequentialAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GiftAdvisorPipeline&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;sub_agents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="n"&gt;profile_analyzer_agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;idea_finder_agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;budget_filter_agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Implementation &amp;amp; Architecture
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Backend Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework&lt;/strong&gt;: Python 3.12, FastAPI, Uvicorn&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Framework&lt;/strong&gt;: &lt;code&gt;google-adk&lt;/code&gt; (Agent Development Kit v2.7.0)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt;: &lt;code&gt;gemini-3.1-flash-lite&lt;/code&gt; (via &lt;code&gt;google-genai&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment&lt;/strong&gt;: Google Cloud Run (Containerized via Docker)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cloud Run Production Optimization
&lt;/h3&gt;

&lt;p&gt;To keep running costs near $0.00 while maintaining rapid startup times:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;min-instances = 0&lt;/code&gt;&lt;/strong&gt;: Cloud Run spins down to zero instances when no traffic is being served.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;memory = 512MiB&lt;/code&gt; &amp;amp; &lt;code&gt;cpu = 1 vCPU&lt;/code&gt;&lt;/strong&gt;: Lightweight footprint optimized for async FastAPI and Google ADK orchestration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;gemini-3.1-flash-lite&lt;/code&gt;&lt;/strong&gt;: Ultra-fast latency with minimal token consumption.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Key Learnings
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Separation of Concerns Prevents Hallucination&lt;/strong&gt;:&lt;br&gt;
When asking a single LLM prompt to analyze personality, brainstorm 10 items, and filter by budget simultaneously, it often ignores budget limits or produces bland suggestions. By decoupling &lt;em&gt;Analysis&lt;/em&gt; -&amp;gt; &lt;em&gt;Ideation&lt;/em&gt; -&amp;gt; &lt;em&gt;Budget Auditing&lt;/em&gt; into separate ADK agents, each agent performs its task with significantly higher precision.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Session State is the Superpower of ADK&lt;/strong&gt;:&lt;br&gt;
Using &lt;code&gt;InMemorySessionService&lt;/code&gt; and prompt variable injection (&lt;code&gt;{recipient_profile}&lt;/code&gt;, &lt;code&gt;{candidate_gift_ideas}&lt;/code&gt;) made passing structured context between agents clean, traceable, and modular.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloud Run + Gemini is a Perfect Match&lt;/strong&gt;:&lt;br&gt;
Deploying containerized Python agent applications to Cloud Run gives you an instant HTTPS public API with scale-to-zero economics. No idle server bills, automatic TLS certificates, and global scaling out of the box.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Conclusion &amp;amp; What's Next
&lt;/h2&gt;

&lt;p&gt;Building &lt;strong&gt;GiftAdvisor&lt;/strong&gt; with Google ADK demonstrated how accessible and clean multi-agent orchestration has become in Python. &lt;/p&gt;

&lt;h3&gt;
  
  
  Future Ideas
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Search Tool Integration&lt;/strong&gt;: Connecting Google Search grounding or SerpAPI to pull real-time e-commerce links and stock availability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Group Gift Mode&lt;/strong&gt;: Splitting a high-ticket budget across multiple contributors with automated per-person share calculations.&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>agents</category>
      <category>buildmultiagents</category>
      <category>gemini</category>
      <category>adk</category>
    </item>
    <item>
      <title>AI-Powered Calming Audio &amp; Voice Companion for Dogs Home Alone</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Sat, 15 Aug 2026 20:19:59 +0000</pubDate>
      <link>https://dev.to/inushathathsara/ai-powered-calming-audio-voice-companion-for-dogs-home-alone-19d9</link>
      <guid>https://dev.to/inushathathsara/ai-powered-calming-audio-voice-companion-for-dogs-home-alone-19d9</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/weekend-2026-08-13"&gt;Weekend Challenge: Dog Days Edition&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Over 70% of dogs suffer from some degree of &lt;strong&gt;separation anxiety&lt;/strong&gt; when their owners leave for work, errands, or travel. Symptoms include frantic barking, whining, pacing, destructive chewing, and prolonged stress spikes. Standard pet playlists on streaming platforms are static, repetitive, and lack the familiar reassurance pets crave most: &lt;strong&gt;their human's voice&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paws &amp;amp; Peace&lt;/strong&gt; is an intelligent, multi-platform sensory comfort system designed to give pets a peaceful home-alone experience. Available as both a modern web app and a native Android application, it combines:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Personalized AI &amp;amp; Owner Voice Loops&lt;/strong&gt;: Using &lt;strong&gt;ElevenLabs AI Voice Synthesis&lt;/strong&gt;, pet parents can generate warm, soothing voice messages with their pet's name, customized reassurance phrases, and fine-tuned stability and clarity. Owners can also record their real voices directly in the built-in Voice Studio.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layered Procedural Soundscapes&lt;/strong&gt;: Real-time synthesized pink-noise rainfall (to mask sudden doorbell and traffic sounds), a rhythmic maternal heartbeat simulator (60–70 BPM), and 432Hz harmonic drone frequencies scientifically proven to lower canine heart rates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent Departure &amp;amp; Interval Loops&lt;/strong&gt;: Paced session scheduler with configurable departure delays (e.g., starts 5 minutes after leaving) and recurring voice reassurance (e.g., repeating loving phrases every 3 minutes).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Biofeedback Breathing Visualizer&lt;/strong&gt;: Luminous multi-ring ripple visualizer paired with live equalizers to create a tranquil visual atmosphere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-Tap Smart Presets&lt;/strong&gt;: Instant audio mixes tailored for &lt;em&gt;Thunder Shield&lt;/em&gt;, &lt;em&gt;Bedtime Lullaby&lt;/em&gt;, &lt;em&gt;Leaving Home&lt;/em&gt;, and &lt;em&gt;Quick Nap&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Web Application&lt;/strong&gt;: &lt;a href="https://weekend-challenge-dog-days-edition-phi.vercel.app" rel="noopener noreferrer"&gt;https://weekend-challenge-dog-days-edition-phi.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Android Native APK&lt;/strong&gt;: &lt;a href="https://github.com/inusha-thathsara/Weekend-Challenge-Dog-Days-Edition---Home-Alone-Playlist/releases/tag/v2.0.0" rel="noopener noreferrer"&gt;Download v2.0.0 APK&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Web &amp;amp; Mobile Experience:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web App&lt;/strong&gt;: Glassmorphic, dark-mode responsive dashboard with Web Audio API procedural sound synthesis and Web Speech API fallback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Android App&lt;/strong&gt;: Native Jetpack Compose UI with AndroidX Media3 background foreground service that keeps soothing pets uninterrupted even when the device screen is locked.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/inusha-thathsara/Weekend-Challenge-Dog-Days-Edition---Home-Alone-Playlist" rel="noopener noreferrer"&gt;https://github.com/inusha-thathsara/Weekend-Challenge-Dog-Days-Edition---Home-Alone-Playlist&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;Building a truly effective sensory companion for dogs required blending canine psychoacoustics with modern cross-platform engineering.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Deep Integration with ElevenLabs AI Voice Synthesis
&lt;/h3&gt;

&lt;p&gt;Voice is the strongest comfort cue for a dog. We integrated ElevenLabs' cutting-edge Text-to-Speech API to craft lifelike, warm voice tracks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Turbo v2.5 Engine (&lt;code&gt;eleven_turbo_v2_5&lt;/code&gt;)&lt;/strong&gt;: Upgraded synthesis to the newest ultra-low latency model (&amp;lt;300ms response time) with high throughput and lower credit usage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Curated Soothing Voice Models&lt;/strong&gt;: Selected gentle, calming voices (&lt;em&gt;Rachel, Bella, Antoni, Domi, Elli&lt;/em&gt;) with adjustable &lt;strong&gt;Voice Stability&lt;/strong&gt; (0.3 – 1.0) and &lt;strong&gt;Similarity / Clarity Boost&lt;/strong&gt; (0.3 – 1.0) to achieve a soft, motherly or gentle fatherly cadence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Retry &amp;amp; Rate Limit Handling&lt;/strong&gt;: Implemented exponential backoff retry logic that catches burst rate limits (&lt;code&gt;HTTP 429&lt;/code&gt;), waits 1.5 seconds, and transparently completes generation without failing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instant Audio Preview Engine&lt;/strong&gt;: Embedded &lt;code&gt;MediaPlayer&lt;/code&gt; (Android) and &lt;code&gt;AudioContext&lt;/code&gt; (Web) previewers that immediately play synthesized tracks so owners can audit tone and volume before leaving.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compile-Time Build Bridge&lt;/strong&gt;: On Android, Gradle automatically reads &lt;code&gt;VITE_ELEVENLABS_API_KEY&lt;/code&gt; from &lt;code&gt;.env&lt;/code&gt; and injects it into &lt;code&gt;BuildConfig&lt;/code&gt;, enabling zero-config out-of-the-box synthesis while still allowing user overrides in the Settings dialog.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Procedural Audio Synthesis (No Internet / No MP3 Loops)
&lt;/h3&gt;

&lt;p&gt;Instead of streaming heavy, looping MP3 audio files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web&lt;/strong&gt;: Implemented dynamic Web Audio API nodes with continuous pink noise buffers, a low-pass bi-quad filter, and an LFO oscillator for the rhythmic heartbeat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Android&lt;/strong&gt;: Engineered a native &lt;code&gt;AudioSynthesizer&lt;/code&gt; using &lt;code&gt;AudioTrack&lt;/code&gt; and direct PCM byte synthesis. This ensures zero network usage, minimal memory footprint, and infinite non-repeating acoustic variation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canine Acoustic Science&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Pink Noise&lt;/em&gt;: Has equal energy per octave ($1/f$ spectral density), which matches canine hearing frequency curves and masks sudden acoustic triggers (thunder, sirens).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Maternal Heartbeat&lt;/em&gt;: Low-pass filtered dual-pulse (lub-dub) at 65 BPM simulating a mother dog's calming presence.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;432Hz Sine Harmonic&lt;/em&gt;: Calibrated sinusoidal frequency associated with parasympathetic nervous system activation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Native Android Architecture (Jetpack Compose &amp;amp; Media3)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;UI &amp;amp; Design System&lt;/strong&gt;: Built with 100% Jetpack Compose and Material 3, featuring glassmorphism, responsive 50/50 segmented tab controls, custom equalizers, and glowing gradient action buttons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Background Foreground Service&lt;/strong&gt;: Implemented &lt;code&gt;PlaybackService&lt;/code&gt; powered by &lt;code&gt;androidx.media3.exoplayer&lt;/code&gt; and &lt;code&gt;MediaSessionService&lt;/code&gt;. This ensures that even when the owner locks the phone or puts it on the counter, the soothing playlist continues running indefinitely with interactive lock-screen media controls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management&lt;/strong&gt;: Built on unidirectional Data Flow with &lt;code&gt;HomeViewModel&lt;/code&gt;, Kotlin Coroutines, &lt;code&gt;StateFlow&lt;/code&gt;, and Jetpack Preferences DataStore for instant persistence of pet profiles and voice preferences.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built for dogs everywhere who deserve peace and comfort while waiting for their best friends to come home.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
    </item>
    <item>
      <title>Production AI Dog Breed Identifier &amp; Care Guide</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Sat, 15 Aug 2026 17:38:43 +0000</pubDate>
      <link>https://dev.to/inushathathsara/production-ai-dog-breed-identifier-care-guide-31if</link>
      <guid>https://dev.to/inushathathsara/production-ai-dog-breed-identifier-care-guide-31if</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/weekend-2026-08-13"&gt;Weekend Challenge: Dog Days Edition&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Have you ever looked at a dog at the park or in an adoption shelter and wondered: &lt;em&gt;"What breed is that, and what kind of care does it need?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Meet &lt;strong&gt;BreedSnap&lt;/strong&gt;, a production-grade, full-stack canine intelligence web application powered by &lt;strong&gt;Google Gemini Multimodal Vision AI&lt;/strong&gt;. With just a single photo, BreedSnap instantly identifies the dog breed, scores temperament and energy traits, generates a veterinary-grade care guide, and lets you download a verified PDF breeding report with one click.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;BreedSnap&lt;/strong&gt; transforms any canine photo into an actionable, comprehensive genetic and breed profile. &lt;/p&gt;

&lt;p&gt;Instead of returning a simple text label, BreedSnap delivers a complete companion intelligence profile:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instant Canine Visual Recognition&lt;/strong&gt;: Snap a live photo using your phone's camera, drag and drop files from desktop, or test instantly with one-click canine presets (&lt;em&gt;Golden Retriever&lt;/em&gt;, &lt;em&gt;Siberian Husky&lt;/em&gt;, &lt;em&gt;Pembroke Welsh Corgi&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep Breed &amp;amp; Heritage Breakdown&lt;/strong&gt;: Pinpoints official breed names, historical origins, and confidence ratings with ~99% match accuracy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5-Factor Trait &amp;amp; Temperament Scoring&lt;/strong&gt;: Visual 5-point rating bars for:

&lt;ul&gt;
&lt;li&gt;Energy Level&lt;/li&gt;
&lt;li&gt;Trainability &amp;amp; Intelligence&lt;/li&gt;
&lt;li&gt;Family &amp;amp; Child Friendliness&lt;/li&gt;
&lt;li&gt;Grooming Demand&lt;/li&gt;
&lt;li&gt;Barking Tendency&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Veterinary Care Guide &amp;amp; Health Watchlist&lt;/strong&gt;: Provides tailored daily exercise routines, coat maintenance frequency, dietary guidelines, adult weight/size specs, life expectancy, and a genetic health watchlist (e.g., hip dysplasia, IVDD, cataracts).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canine Trivia &amp;amp; Heritage&lt;/strong&gt;: Uncovers historical folklore and behavioral facts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Downloadable Official PDF Report&lt;/strong&gt;: Compiles a print-ready, high-resolution PDF certificate containing the dog's photo, visual rating bars, care matrix, and verification seal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice Pronunciation&lt;/strong&gt;: Native audio synthesis of complex breed names using the Web Speech API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistent Scan History&lt;/strong&gt;: Local storage-backed scan drawer allowing users to browse, reload, and re-export past analyses offline.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Application&lt;/strong&gt;: &lt;a href="https://weekend-challenge-dog-days-edition-nine.vercel.app" rel="noopener noreferrer"&gt;https://weekend-challenge-dog-days-edition-nine.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source Code Repository&lt;/strong&gt;: &lt;a href="https://github.com/inusha-thathsara/Weekend-Challenge-Dog-Days-Edition---Breed-Identifier" rel="noopener noreferrer"&gt;https://github.com/inusha-thathsara/Weekend-Challenge-Dog-Days-Edition---Breed-Identifier&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The entire codebase is open-source and available on GitHub:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository Link&lt;/strong&gt;: &lt;a href="https://github.com/inusha-thathsara/Weekend-Challenge-Dog-Days-Edition---Breed-Identifier" rel="noopener noreferrer"&gt;https://github.com/inusha-thathsara/Weekend-Challenge-Dog-Days-Edition---Breed-Identifier&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Architecture &amp;amp; Tech Stack
&lt;/h3&gt;

&lt;p&gt;BreedSnap was designed with speed, privacy, and visual excellence in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: Lightweight Vanilla HTML5, modern CSS3 (custom glassmorphism design system, Outfit &amp;amp; Plus Jakarta Sans typography, smooth micro-animations), and modular ES6+ JavaScript.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend API&lt;/strong&gt;: Node.js &amp;amp; Express with rate-limiting middleware (&lt;code&gt;express-rate-limit&lt;/code&gt;) to prevent API abuse and securely isolate the Gemini API key from the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Serverless Ready&lt;/strong&gt;: Native Vercel Serverless Functions (&lt;code&gt;/api/identify.js&lt;/code&gt;, &lt;code&gt;/api/status.js&lt;/code&gt;) and &lt;code&gt;vercel.json&lt;/code&gt; for 1-click zero-config cloud deployments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Vision Engine&lt;/strong&gt;: Google Generative Language API (&lt;strong&gt;Gemini 3.1 Flash / Gemini 3.7 Flash&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PDF Engine&lt;/strong&gt;: Client-side document compilation with &lt;code&gt;html2pdf.js&lt;/code&gt; and CSS print media stylesheets (&lt;code&gt;@media print&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Prompt Engineering &amp;amp; Structured Gemini Vision
&lt;/h3&gt;

&lt;p&gt;To ensure consistent veterinary outputs, Gemini is guided with structured system instructions and &lt;code&gt;responseMimeType: "application/json"&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`You are a world-class veterinarian and canine genetics expert. Analyze this dog photo carefully.
Respond strictly with valid JSON only (no markdown fencing, no backticks, no explanatory comments).

If the image clearly contains a dog, return:
{
  "isDog": true,
  "breed": "Official breed name (e.g. Golden Retriever, French Bulldog)",
  "confidence": "High (98%) / Medium (85%) / Low (60%)",
  "origin": "Country / Region of origin",
  "summary": "Engaging 2-3 sentence overview of this breed's character and heritage.",
  "temperament": ["Trait 1", "Trait 2", "Trait 3", "Trait 4"],
  "size": "Size category and typical adult weight range (lbs &amp;amp; kg)",
  "lifespan": "Typical life expectancy in years",
  "ratings": {
    "energyLevel": 1-5,
    "groomingDemand": 1-5,
    "trainability": 1-5,
    "childFriendliness": 1-5,
    "barkingTendency": 1-5
  },
  "careGuide": {
    "exercise": "Recommended daily exercise schedule and activity types",
    "grooming": "Coat maintenance and grooming frequency",
    "nutrition": "Dietary requirements or sensitivities",
    "healthWatchlist": "Common genetic health conditions to monitor"
  },
  "funFacts": [
    "Fascinating historical or behavioral trivia item 1",
    "Fascinating historical or behavioral trivia item 2"
  ]
}

If the image does NOT contain a dog:
{
  "isDog": false,
  "message": "A friendly, witty description of what is actually visible in the image."
}`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. Resilient Multi-Model Fallback Cascade
&lt;/h3&gt;

&lt;p&gt;To guard against high-demand traffic spikes and quota limits, the backend implements an automatic fallback cascade across Gemini models:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;gemini-3.1-flash-lite&lt;/code&gt; (ultra-fast latency &amp;amp; high throughput)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gemini-3.7-flash&lt;/code&gt; (deep multimodal reasoning)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gemini-3.5-flash&lt;/code&gt; (high-capacity fallback)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If any model encounters high demand or temporary unavailability, the request seamlessly transitions to the next model without failing the user experience.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Official PDF Report Generation
&lt;/h3&gt;

&lt;p&gt;Rather than a simple screenshot, clicking &lt;strong&gt;Download PDF Report&lt;/strong&gt; dynamically constructs a high-resolution, branded certificate offscreen, formatting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The analyzed dog's photo&lt;/li&gt;
&lt;li&gt;Official breed title &amp;amp; match badge&lt;/li&gt;
&lt;li&gt;Visual 5-star trait rating bars&lt;/li&gt;
&lt;li&gt;3-column care guide matrix&lt;/li&gt;
&lt;li&gt;Health watchlist alert box&lt;/li&gt;
&lt;li&gt;Official diagnostic verification stamp&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What's Next for BreedSnap?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Dog Detection&lt;/strong&gt;: Identifying and segmenting multiple dogs in a single group photo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mixed Breed Percentage Estimator&lt;/strong&gt;: Estimating heritage percentages for rescue and cross-breed dogs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PWA Support&lt;/strong&gt;: Full offline caching with installable mobile home-screen capabilities.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Thank you for reading! Feel free to check out the live demo and share your feedback in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
    </item>
    <item>
      <title>Building an Adjarian Khachapuri in Pure CSS</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Sat, 15 Aug 2026 15:44:58 +0000</pubDate>
      <link>https://dev.to/inushathathsara/building-an-adjarian-khachapuri-in-pure-css-4e2d</link>
      <guid>https://dev.to/inushathathsara/building-an-adjarian-khachapuri-in-pure-css-4e2d</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/frontend-2026-07-29"&gt;Frontend Challenge - Comfort Food Edition, CSS Art&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspiration
&lt;/h2&gt;

&lt;p&gt;My comfort-food inspiration for this project was Adjarian khachapuri, the iconic Georgian cheese bread with a golden crust and a molten egg yolk resting in the center. It feels like a warm, homemade hug: rich, cozy, and deeply comforting. I wanted to recreate not just the look of the dish, but the feeling of it being fresh from the oven.&lt;/p&gt;

&lt;p&gt;I love how food can be a story in itself, and this challenge gave me a chance to turn a favorite comfort dish into a tiny scene built entirely with HTML and CSS. The goal was to capture the softness of the cheese, the warmth of the crust, and the playful glow of the yolk through gradients, shadows, and subtle motion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;This project is a pure CSS illustration of an Adjarian khachapuri, built with layered shapes and gradients rather than external images or assets.&lt;/p&gt;

&lt;p&gt;Live demo: &lt;a href="https://github.com/inusha-thathsara/Frontend-Challenge-Comfort-Food-Edition-CSS-Art-Comfort-Food" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to view it locally, just open the project in a browser and interact with the yolk to trigger the jiggle animation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;This project started as a simple challenge: create a food illustration using only CSS. I quickly realized that the real magic was in the details. The crust needed warmth and depth, the cheese needed softness and texture, and the yolk needed to feel glossy and slightly luxurious without relying on any images.&lt;/p&gt;

&lt;p&gt;I spent most of my time refining the gradients and shadows to give the khachapuri a more realistic, premium look. The crust is built with warm browns and highlights to mimic baked dough, while the cheese uses soft ivory tones and subtle highlight bubbles to create a melted, creamy effect. The yolk is the focal point, and I added a small jiggle animation so the composition feels alive and playful.&lt;/p&gt;

&lt;p&gt;One thing I’m especially proud of is the way the illustration still feels simple and clean even with the detailed shading. It stays very CSS-first, but it has enough contrast and texture to feel like a polished food shot.&lt;/p&gt;

&lt;p&gt;I also learned how much personality can come from small design choices: the steam, the shadow beneath the board, the wobble of the bread, and even the tiny highlights on the cheese. These details make the illustration feel warm and appetizing rather than rigid or flat.&lt;/p&gt;

&lt;p&gt;This project reminded me that CSS art is not just about drawing shapes. It is about crafting emotion. A comfortable, believable composition can do a lot with color, depth, and motion alone.&lt;/p&gt;

&lt;p&gt;I hope to keep exploring more food-themed CSS illustrations in the future, especially ones that focus on texture and storytelling. It has been a really fun way to combine design, illustration, and front-end development.&lt;/p&gt;




&lt;p&gt;Thanks for reading, and if you love warm comfort food as much as I do, I hope this little khachapuri made you smile.&lt;/p&gt;

</description>
      <category>frontendchallenge</category>
      <category>devchallenge</category>
      <category>css</category>
    </item>
    <item>
      <title>Building a 60fps Scroll-Driven Showcase with Vanilla HTML, CSS, and GSAP</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Fri, 14 Aug 2026 09:02:05 +0000</pubDate>
      <link>https://dev.to/inushathathsara/building-a-60fps-scroll-driven-showcase-with-vanilla-html-css-and-gsap-5188</link>
      <guid>https://dev.to/inushathathsara/building-a-60fps-scroll-driven-showcase-with-vanilla-html-css-and-gsap-5188</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/frontend-2026-07-29"&gt;Frontend Challenge - Comfort Food Edition, Perfect Landing&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;For this challenge, I built A World of Warmth, an editorial, scroll-driven landing page and mythic codex celebrating comfort food as a universal language of love, nostalgia, and human connection. Rather than creating a standard restaurant site or commercial meal-delivery platform, I wanted to craft an immersive digital publication that treats comfort food not merely as sustenance, but as "history served hot." The experience begins with a full-viewport hero scene bathed in warm candlelight and ambient tones, setting an intimate, candlelit tone that invites visitors to embark on a culinary journey across six continents.&lt;/p&gt;

&lt;p&gt;To capture this spirit, the landing page is structured into six full-bleed chapter stories featuring Japanese Tonkotsu Ramen, American Baked Mac &amp;amp; Cheese, Indian Dal Khichdi, French Pot-au-Feu, West African Party Jollof Rice, and Mexican Pork Tamales. Each chapter weaves together origin lore, flavor profiles, and rich imagery, paired with a word-by-word scroll manifesto and an interactive infographic breaking down the real neuroscience behind why comfort food makes us feel so safe and happy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://inusha-thathsara.github.io/Frontend-Challenge-Comfort-Food-Edition---Perfect-Landing/" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fip7f6gjoftf39jf45zit.png" alt="Demo" width="572" height="1024"&gt;&lt;/a&gt;&lt;br&gt;
Click on above image for the Demo. 🔝&lt;/p&gt;

&lt;p&gt;Source Code: &lt;a href="https://github.com/inusha-thathsara/Frontend-Challenge-Comfort-Food-Edition---Perfect-Landing" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;My journey building A World of Warmth began with a clear goal: to avoid creating a simple minimum viable product and instead engineer a complete, magazine-quality web experience that wows users visually while delivering rock-solid frontend fundamentals. Throughout the development process, I learned invaluable lessons about orchestrating complex scroll-driven animations and balancing hardware-accelerated motion with robust fallback systems. Integrating GSAP ScrollTrigger taught me how to fine-tune scroll scrubbing, word-by-word text color reveals, and multi-layered image parallax without triggering layout thrashing or dropping frames. What I am most proud of in this project is the seamless fusion of high-end visual polish with lighthearted, creative storytelling. Watching the project transform from a visual editorial landing page into an interactive Mythic Recipe Codex where clicking a card reveals absurd data like 4,000-year-old eclipse bones and 420-lightyear cook times brought an unexpected layer of joy and humor to the user experience.&lt;/p&gt;

&lt;p&gt;Thank You!&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>frontendchallenge</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Translating Culinary Comfort into Pure CSS Art</title>
      <dc:creator>Malawige Inusha Thathsara Gunasekara</dc:creator>
      <pubDate>Fri, 14 Aug 2026 07:45:45 +0000</pubDate>
      <link>https://dev.to/inushathathsara/translating-culinary-comfort-into-pure-css-art-39gg</link>
      <guid>https://dev.to/inushathathsara/translating-culinary-comfort-into-pure-css-art-39gg</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/frontend-2026-07-29"&gt;Frontend Challenge - Comfort Food Edition, CSS Art&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspiration
&lt;/h2&gt;

&lt;p&gt;Ramen is the ultimate universal comfort food: rich, layered, and crafted with meticulous attention to detail. This project set out to translate that directly into front-end architecture. Inspired by the cozy ambience of traditional Japanese ramen counters, Midnight Ramen Bar channels complex CSS gradient math, 3D transform matrices, and keyframe turbulence into a living work of digital art. By replacing every pixel of traditional image assets with native CSS vectors, the artwork bridges the gap between technical precision and pure visual comfort.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://inusha-thathsara.github.io/Frontend-Challenge-Comfort-Food-Edition---CSS-Art/" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;inusha-thathsara.github.io&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;Building Midnight Ramen Bar started with a challenge: create a photorealistic artwork using zero raster images. I deconstructed a physical bowl of ramen into distinct optical layers: ceramic bowl geometry, broth depth, submerged noodles, oil beads, artisanal toppings, and rising steam clouds.&lt;/p&gt;

&lt;p&gt;Every texture was constructed using pure CSS primitives. Finally, I added a lightweight JavaScript presentation layer for 3D mouse parallax tracking , dynamic room lighting switches, and a live CSS wireframe inspector.&lt;/p&gt;

&lt;p&gt;I plan to expand this into a full CSS Comfort Food Collection (like a steaming stack of pancakes with melting butter or a hot slice of pie), explore CSS Houdini Paint Worklets for procedural textures, and build an interactive 3D culinary customizer.&lt;/p&gt;

&lt;p&gt;Thank You!&lt;/p&gt;

</description>
      <category>frontendchallenge</category>
      <category>devchallenge</category>
      <category>css</category>
    </item>
  </channel>
</rss>
