Skip to content

Commit 2c855cf

Browse files
update refine extraction prompt (#487)
* update prompt * changeset
1 parent b2d391d commit 2c855cf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: .changeset/healthy-cups-play.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@browserbasehq/stagehand": patch
3+
---
4+
5+
update refine extraction prompt to ensure correct schema is used

Diff for: lib/prompt.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ const refineSystemPrompt = `You are tasked with refining and filtering informati
294294
1. Remove exact duplicates for elements in arrays and objects.
295295
2. For text fields, append or update relevant text if the new content is an extension, replacement, or continuation.
296296
3. For non-text fields (e.g., numbers, booleans), update with new values if they differ.
297-
4. Add any completely new fields or objects.
297+
4. Add any completely new fields or objects ONLY IF they correspond to the provided schema.
298298
299299
Return the updated content that includes both the previous content and the new, non-duplicate, or extended information.`;
300300

0 commit comments

Comments
 (0)