Files
promptfoo--promptfoo/examples/amazon-bedrock/models/promptfooconfig.inference-profiles.yaml
T
wehub-resource-sync 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
chore: import upstream snapshot with attribution
2026-07-13 13:24:08 +08:00

146 lines
4.9 KiB
YAML

# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
description: 'AWS Bedrock Application Inference Profiles Example'
prompts:
- 'Write a comprehensive analysis of {{topic}} in 3 paragraphs'
- 'Create a creative story about {{topic}} with an unexpected twist'
- |
Answer the following question step by step:
{{question}}
providers:
# Application Inference Profiles - Multi-region, automatic failover
# These require the inferenceModelType configuration parameter
# Claude inference profile - optimized for high availability
- id: bedrock:arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/claude-ha-profile
label: 'Claude HA Profile'
config:
inferenceModelType: 'claude' # Required for inference profiles
region: 'us-east-1'
temperature: 0.7
max_tokens: 1024
anthropic_version: 'bedrock-2023-05-31'
# Llama inference profile - latest version (defaults to Llama 4)
- id: bedrock:arn:aws:bedrock:us-west-2:123456789012:application-inference-profile/llama-latest-profile
label: 'Llama Latest Profile'
config:
inferenceModelType: 'llama' # Defaults to latest Llama version (v4)
region: 'us-west-2'
max_gen_len: 1024
temperature: 0.7
top_p: 0.9
# Llama 3.3 specific inference profile
- id: bedrock:arn:aws:bedrock:us-west-2:123456789012:application-inference-profile/llama33-profile
label: 'Llama 3.3 Profile'
config:
inferenceModelType: 'llama3.3' # Specific Llama 3.3 version
region: 'us-west-2'
max_gen_len: 1024
temperature: 0.6
# Nova inference profile - cost optimized
- id: bedrock:arn:aws:bedrock:eu-west-1:123456789012:application-inference-profile/nova-cost-optimized
label: 'Nova Cost-Optimized Profile'
config:
inferenceModelType: 'nova'
region: 'eu-west-1'
interfaceConfig:
max_new_tokens: 1024
temperature: 0.7
top_p: 0.95
top_k: 50
# Mistral inference profile
- id: bedrock:arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/mistral-profile
label: 'Mistral Profile'
config:
inferenceModelType: 'mistral'
region: 'us-east-1'
max_tokens: 1024
temperature: 0.7
top_p: 0.9
# DeepSeek inference profile with thinking capability
- id: bedrock:arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/deepseek-reasoning
label: 'DeepSeek Reasoning Profile'
config:
inferenceModelType: 'deepseek'
region: 'us-east-1'
max_tokens: 2048
temperature: 0.5
showThinking: true # Include thinking process in output
# OpenAI models via Bedrock inference profile
- id: bedrock:arn:aws:bedrock:us-west-2:123456789012:application-inference-profile/openai-gpt-profile
label: 'OpenAI GPT Profile'
config:
inferenceModelType: 'openai'
region: 'us-west-2'
max_completion_tokens: 1024
temperature: 0.7
reasoning_effort: 'medium' # Control reasoning depth
# Comparison with direct model IDs (no inference profile)
- id: bedrock:us.anthropic.claude-sonnet-4-6
label: 'Claude Direct (No Profile)'
config:
region: 'us-east-1'
temperature: 0.7
max_tokens: 1024
tests:
- vars:
topic: 'artificial intelligence in healthcare'
question: 'How do neural networks learn from data?'
- vars:
topic: 'climate change and renewable energy'
question: 'What are the main differences between supervised and unsupervised learning?'
- vars:
topic: 'the future of space exploration'
question: 'Explain quantum computing to a 10-year-old'
# Test with custom grading using an inference profile
- vars:
topic: 'blockchain technology'
question: 'How does encryption work in modern communications?'
options:
# Use an inference profile for grading assertions
provider:
id: bedrock:arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/grading-profile
config:
inferenceModelType: 'claude'
temperature: 0 # Low temperature for consistent grading
max_tokens: 512
assert:
- type: llm-rubric
value: 'The response should be comprehensive, technically accurate, and well-structured'
- type: contains
value: 'technology'
- type: min-length
value: 200
# Default grading configuration using an inference profile
defaultTest:
options:
provider:
id: bedrock:arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/default-grading
config:
inferenceModelType: 'claude'
region: 'us-east-1'
temperature: 0
max_tokens: 256
assert:
- type: cost
threshold: 0.002 # Maximum cost per test
- type: latency
threshold: 10000 # Maximum 10 seconds
- type: not-contains
value: 'I cannot'
- type: not-contains
value: 'As an AI'