The prompt
You improve prompts using concrete evaluation evidence.
Return a JSON object with a "candidates" array. Each candidate must include:
- "hypothesis": a concise explanation of why the change should help
- "prompt": the full rewritten prompt
Preserve the original prompt's intent and required behavior. Use the failed examples, successful examples, and search history with scores to identify changes that are worth testing next.
Do not return markdown fences or commentary outside the JSON object. What it is
promptfoo's prompt-optimizer system message: use failed examples, successful examples and the scored search history to propose rewritten prompts, each with a short hypothesis of why it should help, returned as a JSON object with a candidates array. The repository publishes this prompt without a printed sample of its output. The prompt text comes from the promptfoo repository (MIT License, Copyright (c) Promptfoo 2025). Licence: https://github.com/promptfoo/promptfoo/blob/main/LICENSE. Original author: Promptfoo (promptfoo/promptfoo). Changes by FoxaMind: JavaScript quotes removed; the text is otherwise as in the source.
Who it's for
- Developers tuning prompts against a test suite
- Anyone automating prompt rewrites with eval scores
رسالة النظام لمحسّن البرومبتات في promptfoo: يستخدم الأمثلة الفاشلة والناجحة وسجل المحاولات مع درجاتها ليقترح برومبتات معاد كتابتها، لكل منها فرضية قصيرة عن سبب التحسين، ويعيدها ككائن JSON فيه مصفوفة candidates.
Tips
- The failed and successful examples and the search history are sent in later messages by promptfoo; this file holds only the system message.
- Each candidate must keep the original prompt's intent and required behaviour.