docs/features/sources.md

Sources

A Source is a connected system that feeds raw data into Vocion — Zoom transcripts, Gmail threads, HubSpot records, Google Drive documents, Slack messages, or your own internal systems.

What it does

A Source has two jobs:

  1. Pull raw documents in (via OAuth, API key, or push webhooks).
  2. Rank them during retrieval (via per-source weights so Zoom transcripts don't drown out a HubSpot deal note).

That's it. Everything else — chunking, embedding, hybrid search, reranking — is shared infrastructure and configured in retrieval.yaml.

Where it lives

A Source is authored (Phase 5) in workspace/<org>/sources/<slug>/source.yaml:

slug: hubspot
label: HubSpot
description: CRM records — Accounts, Contacts, Deals, Notes
auth:
  type: oauth2
  scopes: [contacts.read, deals.read, notes.read]
filters:
  include:
    - object_types: [deal, contact]
  exclude:
    - fields: [ssn, credit_card]
retrieval:
  chunking: {size: 1500} # override default for HubSpot
  rerank: {top_n_output: 6}

Runtime

Sources are first-party. Each kind registers a SourceConnector in libs/sources/registry.ts (discoverfetchtransform cycle). Sync runs orchestrated by SourceSyncService.runSync ingest documents into knowledge_document + knowledge_chunk (pgvector embeddings + Postgres FTS tsvector). Retrieval queries the same tables via RetrievalService.search. UI: /dashboard/sources.

Connection to other resources

  • Objects declare per-source relevance weights via sourceRelevance. A Deal object might weight hubspot: 2.0, gmail: 1.5.
  • Skills filter retrieval by source via ctx.retrieve(query, { sources: ['hubspot', 'gmail'] }).

Next