GitHub Repo
Ollama Community Reports Contradictory ShieldGemma Template Instructions: Prompt Review Still Described as Answer Review
An October 27 report in the Ollama community says ShieldGemma’s opening instruction still asks the model to judge an AI answer when reviewing a user prompt, contradicting later instructions. The public template confirms the discrepancy, but there are no accuracy-impact data or an official fix yet.

On October 27, the Ollama community reported an issue with the ShieldGemma safety-classification template: when given only a user message and asked to judge whether the prompt violates policy, the template’s opening still describes the task as reviewing an AI answer. At the time of review, the issue remained open, with no linked fix PR or maintainer confirmation of any actual classification impact. Community report
The contradictory instructions can be confirmed directly in Ollama’s public shieldgemma:2b template. The template first collects user content and an assistant response; it uses the presence of $cr to decide whether to insert an answer block and also switches the safety-policy wording. But the opening task description does not use the same conditional logic: it always refers to an AI answer. When the input contains only a user message, the ending instead asks the model to judge a human prompt, leaving the review target inconsistent across the template. Public template
Google’s documentation says the first-generation ShieldGemma is built on Gemma 2, comes in 2B, 9B, and 27B sizes, and supports safety evaluation of both prompt inputs and output responses. Correctly distinguishing these two tasks in deployment is therefore an integration requirement aligned with the model’s intended use. This report concerns a text safety model and should be considered separately from ShieldGemma 2, which is used for image labeling. Google documentation
The technical point to watch is that a safety classifier’s judgment also depends on the complete prompt it receives at inference time. Based on the template structure, the inconsistent task description could introduce ambiguity, but no controlled experiment has shown that it increases false negatives or false positives. Nor does the report establish that any existing safety protection has been bypassed. The reporter recommends switching the opening text depending on whether an assistant response is present; that remains a proposed fix requiring validation. Suggested fix
Engineering teams using this model as an input gate can first inspect the actual template with ollama show shieldgemma:2b --template, then compare classification results before and after a change using the same test set. They should monitor whether the template is updated, whether other model tags receive the same change, and the respective false positive and false negative rates for prompt review and answer review. Correcting the instruction text alone would not prove that safety performance has improved.