https://promptfoo.dev/ logo
Variables in txt file and multiple comparison stri...
# ❓|questions
d
Hi! I have a couple of questions about some of the promptfoo behavior. First would be how I can place an array of options for one variable into a .txt file. Let me explain: I have a situation where I have system variable and couple of questions that I want to test with that one system prompt, I would like to place the array with them to a seperate .txt file. But unfortunately when I do that I get a bunch of errors. Look at the screenshot for reference (all those questions should be in one .txt file/or some different format 🙂 ) Second question would refer to the similar assertion. I want to achieve something like in the screenshot by having multiple strings to compare to, but having them like this throws an error. Is it possible to do something like this in promptfoo? Thanks! https://cdn.discordapp.com/attachments/1246876359297470468/1246876359641272350/image.png?ex=665dfb99&is=665caa19&hm=644a54f5280f5744100c6c46a1e73a7a7d82d0b8072f0f7551e7476e393f4d4f&
i
hey dojnik, very sorry for missing this message. just to make sure I understand, in the first case, sounds like you want the test case to effectively be expanded into 3 test cases, each with 1
question
? for the similar assertion with an array value, is the expectation that the output is similar to all of the strings, or just one of them?
d
Hello! Thanks fro the response. For the first case what you described is exactly what I want to achieve. For the second case expectation is that output is similar to only one of them.
d
Oh great. Thanks a lot! What about the first case? Is there some feature that I am not aware of that I can use to make it work like that?