90 lines
2.3 KiB
YAML
90 lines
2.3 KiB
YAML
# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
|
|
description: 'Swap Planner Skill Evaluation'
|
|
|
|
# Prompt template that injects skill context + case content via vars
|
|
prompts:
|
|
- file://prompt-wrapper.txt
|
|
|
|
# Provider configuration
|
|
providers:
|
|
- id: anthropic:claude-sonnet-4-5-20250929
|
|
config:
|
|
temperature: 0
|
|
max_tokens: 4096
|
|
|
|
# Default test configuration applied to all tests
|
|
defaultTest:
|
|
options:
|
|
timeout: 120000 # 2 minutes per case
|
|
vars:
|
|
skill_content: file://../../../packages/plugins/uniswap-driver/skills/swap-planner/SKILL.md
|
|
|
|
# Test cases with specific assertions
|
|
tests:
|
|
# Test 1: Basic Token Swap Planning
|
|
- vars:
|
|
case_content: file://cases/basic-swap.md
|
|
assert:
|
|
- type: llm-rubric
|
|
value: file://rubrics/swap-correctness.txt
|
|
threshold: 0.85
|
|
provider: anthropic:claude-sonnet-4-5-20250929
|
|
|
|
# Must include a deep link
|
|
- type: contains-any
|
|
value:
|
|
- 'app.uniswap.org'
|
|
- 'uniswap.org'
|
|
# Must reference token verification
|
|
- type: contains-any
|
|
value:
|
|
- 'dexscreener'
|
|
- 'DexScreener'
|
|
- 'verify'
|
|
- 'contract'
|
|
|
|
# Test 2: Token Discovery Workflow
|
|
- vars:
|
|
case_content: file://cases/token-discovery.md
|
|
assert:
|
|
- type: llm-rubric
|
|
value: file://rubrics/discovery-completeness.txt
|
|
threshold: 0.8
|
|
provider: anthropic:claude-sonnet-4-5-20250929
|
|
|
|
# Must use data providers
|
|
- type: contains-any
|
|
value:
|
|
- 'dexscreener'
|
|
- 'DexScreener'
|
|
- 'api.dexscreener.com'
|
|
# Must show token details
|
|
- type: contains-any
|
|
value:
|
|
- 'liquidity'
|
|
- 'volume'
|
|
- 'price'
|
|
|
|
# Test 3: Cross-Chain Swap
|
|
- vars:
|
|
case_content: file://cases/cross-chain-swap.md
|
|
assert:
|
|
- type: llm-rubric
|
|
value: file://rubrics/swap-correctness.txt
|
|
threshold: 0.8
|
|
provider: anthropic:claude-sonnet-4-5-20250929
|
|
|
|
# Must include chain specification
|
|
- type: contains-any
|
|
value:
|
|
- 'chain'
|
|
- 'Base'
|
|
- 'Arbitrum'
|
|
- 'Polygon'
|
|
- 'Optimism'
|
|
# Must include deep link
|
|
- type: contains-any
|
|
value:
|
|
- 'app.uniswap.org'
|
|
- 'uniswap.org'
|