Skip to main content

Retrieval

Sellable product

This capability is granted by an API key scoped to the ai-suite product (product face). See the product reference below.

Hybrid retrieval as a shared capability — dense (ollama embeddings) + lexical + rerank over a durable pgvector store; per-org ingest + query. Consumers: dialog-core's RAG (C7 split) + vagary-platform's migrated vector-search (D5, post-D-3 pgvector) = ≥2. INTERNAL (D-4). Not a clean cut — a shared LIVE dependency the ARCG rides; changes are staged + the org-brain deployment is convergence-owned.

  • Group: Voice & AI
  • Contract: contracts/retrieval/v1/openapi.yaml
  • Public base: https://api.vagarylabs.com (the consolidated API gateway — one host, per-brand sibling api.<zone>)
  • Auth: a product API key (vgk_…) issued from the console — Authorization: Bearer vgk_…
  • Product face (customer-keyed):
    • https://api.vagarylabs.com/product/v1/retrieval/search
  • Capability face (internal first-party — NOT customer-keyed):
    • https://api.vagarylabs.com/v1/retrieve
    • https://api.vagarylabs.com/v1/ingest

Endpoints

MethodPathSummary
POST/retrieveHybrid retrieve (dense+lexical+rerank) for an org's corpus
POST/ingestSynchronous ingest of documents into an org's corpus (embedded to pgvector)
POST/deleteRetire a KB source's documents for an org (managed-KB, Row10c)
GET/statscorpus + index stats per org
GET/healthliveness (recaller SLO-gated)
GET/metricsPrometheus

Product face

The external, paying-customer surface served by the edge at /product/v1/* (contracts/retrieval/product/v1/openapi.yaml).

MethodPathSummary
POST/searchSearch your org's corpus (managed, metered) — wraps the capability's hybrid retrieve

Schemas

RetrieveRequest

FieldTypeDescription
organization_idstring
querystring
top_kinteger
rerankboolean
hybridbooleandense+lexical (default true)
include_citationsbooleanmanaged-KB (Row10c): add a citation object per result, derived from kb_* metadata. Default false; additive (sealed result shape unchanged when absent).

RetrieveResponse

FieldTypeDescription
resultsarray

Citation

FieldTypeDescription
titlestring
urlstring
source_idstring
source_typestringdoc
published_atstring

DeleteRequest

FieldTypeDescription
organization_idstring
source_idstringdelete every KB doc ingested from this source (kb_source_id)

DeleteResponse

FieldTypeDescription
deletedinteger
organization_idstring
source_idstring

IngestRequest

FieldTypeDescription
organization_idstring
documentsarray

IngestResponse

FieldTypeDescription
ingestedintegerdocuments embedded + upserted this call
organization_idstringproduct-tier tenant (I6)
idsarraystored document ids (client-supplied or generated)

Error

FieldTypeDescription
errorstring

Generated by scripts/gen-capability-docs.py from contracts/retrieval/v1/openapi.yaml — the contract IS the source of truth; edit the contract, not this page.