https://promptfoo.dev/ logo
Not clear about the unit of work / configuration.
# ❓|questions
m
I am new to this, and trying to wrap my head around the organization of a project that may have more than one set of configs and prompts. Let's say I wanted to have a repo with 2 sets of prompts for independent use cases. How would I go about organizing that and then executing the commands? I am confused because it seems like
eval
does accept
--config
flag, but it's not clear if it points to the
promptfooconfig.*
file or a dir containing that. Then what about the
view
command? It has the
directory
positional parameter, but not clear what this directory is. Or am I supposed to create a separate npm package for each set of prompt use cases?
i
If you have two independent use cases, I would create a YAML file for each one and run
Copy code
promptfoo eval -c usecase1.yaml
and
Copy code
promptfoo eval -c usecase2.yaml
etc. You can point to a dir containing multiple configs, but that will run them all in a single eval, which isn't what you want.
for
promptfoo view
, this starts a web server that serves the latest results. Unless you have altered the location of the promptfoo results directory, you don't need to pass a directory.