Skip to content

Commit 9ad12c6

Browse files
authored
[doc] update comment for baml example (#1320)
1 parent 6a4b0b0 commit 9ad12c6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

docs/docs/examples/examples/patient_form_extraction_baml.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,9 @@ We specify `client Gemini` and a prompt template. The special variable `{{ intak
158158

159159
In our BAML example above, there's a subtle but **crucial line**: `{{ _.role("user") }}` is added at the start of the prompt.
160160

161-
> This ensures the **PDF content is explicitly included as part of the user message**, rather than the system prompt.
161+
> This ensures the PDF content is explicitly included as part of the user message*, rather than the system prompt.
162162

163-
**Why does this matter?**
164-
- For Gemini and Anthropic models, BAML can sometimes infer or adjust the prompt structure, so extraction works either way.
165-
- For **OpenAI models** (e.g., GPT-4/GPT-4o), if the PDF is **not** in the user role, the model doesn't see the file content — so extractions will fail or return empty fields.
166-
- This can easily trip you up.If you're using BAML, **always double-check your prompt roles when adding file inputs**—especially for OpenAI backends.
163+
For **OpenAI models**, if the PDF is not in the user role, the model doesn't see the file content — so extractions will fail or return empty fields. This can easily trip you up.
167164

168165
:::
169166

0 commit comments

Comments
 (0)