Skip to content

Commit 7c96803

Browse files
quote coding terms
1 parent a7112f4 commit 7c96803

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/models/openai.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,14 @@ agent = Agent(model, output_type=output_tool)
267267

268268
Lark grammars can be tricky to perfect. While simple grammars perform most reliably, complex grammars often require iteration on the grammar definition itself, the prompt, and the tool description to ensure that the model does not go out of distribution.
269269

270-
* Keep terminals bounded – use /[^.\n]{0,10}*\./ rather than /.*\./. Limit matches both by content (negated character class) and by length ({M,N} quantifier).
271-
* Prefer explicit char‑classes over . wildcards.
272-
* Thread whitespace explicitly, e.g. using SP = " ", instead of a global %ignore.
270+
* Keep terminals bounded – use `/[^.\n]{0,10}*\./` rather than `/.*\./`. Limit matches both by content (negated character class) and by length (`{M,N}` quantifier).
271+
* Prefer explicit char‑classes over `.` wildcards.
272+
* Thread whitespace explicitly, e.g. using `SP = " "`, instead of a global %ignore.
273273
* Describe your tool: tell the model exactly what the CFG accepts and instruct it to reason heavily about compliance.
274274

275275
Troubleshooting
276276

277-
* API rejects the grammar because it is too complex ➜ Simplify rules and terminals, remove %ignore.*.
277+
* API rejects the grammar because it is too complex ➜ Simplify rules and terminals, remove `%ignore.*`.
278278
* Unexpected tokens ➜ Confirm terminals aren't overlapping; check greedy lexer.
279279
* When the model drifts "out‑of‑distribution" (shows up as the model producing excessively long or repetitive outputs, it is syntactically valid but is semantically wrong):
280280
- Tighten the grammar.

0 commit comments

Comments
 (0)