Prompt Search Limited info

Rewrite a Task as a Vector-Database Search Query

crewAI's query rewriting prompt: rewrite the user query to be more specific for vector database retrieval, output only the rewritten query, focus on the task's key words, and strip extra context such as expected output formats.

  • 🤖 Any chat LLM
  • 🗂️ Search

Prompt by crewAI, Inc. (crewAIInc/crewAI) · Original source (opens in a new tab)

Rewrite a Task as a Vector-Database Search Query — prompt preview

The prompt

prompt
Your goal is to rewrite the user query so that it is optimized for retrieval from a vector database. Consider how the query will be used to find relevant documents, and aim to make it more specific and context-aware. 

 Do not include any other text than the rewritten query, especially any preamble or postamble and only add expected output format if its relevant to the rewritten query. 

 Focus on the key words of the intended task and to retrieve the most relevant information. 

 There will be some extra context provided that might need to be removed such as expected_output formats structured_outputs and other instructions.

What it is

crewAI's query rewriting prompt: rewrite the user query to be more specific for vector database retrieval, output only the rewritten query, focus on the task's key words, and strip extra context such as expected output formats. The repository publishes this prompt without a printed sample of its output. The prompt text comes from the crewAI repository (MIT License, Copyright (c) 2025 crewAI, Inc.). Licence: https://github.com/crewAIInc/crewAI/blob/main/LICENSE. Original author: crewAI, Inc. (crewAIInc/crewAI). Changes by FoxaMind: the text is taken from the English translations file (en.json); JSON string quotes removed and \n escapes shown as line breaks; {...} placeholders keep the source syntax.

Who it's for

  • Developers building RAG for agents
  • Anyone improving retrieval queries

برومبت إعادة صياغة الاستعلام في crewAI: يعيد صياغة سؤال المستخدم ليكون أدق في الاسترجاع من قاعدة بيانات متجهية، ويُخرج الاستعلام المعاد صياغته فقط، ويركز على كلمات المهمة الأساسية، ويحذف السياق الزائد مثل صيغ المخرجات المتوقعة.

Tips

  • The prompt says to leave out any preamble or postamble around the rewritten query.