Files
firecrawl/apps/api/src/lib/extract/build-prompts.ts
T

15 lines
590 B
TypeScript
Raw Normal View History

2024-12-17 16:58:35 -03:00
export function buildRefrasedPrompt(prompt: string, url: string): string {
return `You are a search query optimizer. Your task is to rephrase the following prompt into an effective search query that will find relevant results about this topic on ${url}.
Original prompt: "${prompt}"
Provide a rephrased search query that:
1. Maintains the core intent of the original prompt
2. Uses relevant keywords
3. Is optimized for search engine results
4. Is concise and focused
5. Short is better than long
Return only the rephrased search query, without any explanation or additional text.`;
}