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

1

Create a Google Cloud Project

Go to Google Cloud Console and create a project (or use an existing one).

2

Enable the Google Drive API

Navigate to APIs & Services > Library, search for “Google Drive API”, and click Enable.

3

Create a Service Account

Go to IAM & Admin > Service Accounts > Create Service Account. Give it a name and finish the creation wizard.

4

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:

1{
2 "type": "service_account",
3 "project_id": "my-project",
4 "private_key_id": "abc123",
5 "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
6 "client_email": "[email protected]",
7 "client_id": "123456789",
8 ...
9}

Prepare Your Data

1

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/1ABcDeFgHiJkLmNoPqRsTuVwXyZ
2

Share the Folder with the Service Account

Right-click the folder > Share, and add the client_email from the downloaded JSON key file (e.g. [email protected]). Give it Viewer access.

3

Add Files

Place .txt, .pdf, or .docx files 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

1

Add the Data Source

Go to Project Settings > Data Sources > Add and fill in:

FieldValue
NameA descriptive name (e.g. “My Google Drive”)
TypeGoogle Drive
Service Account JSONPaste the entire contents of the downloaded JSON key
Folder URLThe Google Drive folder URL from the previous step
2

Create a Generation Config

Navigate to Datasets > Automations > Generate from Data Source > Add generation config and configure:

FieldValue
NameA name for this config
Data SourceSelect the data source you created
Max Goldens Per ContextNumber of goldens per chunk (e.g. 2)
3

Generate

Click Generate to start the synthetic golden generation process.