Files
promptfoo--promptfoo/examples/integration-tau/README.md
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

57 lines
2.1 KiB
Markdown

# integration-tau (Tau Simulated User Example)
You can run this example with:
```bash
npx promptfoo@latest init --example integration-tau
cd integration-tau
```
This example demonstrates testing conversational AI agents using **OpenAI's Responses API with function calling**. It simulates an airline booking system with 31 different customer personas to test how well agents handle realistic conversations.
## How It Works
The example uses **mocked airline functions** to simulate a booking system without requiring real APIs:
- **Agent responds** to customer requests using conversational AI
- **Functions are called** for operations like searching flights and booking tickets
- **Mock responses** provide realistic data (user profiles, flight options, confirmations)
- **31 personas** test different customer behaviors and edge cases
## Quick Start
1. **Set your API key**: `export OPENAI_API_KEY=your_api_key_here`
2. **Run the evaluation**: `promptfoo eval`
3. **View results**: `promptfoo view`
## What You'll See
Realistic multi-turn conversations between different customer types and the booking agent:
```text
User: I need a flight from New York to Seattle on May 20th
Agent: I'd be happy to help! May I have your user ID?
User: It's mia_li_3668
Agent: Thank you! I found these options: Direct flight $325, One-stop $295
User: I'll take the cheaper United flight
Agent: Perfect! Your flight is confirmed. Confirmation: CF8X2M1K
```
## Customer Personas Tested
- **Budget travelers** focused on lowest prices
- **Business travelers** needing flexibility and speed
- **Anxious flyers** wanting direct routes and front seats
- **VIP customers** expecting premium service
- **Accessibility-focused** travelers with special needs
## Customization
- **Add personas**: Create new customer types with different behaviors
- **Extend functions**: Add seat selection, loyalty programs, etc.
- **Test other models**: Compare function calling across AI providers
## Learn More
For more information about the Simulated User Provider and other promptfoo features, visit the [documentation at promptfoo.dev](https://promptfoo.dev/docs/providers/simulated-user/).