Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Promptfoo Promptfoo Feedback

From Leeroopedia
Knowledge Sources
Domains CLI, User_Interaction
Last Updated 2026-02-14 07:45 GMT

Overview

Concrete tool for collecting and submitting user feedback to the promptfoo API from the command line.

Description

The Feedback module (feedback.ts) provides two functions for user feedback: sendFeedback() sends a feedback message to the https://api.promptfoo.dev/api/feedback endpoint, and gatherFeedback() interactively prompts the user for feedback text and optional contact information before sending. If the user is logged in, their email is automatically included.

Usage

Invoked via the promptfoo feedback CLI command. The gatherFeedback function handles the interactive prompt, while sendFeedback can be called directly with a pre-composed message.

Code Reference

Source Location

Signature

export async function sendFeedback(feedback: string): Promise<void>
export async function gatherFeedback(message?: string): Promise<void>

Import

import { sendFeedback, gatherFeedback } from './feedback';

I/O Contract

Inputs

Name Type Required Description
feedback string Yes Feedback message text
message string No Optional pre-composed message (skips interactive prompt)

Outputs

Name Type Description
(void) Promise<void> Resolves when feedback is sent

Usage Examples

import { sendFeedback, gatherFeedback } from './feedback';

// Send feedback programmatically
await sendFeedback('Great tool! Feature request: support for XYZ');

// Interactive feedback gathering
await gatherFeedback(); // Prompts user for input

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment