From 3cdf551f0bc988b389d5cb4fcc3178e976fd28c0 Mon Sep 17 00:00:00 2001 From: David Zhang Date: Tue, 4 Feb 2025 07:47:10 -0800 Subject: [PATCH] updated prompts --- src/deep-research.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/deep-research.ts b/src/deep-research.ts index a0d2df7..0129d92 100644 --- a/src/deep-research.ts +++ b/src/deep-research.ts @@ -87,7 +87,7 @@ async function processSerpResult({ model: o3MiniModel, abortSignal: AbortSignal.timeout(60_000), system: systemPrompt(), - prompt: `Given the following contents from a SERP search for the query ${query}, generate a list of learnings from the contents. Return a maximum of ${numLearnings} learnings, but feel free to return less if the contents are clear. Make sure each learning is unique and not similar to each other. The learnings should be concise and to the point, as infromation dense as possible. Make sure to include any entities like people, places, companies, products, things, etc in the learnings, as well as any exact metrics, numbers, or dates. The learnings will be used to research the topic further.\n\n${contents + prompt: `Given the following contents from a SERP search for the query ${query}, generate a list of learnings from the contents. Return a maximum of ${numLearnings} learnings, but feel free to return less if the contents are clear. Make sure each learning is unique and not similar to each other. The learnings should be concise and to the point, as detailed and infromation dense as possible. Make sure to include any entities like people, places, companies, products, things, etc in the learnings, as well as any exact metrics, numbers, or dates. The learnings will be used to research the topic further.\n\n${contents .map(content => `\n${content}\n`) .join('\n')}`, schema: z.object({ @@ -128,7 +128,7 @@ export async function writeFinalReport({ const res = await generateObject({ model: o3MiniModel, system: systemPrompt(), - prompt: `Given the following prompt from the user, write a final report on the topic using the learnings from research:\n\n${prompt}\n\nHere are all the learnings from previous research:\n\n\n${learningsString}\n`, + prompt: `Given the following prompt from the user, write a final report on the topic using the learnings from research. Make it as as detailed as possible, aim for 2-3 pages:\n\n${prompt}\n\nHere are all the learnings from previous research:\n\n\n${learningsString}\n`, schema: z.object({ reportMarkdown: z .string()