Client-ready demo for running OpenAI file_search through a Braintrust remote eval and testing it in Playground.
- Remote eval (Python):
src/eval_file_search.py - Optional dataset seeder (TypeScript):
src/createDataset.ts
- Python 3.10+
- Node.js 18+ (only for the dataset seeder script)
- Braintrust API key
- OpenAI API key
- OpenAI vector store ID (
vs_...)
cp .env.example .env
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip braintrust openai python-dotenv pydantic
npm installFill in .env:
BRAINTRUST_API_KEYBRAINTRUST_PROJECTBRAINTRUST_DATASETOPENAI_API_KEYOPENAI_VECTOR_STORE_ID
npm run create-datasetnpm run evalThis starts Braintrust in --dev mode using src/eval_file_search.py.
npm run eval:pushmodel(default:gpt-4o)system_promptmax_results(default:15)vector_store_id(falls back toOPENAI_VECTOR_STORE_ID)debug(returns structured diagnostic payload)
The eval uses client.responses.create(...) with tools=[{"type": "file_search", ...}], which is the supported path for built-in file search tool usage.