crizm_
12/30/2025, 5:15 AMTemplate render error: (unknown path) TypeError: Cannot read properties of undefined (reading 'replace') from nunjucks.
Is trim a field I'm meant to be providing alongside purpose in the redteaming config? I'm not seeing it mentioned anywhere in the docs but see it used in some of the prompts in the source code.Taha
01/01/2026, 2:17 AMdulax1
01/15/2026, 5:28 PMmarco_85267
01/16/2026, 2:42 PMmarco_85267
01/16/2026, 2:48 PMabhagsain
02/01/2026, 12:36 PMalphayoshii
02/04/2026, 3:42 AMnithya6840
02/05/2026, 4:41 AMthebeastxdxd
02/05/2026, 6:31 AMteti0861
02/17/2026, 2:25 PMjunior.sartori
02/19/2026, 5:54 PMCould not identify provider: gemini-3.1-pro-preview
Please check your configuration and ensure the provider is correctly specified.
For more information on supported providers, visit: https://promptfoo.dev/docs/providers/
file:///~/node_modules/promptfoo/dist/src/providers-BOvl9qv5.js:33135
throw new Error(errorMessage);
Am I putting in the wrong name by any chance, or is there really no way to use this version yet?lilbr0
02/23/2026, 11:42 AMbillyjbryant
03/01/2026, 10:09 AMyaml
- id: browser
label: search-copilot
config:
persistSession: true
connectOptions:
debuggingPort: 9222
steps:
# Wait before navigating to look more like a human
- action: wait
runOnce: true
args:
ms: 2000
# Navigate to the search copilot page
- action: navigate
runOnce: true
args:
url: https://<REDACTED>/analytics/search
# Wait for the page to load
- action: wait
runOnce: true
args:
ms: 5000
# Type the prompt into the search copilot input
- action: type
args:
selector: 'div[data-test-id="search-copilot-input"]'
text: '{{prompt}}<enter>'
delay: 100
# Wait for the new chat entry to appear
- action: wait
args:
ms: 1000 # Wait for the new chat entry to appear
- action: waitForNewChildren
args:
parentSelector: 'div[data-test-id="search-copilot-latest-chat-entry"]'
delay: 500 # Check every 500ms
timeout: 30000 # Max wait time 30 seconds
# Extract the text from the new chat entry and store it in the response variable
- action: extract
args:
script: |
const entry = document.querySelector('div[data-test-id="search-copilot-latest-chat-entry"]');
if (!entry) {
console.warn('Latest chat entry not found');
} else {
// Heuristic: paragraphs that appear in the main content stack (first block of p.MuiTypography-root after the title span)
// 1) Find the title span (user prompt) within the entry
const title = entry.querySelector('span.MuiTypography-root');
// 2) From the title’s next siblings, find the first block that contains paragraph typography
let contentRoot = null;
for (let el = title?.parentElement?.nextElementSibling; el; el = el.nextElementSibling) {
const candidate = el.querySelector('p.MuiTypography-root');
if (candidate) {
contentRoot = el;
break;
}
}
const paras = contentRoot
? Array.from(contentRoot.querySelectorAll('p.MuiTypography-root'))
: [];
const paragraphs = paras.map(p => p.textContent.trim());
const fullText = paragraphs.join('\n\n');
return fullText || '';
}
name: aiResponse
- action: wait
args:
ms: 1000
- action: screenshot
args:
path: 'debug-{{sessionId}}-{{_attempt}}.png'
- action: wait
args:
ms: 2000
delay: 3000
transformResponse: 'extracted.aiResponse'
The timeout error is:
text
Timeout waiting for selector: div[data-test-id="search-copilot-input"]
But the element is visible on the page when the timeout error presents. I'm not sure what I'm doing wrong or how to get it to recognize the input box repopulating on the page after the mui stream completesbilalaamer
03/08/2026, 2:05 AMxaliom
03/22/2026, 10:20 AMkacperz.
03/24/2026, 3:19 PMcyh0530
03/29/2026, 3:17 PMpromptfoo:simulated-user tests. Promptfoo is reading the file content as the prompt, not the function return.
When the config and Python are the following,
# config.yaml
providers:
- openai:gpt-5-mini
prompts:
- file://generate_prompt.py:create_prompt
defaultTest:
provider:
id: "promptfoo:simulated-user"
config:
maxTurns: 2
tests:
- vars:
instructions: Learn how to use react.js
# -----------------------------------------
# generate_prompt.py
from system_prompt import my_prompt
def create_prompt(context):
return my_prompt
# -----------------------------------------
# system_prompt.py (storing full prompt in another file)
my_prompt = "Always respond in 10 words or less"
Assistant doesn't follow my_prompt. Full response in image 1.png
If I update generate_prompt.py to the following, assistant response will be <= 10 words
# generate_prompt.py
from system_prompt import my_prompt
def create_prompt(context):
return "Always respond in 10 words or less"
Assistant will respond in 10 words. Full response in image 2.png. But I believe
The prompt works fine when
- loaded inline in yaml
- loaded by json
- there's no simulated provider for the tests.
https://cdn.discordapp.com/attachments/1487832982466199666/1487832982839361836/Screenshot_2026-03-29_at_11.05.31_PM.png?ex=69ca93f1&is=69c94271&hm=3740559e5a811653ca0bf4403033ac9948a1d17ebcaf9da9dfc3e4d664e0f28b&
https://cdn.discordapp.com/attachments/1487832982466199666/1487832983506260050/Screenshot_2026-03-29_at_11.06.59_PM.png?ex=69ca93f1&is=69c94271&hm=56ff17d097cf03825e0b138ae8845fb762af28215789fc190f69c53610f5798a&mrlanderson
04/01/2026, 8:31 AMbill
04/09/2026, 6:41 AMcyh0530
04/17/2026, 4:29 PMpromptfoo:simulated-user).
1. Is it possible to let promptfoo:simulated-user to do an audio-to-audio conversation with gooogle:live:gemini-3.1-flash-live-preview and run assert to validate the quality?
2. If not, do you know if using response_modalities: ['text'] yields similar output? If output will be similar, i'm okay using text modality
**Update**:
I can't connect to gooogle:live:gemini-3.1-flash-live-preview at all even with promptfoo init --example google-live-audio.
- In text modality, I get WebSocket connection closed unexpectedly. Code: 1011, Reason: Internal error encountered..
- In audio modality, I get [ERROR] WebSocket request timed out (google:live:gemini-2.5-flash-native-audio-preview-12-2025 works fine)ethernet5828
04/21/2026, 2:08 PMLetter
05/03/2026, 6:38 PMoyebahadur
05/04/2026, 4:03 PMfunctionToolCallbacks](https://www.promptfoo.dev/docs/providers/openai/#using-functions:~:text=and%20parameters.-,functionToolCallbacks,-A%20map%20of) is invoked with just the param string.
Since the callback has no information about the context, it is difficult to emulate the function as closely as one may like to the real implementation, during the eval.
Adding context (testCase.metadata or testCase.vars) allows [function callbacks](https://www.promptfoo.dev/docs/providers/openai/#using-functions:~:text=and%20parameters.-,functionToolCallbacks,-A%20map%20of) to be somewhat stateful. Since there is little control over test case execution order in promptfoo, contextual callbacks cannot be used in cases where ordering is required. I'm not asking for that control.
The examples in the doc led me to try this workaround
json
{
type: "function",
function: {
name: "get_temperature",
parameters: {
type: "object",
properties: {
unit: {
type: "string",
enum: (vars) => vars.context_id,
}
},
}
}
}
It might work for the providers that fully support structured json_schema. However, I wasn't able to test this (my provider doesn't have this, it violated the schema and generated some nonsense string).
I'm curious to hear if this is worthy of inclusion in promptfoo. I'd be happy to contribute if some one can share some pointers.
PS: Congrats on the acquisition!ION
05/08/2026, 5:39 PMminogin
05/17/2026, 9:09 AMatom4600
06/10/2026, 2:28 AM.
├── references
│ └── workflows
│ ├── sub-task-a.md
│ ├── sub-task-b.md
│ └── sub-task-c.md
└── SKILL.md
The skill has roughly 5 steps.
First, it needs to decide which reference file to use based on the user prompt to execute a certain sub-task.
The last step would call some curl command to validate the generated results is valid or not.
My questions:
1. How should I configure promptfoo to verify that the right reference file is used for a given prompt?
2. How should I assert that curl command?
Currently, I use custom provider with tracing enabled to verify the curl command and its payload.
I'd like to learn from the community how would you guys do these evaluations.
Thank you in advanced.cheena_08754
06/18/2026, 5:08 AManiki3131
07/01/2026, 12:06 PMss051962
07/24/2026, 5:20 AMm0ltz
10/30/2026, 7:39 AM/goal to pass evals, the agent would always slowly chip away at quality until it makes tests pass.
I have to steer it a lot, and always correct it that "hey this is overfitting".
If I add "no overfitting or bias" into the goal, then it becomes too rigid and cautious and is afraid of making even good changes.
Does anyone have any tools or skills for this?
Thanks.