https://promptfoo.dev/ logo
Proper system prompt management | potential workar...
# ❓|questions
n
Hello ! Here is my use case. I have
Copy code
yaml
prompts:
  - id: file://system-prompt-v001...
  - id: file://system-prompt-v002...

defaultTest:
  vars:
    messages:
      - role: system
        content: #HERE i want the prompt defined in prompts and used for the current test.
      - role: user
        content: ....
From what i've understood of promptfoo so far, there is no support for proper system prompts. This is one way of handling them i've found. What do you think about it ? EDIT: i've found this also : https://www.promptfoo.dev/docs/guides/claude-vs-gpt/#define-your-prompts But this is not quite suitable as it requires to store the prompt in a string and i have biiiig prompts...
i
I think the way I would approach this is to have the system prompt content in a separate var
Copy code
yaml
defaultTest:
  vars:
    systemPrompt: file://system.txt
    messages:
      - role: system
        content: '{{systemPrompt}}'
n
@ian the issue with this is that I am versioning the system prompts and it’s those I am running the tests on and comparing them. I also did systemPrompt: [file1, file2] which allows you to iterate on them but then the results need to be rearranged to really see the meaning of them
So there is no way of accessing the « prompts » variable ?
3 Views