bilzmoude
08/08/2025, 5:18 PMprompts:
- role: system
content: file://../../system-1.md
- role: system
content: file://../../system-2.md
- role: user
content: file://../../user.md
tests:
- file://./test_*.yaml
But that's not working for me.
> Invalid configuration file /Users/me/code/evaluations/test1/promptfooconfig.yaml:
> Validation error: Expected string, received array at "prompts", or Expected string, received object at "prompts[0]", or Required at "prompts[0].id", or Required at "prompts[0].raw"; Expected string, received object at "prompts[1]", or Required at "prompts[1].id", or Required at "prompts[1].raw", or Expected object, received array at "prompts"
> Invalid configuration file /Users/me/code/evaluations/test1/promptfooconfig.yaml:
> Validation error: Expected string, received array at "prompts", or Expected string, received object at "prompts[0]", or Required at "prompts[0].id", or Required at "prompts[0].raw"; Expected string, received object at "prompts[1]", or Required at "prompts[1].id", or Required at "prompts[1].raw", or Expected object, received array at "prompts"
> Failed to validate configuration: Invalid prompt object: {"role":"system","label":"system","content":"file://../../system.md"}
What am I doing wrong? How do I define my prompt chain with two system prompts and one user prompt from files?Tabs [Promptfoo]
08/08/2025, 6:07 PMian
08/08/2025, 11:04 PMconversation.yaml, but right now file:// references are not recursively resolved.
My best advice now is to combine the prompts into a single conversation.yaml inline, unless Shuo has a better idea.
An alternative would be to create a python or javascript [dynamic prompt](https://www.promptfoo.dev/docs/configuration/prompts/#dynamic-prompts-functions) that builds the prompt however you'd likebilzmoude
08/09/2025, 1:08 AMian
08/09/2025, 3:07 AMian
08/10/2025, 2:47 PMbilzmoude
08/11/2025, 7:15 PMbilzmoude
08/11/2025, 7:19 PM