examples/integration-sharepoint/README.md
This example demonstrates how to use promptfoo with Microsoft SharePoint to import test cases from CSV files stored in SharePoint.
Copy the environment variables template:
cp .env.example .env
Fill in your SharePoint credentials in .env:
SHAREPOINT_CLIENT_ID - Your Azure AD application client IDSHAREPOINT_TENANT_ID - Your Azure AD tenant IDSHAREPOINT_CERT_PATH - Path to your certificate PEM fileSHAREPOINT_BASE_URL - Your SharePoint base URLEnsure your CSV file is in SharePoint with the following format:
language,input,__expected
French,Hello world,icontains: bonjour
German,I'm hungry,llm-rubric: is german
Swahili,Hello world,similar(0.8):hello world
Update promptfooconfig.yaml with your SharePoint URL:
tests: https://yourcompany.sharepoint.com/sites/yoursite/Shared%20Documents/test-cases.csv
# Install dependencies
npm install
# Scaffold the example
npx promptfoo@latest init --example integration-sharepoint
# Run the eval
npx promptfoo eval