https://www.boundaryml.com logo
Weird LLM raw output error
# help
b
Has anyone seen an error like this from the llm?
Copy code
baml_py.internal_monkeypatch.BamlValidationError: BamlValidationError(message=Failed to parse LLM response: Failed to coerce value: <root>: Failed while parsing required fields: missing=1, unparsed=0
  - <root>: Missing required field: reasoning, raw_output=\`\`\`json
{
  "best_flagged_rules": [
    1505,
    10688,
    7433
  ],
dna"reasoning": "These three...
that
dna
infront of reasoning is weird. My prompt ends like this, pretty standard
Copy code
Answer in JSON using this schema:
{
  // The IDs of the 3 best flagged rules from the candidates provided
  best_flagged_rules: int[],
  // Brief explanation of why these were chosen as the best exemplars
  reasoning: string,
}
this is gemini 2.5 pro
a
Which version of baml is this?
You cant repro consistently right?
b
correct i cannot reproduce consistently. I made a baml test in the playground and cannot make it happen. But it failed in my production job 6 of the last 10 days
Copy code
Name: baml-py
Version: 0.201.0
i can share the full stacktrace privately with you if helpful
a
yes please
also is it always 'dna' ? or some other words
b
not always dna, looking for other examples
3 Views