<?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: Jun Zhu</title>
    <description>The latest articles on DEV Community by Jun Zhu (@jun_zhu_dda39114f71c4492e).</description>
    <link>https://dev.to/jun_zhu_dda39114f71c4492e</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3919250%2F4891b65c-70a4-45f3-b32e-57f63845c7ef.jpg</url>
      <title>DEV Community: Jun Zhu</title>
      <link>https://dev.to/jun_zhu_dda39114f71c4492e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jun_zhu_dda39114f71c4492e"/>
    <language>en</language>
    <item>
      <title>SCMRLH 003: A Gemma 4 Harness for Grounded QA and Safe Abstention</title>
      <dc:creator>Jun Zhu</dc:creator>
      <pubDate>Sun, 24 May 2026 22:34:29 +0000</pubDate>
      <link>https://dev.to/jun_zhu_dda39114f71c4492e/scmrlh-003-a-gemma-4-harness-for-grounded-qa-and-safe-abstention-4igc</link>
      <guid>https://dev.to/jun_zhu_dda39114f71c4492e/scmrlh-003-a-gemma-4-harness-for-grounded-qa-and-safe-abstention-4igc</guid>
      <description>&lt;p&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Build with Gemma 4&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks for checking out my Gemma 4 Challenge submission.&lt;/p&gt;

&lt;p&gt;This project focuses on a behavior I care about a lot in local LLM systems: knowing when to answer from evidence and when to abstain safely.&lt;/p&gt;

&lt;p&gt;Repo:&lt;br&gt;
&lt;a href="https://github.com/empowereddata/causal-rl-harness" rel="noopener noreferrer"&gt;https://github.com/empowereddata/causal-rl-harness&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo:&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=1a3n0Y_km1o" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=1a3n0Y_km1o&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SCMRLH 003 is my Gemma 4 Challenge project: a grounded answer-or-abstain harness for local LLMs.&lt;/p&gt;

&lt;p&gt;Instead of asking a model to answer every prompt, the harness uses a controlled workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;retrieve relevant evidence&lt;/li&gt;
&lt;li&gt;send a compact evidence window to the model&lt;/li&gt;
&lt;li&gt;require the shortest exact answer span or &lt;strong&gt;ABSTAIN&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;apply guardrails to reject unsupported answers&lt;/li&gt;
&lt;li&gt;report answerable accuracy, unanswerable accuracy, abstain rate, and runtime&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this project I used Gemma 4 26B through Ollama as the primary local reasoning model inside the harness.&lt;/p&gt;

&lt;p&gt;Representative benchmark snapshots highlighted in this demo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Main benchmark: 200 examples, 0.850 overall accuracy, 0.700 answerable accuracy, 1.000 unanswerable accuracy, 0.570 abstain rate&lt;/li&gt;
&lt;li&gt;Deep benchmark: 1000 examples, 0.827 overall accuracy, 0.654 answerable accuracy, 1.000 unanswerable accuracy, 0.576 abstain rate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why this matters:&lt;br&gt;
This project is designed to measure grounded behavior under uncertainty, especially when a model should answer and when it should deliberately abstain.&lt;/p&gt;

&lt;p&gt;What I Built&lt;br&gt;
I built SCMRLH 003 (Causal RL Harness), a grounded question-answering evaluation harness for local LLMs that focuses on a simple but important behavior:&lt;/p&gt;

&lt;p&gt;knowing when to answer and when to abstain.&lt;/p&gt;

&lt;p&gt;Instead of treating question answering as “always generate a response,” SCMRLH 003 turns the task into a controlled workflow:&lt;/p&gt;

&lt;p&gt;retrieve the most relevant evidence from the provided context&lt;br&gt;
send only a compact evidence window to the model&lt;br&gt;
require the model to return the shortest exact answer span or &lt;strong&gt;ABSTAIN&lt;/strong&gt;&lt;br&gt;
run guardrails that reject unsupported answers&lt;br&gt;
score answerable accuracy, unanswerable accuracy, abstain rate, and runtime&lt;br&gt;
The main idea is simple: if a local model cannot support an answer from retrieved evidence, it should decline cleanly instead of improvising.&lt;/p&gt;

&lt;p&gt;That makes the project useful for:&lt;/p&gt;

&lt;p&gt;hallucination-resistant local AI&lt;br&gt;
document-grounded assistants&lt;br&gt;
multi-model evaluation&lt;br&gt;
AI coworker workflows where unsupported answers are costly&lt;br&gt;
The public release bundle is intentionally lightweight and reproducible. It includes dependency-light Python code, sample fixtures, configs, manifests, and a paper bundle so someone can inspect the harness without needing the full private research tree.&lt;/p&gt;

&lt;p&gt;I used &lt;strong&gt;Gemma 4 26B&lt;/strong&gt; through &lt;strong&gt;Ollama&lt;/strong&gt; as the primary local reasoning model inside SCMRLH 003.&lt;/p&gt;

&lt;p&gt;This was a good fit because the project is not a general chatbot demo. It is a grounded decision pipeline that repeatedly asks the model to read a compact evidence window, return the shortest exact supported answer span, or abstain when the answer is not explicitly supported.&lt;/p&gt;

&lt;p&gt;Gemma 4 worked well in that setup because it balanced local deployment practicality, evidence-bound reasoning, and stable abstention behavior. In the benchmark snapshots highlighted here, Gemma 4 achieved strong overall performance while also reaching perfect unanswerable accuracy, which is especially important for a harness designed to prefer safe abstention over unsupported answers.&lt;/p&gt;

&lt;p&gt;Demo&lt;br&gt;
The public bundle can be run locally with:&lt;/p&gt;

&lt;p&gt;PYTHONPATH=code python3 -m scmrlh --config config/scmrlh_003_v000_tub_smoke_baseline_stub.json&lt;/p&gt;

&lt;p&gt;Repository:&lt;br&gt;
&lt;a href="https://github.com/empowereddata/causal-rl-harness" rel="noopener noreferrer"&gt;https://github.com/empowereddata/causal-rl-harness&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DEV post:&lt;br&gt;
&lt;a href="https://dev.to/jun_zhu_dda39114f71c4492e/scmrlh-003-a-gemma-4-harness-for-grounded-qa-and-safe-abstention-4igc"&gt;https://dev.to/jun_zhu_dda39114f71c4492e/scmrlh-003-a-gemma-4-harness-for-grounded-qa-and-safe-abstention-4igc&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Gemma4 #LocalLLM #AI #OpenSource #RAG #Evaluation
&lt;/h1&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
  </channel>
</rss>
