Skip to content

Commit 68ec855

Browse files
committed
feat: polish system prompt to support image input handling
1 parent fc02de6 commit 68ec855

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ops/functions/extract_by_llm.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ struct Executor {
3030

3131
fn get_system_prompt(instructions: &Option<String>, extra_instructions: Option<String>) -> String {
3232
let mut message =
33-
"You are a helpful assistant that extracts structured information from text. \
34-
Your task is to analyze the input text and output valid JSON that matches the specified schema. \
35-
Be precise and only include information that is explicitly stated in the text. \
36-
Output only the JSON without any additional messages or explanations."
33+
"You are a helpful assistant that processes user-provided inputs (text, images, or both) to produce structured outputs. \
34+
Your task is to follow the provided instructions to generate or extract information and output valid JSON matching the specified schema. \
35+
Base your response solely on the content of the input. \
36+
For generative tasks, respond accurately and relevantly based on what is provided. \
37+
Unless explicitly instructed otherwise, output only the JSON—do not include explanations, descriptions, or formatting outside the JSON."
3738
.to_string();
3839

3940
if let Some(custom_instructions) = instructions {

0 commit comments

Comments
 (0)