Data Source Connectors
Set up credentials and connect external data sources to generate synthetic goldens
Overview
Before generating synthetic goldens, you need to connect a data source in Project Settings > Data Sources. Each connector requires credentials from the source platform. This page walks you through the setup for every supported source type.
Setup Credentials
Create a Google Cloud Project
Go to Google Cloud Console and create a project (or use an existing one).
Enable the Google Drive API
Navigate to APIs & Services > Library, search for "Google Drive API", and click Enable.
Create a Service Account
Go to IAM & Admin > Service Accounts > Create Service Account. Give it a name and finish the creation wizard.
Download the JSON Key
Click on the service account you just created, go to the Keys tab, then Add Key > Create new key > JSON. A file will be downloaded to your machine. It looks like this:
{ "type": "service_account", "project_id": "my-project", "private_key_id": "abc123", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n", "client_email": "my-sa@my-project.iam.gserviceaccount.com", "client_id": "123456789", ... }
Prepare Your Data
Create a Folder in Google Drive
Create a new folder in Google Drive and copy the folder URL. It looks like:
https://drive.google.com/drive/folders/1ABcDeFgHiJkLmNoPqRsTuVwXyZShare the Folder with the Service Account
Right-click the folder > Share, and add the
client_emailfrom the downloaded JSON key file (e.g.my-sa@my-project.iam.gserviceaccount.com). Give it Viewer access.Add Files
Place
.txt,.pdf, or.docxfiles with meaningful text content in the folder. Each file should contain at least a few paragraphs so that chunking produces enough context for golden generation.
Connect in Confident AI
Add the Data Source
Go to Project Settings > Data Sources > Add and fill in:
Field Value Name A descriptive name (e.g. "My Google Drive") Type Google Drive Service Account JSON Paste the entire contents of the downloaded JSON key Folder URL The Google Drive folder URL from the previous step Create a Generation Config
Navigate to Datasets > Automations > Generate from Data Source > Add generation config and configure:
Field Value Name A name for this config Data Source Select the data source you created Max Goldens Per Context Number of goldens per chunk (e.g. 2) Generate
Click Generate to start the synthetic golden generation process.
Setup Credentials
Create a Slack App
Go to Slack API > Create New App > From scratch. Pick a name and select your workspace.
Add Bot Token Scopes
Navigate to OAuth & Permissions > Bot Token Scopes and add the following scopes:
Scope Purpose channels:historyRead messages from channels channels:readList available channels users:readResolve user names (optional) Install to Workspace
Click Install to Workspace and copy the Bot User OAuth Token (starts with
xoxb-...).Invite the Bot to Channels
In Slack, go to each channel you want to include and type
/invite @YourBotNameto give the bot access.
Connect in Confident AI
Add the Data Source
Go to Project Settings > Data Sources > Add and fill in:
Field Value Name A descriptive name (e.g. "My Slack") Type Slack Bot Token Your Bot User OAuth Token (e.g. xoxb-1234...)Create a Generation Config and Generate
Create a generation config pointing to this data source, then click Generate.
What to Expect
- Messages are read from the
channel_messagesstream - Each document's text is all messages concatenated chronologically
- Channels with very few messages may produce empty documents, which are filtered out automatically
Setup Credentials
Create a Notion Integration
Go to Notion Integrations > New integration. Pick a name and select the workspace.
Copy the Integration Token
Copy the Internal Integration Token (starts with
secret_...).Connect Pages to the Integration
For each Notion page you want to include, click the ... menu > Connections > find your integration > Connect.
Connect in Confident AI
Add the Data Source
Go to Project Settings > Data Sources > Add and fill in:
Field Value Name A descriptive name (e.g. "My Notion") Type Notion Integration Token Your Notion integration token ( secret_...)Create a Generation Config and Generate
Create a generation config pointing to this data source, then click Generate.
What to Expect
- Pages provide titles; blocks provide the actual text content
- Documents are assembled per page: title + all block text concatenated
- Pages with only images or embeds and no text content will be filtered out
Setup Credentials
Register an App in Azure
Go to Azure Portal > Azure Active Directory > App registrations > New registration. Note the Application (client) ID and Directory (tenant) ID.
Create a Client Secret
Navigate to Certificates & Secrets > New client secret. Copy the Value (not the secret ID).
Add API Permissions
Go to API Permissions > Add a permission > Microsoft Graph > Application permissions and add:
Permission Purpose Sites.Read.AllRead SharePoint site content Files.Read.AllRead files across the organization Click Grant admin consent (requires an Azure AD admin).
Connect in Confident AI
Add the Data Source
Go to Project Settings > Data Sources > Add and fill in:
Field Value Name A descriptive name (e.g. "My SharePoint") Type SharePoint Tenant ID The Directory (tenant) ID from Azure Client ID The Application (client) ID from Azure Client Secret The client secret value you copied Create a Generation Config and Generate
Create a generation config pointing to this data source, then click Generate.
Last updated on