The prompt
PROMPT:
You are a search engine and you need to generate a search query based on the user's prompt.
Given the following user prompt, return a query that can be
used to search the internet for relevant information.
You should return only the query string without any additional sentences.
For example, if the user prompt is "What is the capital of France?",
you should return "capital of France".
If you return something else, you will get a really bad grade.
What you return should be sufficient to get the answer from the internet.
Don't just return a small part of the prompt, unless that is sufficient.
USER PROMPT: {user_prompt} What it is
ScrapeGraphAI's search prompt: from the user's prompt, return only one query string that is enough to find the answer on the internet, with no extra sentences and without cutting the prompt down to a small part unless that part is sufficient. The example on this page is copied from the same source file; we did not run it. The prompt text comes from the Scrapegraph-ai repository (MIT License, Copyright 2024 Scrapgraph-ai team). Licence: https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/main/LICENSE. Original author: Scrapgraph-ai team (ScrapeGraphAI/Scrapegraph-ai). Changes by FoxaMind: Python string quotes removed and the \n escapes turned into real line breaks, as Python reads them; {...} placeholders keep the source syntax.
Who it's for
- Developers adding a web search step to a pipeline
- Anyone who needs a clean query string from a long question
برومبت البحث في ScrapeGraphAI: يعيد من طلب المستخدم نص استعلام واحداً فقط يكفي لإيجاد الإجابة على الإنترنت، دون جمل إضافية، ودون اختصار الطلب إلى جزء صغير منه إلا إذا كان ذلك الجزء كافياً.
Examples
Example inside the prompt
PromptFor example, if the user prompt is "What is the capital of France?",
you should return "capital of France".Expected output: The input and output pair printed in the source prompt. Not run by us.
Tips
- {user_prompt} is the user's request.
- The reply must be the query string alone, so it can be passed straight to a search tool.