Skip to content
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
338046d
Update 03_postgres_source.md
badmonster0 Nov 12, 2025
da109ea
fix link
badmonster0 Nov 12, 2025
42b4ad4
Merge branch 'main' into doc-fix
badmonster0 Nov 12, 2025
e119cdf
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
97ddfff
new example
badmonster0 Nov 20, 2025
ec6ce9d
move tutorial to top bar
badmonster0 Nov 20, 2025
e9120ce
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
556a93d
more tutorial
badmonster0 Nov 20, 2025
803251f
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
2bf5d91
Update document_ai.md
badmonster0 Nov 20, 2025
bada3ef
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
89333ca
[example] bump baml version
badmonster0 Nov 20, 2025
23b99d7
Merge branch 'main' into doc-fix
badmonster0 Nov 20, 2025
54cd9fc
[doc] images
badmonster0 Nov 21, 2025
14f98b2
Merge branch 'main' into doc-fix
badmonster0 Nov 21, 2025
14d3555
[doc] clip example
badmonster0 Nov 21, 2025
9bdf64a
Merge branch 'main' into doc-fix
badmonster0 Nov 21, 2025
106b397
Delete example (73).png
badmonster0 Nov 21, 2025
3f93323
docs category
badmonster0 Nov 22, 2025
fff327d
Merge branch 'main' into doc-fix
badmonster0 Nov 22, 2025
dfed73f
[doc] baml
badmonster0 Nov 22, 2025
9b95653
Merge branch 'main' into doc-fix
badmonster0 Nov 22, 2025
8a894c7
image resize
badmonster0 Nov 22, 2025
4fa58ff
Merge branch 'main' into doc-fix
badmonster0 Nov 22, 2025
75876e6
Update patient_form_extraction_baml.md
badmonster0 Nov 23, 2025
d851e60
Merge branch 'main' into doc-fix
badmonster0 Nov 23, 2025
a860010
[doc] sqs example
badmonster0 Nov 23, 2025
486e005
Merge branch 'main' into doc-fix
badmonster0 Nov 23, 2025
d67e0ba
[doc] drive example
badmonster0 Nov 23, 2025
4293eb1
Merge branch 'main' into doc-fix
badmonster0 Nov 23, 2025
ed7859a
Update patient_form_extraction_baml.md
badmonster0 Nov 23, 2025
2238d1f
Merge branch 'main' into doc-fix
badmonster0 Nov 23, 2025
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
7 changes: 2 additions & 5 deletions docs/docs/examples/examples/patient_form_extraction_baml.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,9 @@ We specify `client Gemini` and a prompt template. The special variable `{{ intak

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

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

**Why does this matter?**
- For Gemini and Anthropic models, BAML can sometimes infer or adjust the prompt structure, so extraction works either way.
- 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.
- 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.
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.

:::

Expand Down