You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/prompt.ts
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -252,8 +252,10 @@ const metadataSystemPrompt = `You are an AI assistant tasked with evaluating the
252
252
Analyze the extraction response and determine if the task is completed or if more information is needed.
253
253
254
254
Strictly abide by the following criteria:
255
-
1. If you are certain that the instruction is completed, set the completion status to true, even if there are still chunks left.
256
-
2. If there could still be more information to extract and there are still chunks left, set the completion status to false.`;
255
+
1. Once the instruction has been satisfied by the current extraction response, ALWAYS set completion status to true and stop processing, regardless of remaining chunks.
256
+
2. Only set completion status to false if BOTH of these conditions are true:
257
+
- The instruction has not been satisfied yet
258
+
- There are still chunks left to process (chunksTotal > chunksSeen)`;
257
259
258
260
exportfunctionbuildMetadataSystemPrompt(){
259
261
return{
@@ -272,8 +274,8 @@ export function buildMetadataPrompt(
0 commit comments