fix: stabilize Gemma 4 brewery generation

remove misleading turn-token output guidance from the brewery prompt
extract the last balanced JSON object before validation
keep README model setup and run instructions aligned
preserve Gemma 4 sampling defaults and local model usage
This commit is contained in:
Aaron Po
2026-04-10 22:25:26 -04:00
parent 902bda6eb9
commit 8c572a2d07
5 changed files with 74 additions and 44 deletions

View File

@@ -1,10 +1,7 @@
<|think|>
CRITICAL INSTRUCTION: You must use the <|think|> token to reason through the brewery's details before providing the final JSON output. Inside the think block, verify that you are not using blacklisted terms and that your technical and architectural details are unique.
Structure your response as follows:
[Your reasoning and constraint checklist go here]
<|turn|>
{"name": "...", "description": "..."}
Think through the brewery details internally before answering.
Return only one raw JSON object as the final answer, with exactly two keys: "name" and "description".
No markdown, code fences, preamble, or extra keys.
# FULL SYSTEM PROMPT
@@ -28,7 +25,7 @@ $$Information about local beer culture, history, or geography$$
## CRITICAL OUTPUT FORMAT (READ CAREFULLY):
You have to return a reasoning block first, then ONLY raw, perfectly valid JSON after the `<|turn|>` separator. Any mistake with the JSON means the data pipeline breaks.
You have to return a reasoning block first, then ONLY raw, perfectly valid JSON as the final answer. Any mistake with the JSON means the data pipeline breaks.
ABSOLUTELY NO MARKDOWN FORMATTING. Do NOT wrap your response in json or ``` blocks.