0d3cb498a3
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
101 lines
2.7 KiB
YAML
101 lines
2.7 KiB
YAML
# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
|
|
description: Filter specific tests to specific prompts
|
|
|
|
prompts:
|
|
# Factual prompt - for questions requiring accurate answers
|
|
- id: factual
|
|
label: Factual Assistant
|
|
raw: |
|
|
You are a factual assistant. Answer the following question accurately and concisely.
|
|
|
|
Question: {{question}}
|
|
|
|
# Creative prompt - for questions requiring imaginative responses
|
|
- id: creative
|
|
label: Creative Writer
|
|
raw: |
|
|
You are a creative writer. Answer the following in an imaginative and engaging way.
|
|
|
|
Question: {{question}}
|
|
|
|
# Technical prompt - for questions requiring detailed explanations
|
|
- id: technical
|
|
label: Technical Expert
|
|
raw: |
|
|
You are a technical expert. Provide a detailed, technical answer.
|
|
|
|
Question: {{question}}
|
|
|
|
providers:
|
|
# Using echo provider for demonstration - replace with your preferred LLM
|
|
- echo
|
|
|
|
tests:
|
|
# === Factual tests - only run with Factual Assistant ===
|
|
- description: Math question - factual only
|
|
vars:
|
|
question: What is 15 multiplied by 7?
|
|
prompts:
|
|
- Factual Assistant
|
|
assert:
|
|
- type: contains
|
|
value: factual assistant
|
|
|
|
- description: Geography question - factual only
|
|
vars:
|
|
question: What is the capital of France?
|
|
prompts:
|
|
- factual # Can also reference by ID
|
|
assert:
|
|
- type: contains
|
|
value: France
|
|
|
|
# === Creative tests - only run with Creative Writer ===
|
|
- description: Story prompt - creative only
|
|
vars:
|
|
question: Tell me about a magical forest
|
|
prompts:
|
|
- Creative Writer
|
|
assert:
|
|
- type: contains
|
|
value: magical forest
|
|
|
|
- description: Poetry prompt - creative only
|
|
vars:
|
|
question: Write a haiku about the moon
|
|
prompts:
|
|
- creative
|
|
assert:
|
|
- type: contains
|
|
value: moon
|
|
|
|
# === Technical tests - only run with Technical Expert ===
|
|
- description: Programming question - technical only
|
|
vars:
|
|
question: Explain what a binary search tree is
|
|
prompts:
|
|
- Technical Expert
|
|
assert:
|
|
- type: contains
|
|
value: binary search tree
|
|
|
|
# === Tests that run with multiple prompts ===
|
|
- description: General question - factual and technical
|
|
vars:
|
|
question: What is machine learning?
|
|
prompts:
|
|
- Factual Assistant
|
|
- Technical Expert
|
|
assert:
|
|
- type: contains
|
|
value: machine learning
|
|
|
|
# === Test with no prompts filter - runs with ALL prompts ===
|
|
- description: Universal test - all prompts
|
|
vars:
|
|
question: Hello, how are you?
|
|
# No prompts field = runs with all 3 prompts
|
|
assert:
|
|
- type: contains
|
|
value: Hello
|