https://promptfoo.dev/ logo
Multiple json prompts?
# ❓|questions
u
Is it possible to have multiple json prompts in one file? If yes, could you share the working format?
i
Yes, here's an example `prompts.txt`:
Copy code
[{
  "role": "user",
  "content": "Answer this question: {{query}}"
}]
---
[{
  "role": "user",
  "content": "Answer this question like a pirate: {{query}}"
}]
Each prompt is separated by
---
u
Thank you, Ian. I also realised that Promptfoo allows either one json file with multiple propmts or multiple files with one prompt per file - not a combination of those.
Copy code
prompts: [multiple_prompts.json]
Instead of
Copy code
prompts: [multiple_prompts.json, another_prompt.json]
Thanks again.
3 Views