> ## Documentation Index
> Fetch the complete documentation index at: https://docs.braintrust.ti.trilogy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Base

> Connect a Google Drive folder as a knowledge source for your expert using Drive sync and RAG retrieval.

Braintrust experts can be given a knowledge base by connecting a Google Drive folder. When a user sends a message, chunks from the synced files that semantically match the query are automatically injected into the expert's context.

## How It Actually Works

Drive folder sync uses **RAG (retrieval-augmented generation)**. It does not give the expert the ability to browse or search the folder on demand. Instead:

1. Files in the connected folder are indexed and chunked.
2. When a message arrives, the most semantically similar chunks are retrieved.
3. Those chunks are injected into the expert's context before it responds.

This means the expert only sees what the retrieval step surfaces — it cannot look up a specific document by name, navigate the folder structure, or confirm whether a file exists.

## Setting Up Drive Folder Sync

<Steps>
  <Step title="Open the expert editor">
    Go to the expert's detail page and click **Edit Expert**.
  </Step>

  <Step title="Go to Edit-Only settings">
    Scroll to the **Edit-Only** section at the bottom of the editor.
  </Step>

  <Step title="Add the Google Drive folder link">
    Paste the URL of the Google Drive folder you want to sync.
  </Step>

  <Step title="Save">
    Save the expert. Files will be indexed and chunks will be available for retrieval on the next message.
  </Step>
</Steps>

<Tip>
  Keep the folder curated. Remove outdated, duplicate, or low-quality files — stale content degrades retrieval accuracy and can cause the expert to reference incorrect information.
</Tip>

***

<CardGroup cols={2}>
  <Card title="Hives Reference" icon="cubes" color="#007AFF" href="/experts/hives-reference" arrow={true}>
    Add the Google Drive hive for active document retrieval.
  </Card>

  <Card title="Skills" icon="wand-magic-sparkles" color="#5856D6" href="/experts/skills" arrow={true}>
    Add reusable behavior packages and domain knowledge modules.
  </Card>

  <Card title="Expert Fields Reference" icon="list-check" color="#FF9500" href="/experts/expert-fields-reference" arrow={true}>
    Full reference for all expert configuration fields.
  </Card>

  <Card title="Editing an Expert" icon="pen" color="#34C759" href="/management/editing-an-agent" arrow={true}>
    Update an existing expert's settings safely.
  </Card>
</CardGroup>
