Skip to content

Commit 3037e6e

Browse files
make the introduction to cfg stronger
1 parent d0c346c commit 3037e6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/models/openai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ You can read more about this function calling style in the [OpenAI documentation
174174

175175
#### Context Free Grammar
176176

177-
Invoking tools using freeform function calling can result in errors when the tool expectations are not met. For example, a tool that queries an SQL database can only accept valid SQL. The freeform function calling of GPT-5 supports generation of valid SQL for this situation by constraining the generated text using a context free grammar.
177+
A tool that queries an SQL database can only accept valid SQL. The freeform function calling of GPT-5 supports generation of valid SQL for this situation by constraining the generated text using a context free grammar.
178178

179179
A context‑free grammar is a collection of production rules that define which strings belong to a language. Each rule rewrites a non‑terminal symbol into a sequence of terminals (literal tokens) and/or other non‑terminals, independent of surrounding context—hence context‑free. CFGs can capture the syntax of most programming languages and, in OpenAI custom tools, serve as contracts that force the model to emit only strings that the grammar accepts.
180180

0 commit comments

Comments
 (0)