Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions examples/gpt-5/gpt-5_new_params_and_tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -968,16 +968,18 @@
"| Rules (lower) | Combine terminals; cannot influence how text is tokenised. |\n",
"| Greedy lexer | Never try to “shape” free text across multiple terminals – you’ll lose control. |\n",
"\n",
"** Correct vs Incorrect Pattern Design\n",
"**Correct vs Incorrect Pattern Design** \n",
"\n",
"✅ **One bounded terminal handles free‑text between anchors** \n",
"start: SENTENCE \n",
"SENTENCE: /[A-Za-z, ]*(the hero|a dragon)[A-Za-z, ]*(fought|saved)[A-Za-z, ]*(a treasure|the kingdom)[A-Za-z, ]*\\./ \n",
"\n",
"```\n",
"start: SENTENCE\n",
"SENTENCE: /[A-Za-z, ]*(the hero|a dragon)[A-Za-z, ]*(fought|saved)[A-Za-z, ]*(a treasure|the kingdom)[A-Za-z, ]*\\./\n",
"```\n",
"❌ **Don’t split free‑text across multiple terminals/rules** \n",
"start: sentence \n",
"sentence: /[A-Za-z, ]+/ subject /[A-Za-z, ]+/ verb /[A-Za-z, ]+/ object /[A-Za-z, ]+/ \n",
"\n",
"```\n",
"start: sentence\n",
"sentence: /[A-Za-z, ]+/ subject /[A-Za-z, ]+/ verb /[A-Za-z, ]+/ object /[A-Za-z, ]+/\n",
"```\n",
"\n",
"### 3.3 Example - SQL Dialect — MS SQL vs PostgreSQL\n",
"\n",
Expand Down