Skip to content
Talk to our solutions team

AI Knowledge

AI Knowledge is the platform’s search service. It runs as know.svc, and its service name is search: that is the name its configuration, its logs and its error messages use. A product declares the documents it searches and the backends that hold them in its search/ folder; callers index documents and search them per tenant, and every operation is checked against the document’s own access rules.

Backend typeEngineA search sendsMatches on
lexicalMeilisearchquery, a text stringTerms in the fields declared index: true, or in every field when none is
semanticpgvector or Milvusvector, the query embeddingNearest neighbours of a floatvector field

A backend is one or the other, and each search goes to one backend. Both kinds take the same filter grammar, and both return results with a score where higher is better.

Vectors are computed by the caller. Index a document with its embedding already in the vector field, and search with the query’s embedding. The AI Gateway computes embeddings (POST /v1/embeddings), and so does AI Flow’s embed task, so a flow can embed and index in one pipeline.

EngineUse it forStores
MeilisearchText search with typo tolerance and filtersOne index per tenant and document
pgvectorVector search beside your relational dataTables in the tenant’s search datastore, through the platform’s data engine
MilvusVector search over large collectionsOne collection per tenant and document

Which backend holds a document is declared in the product, so a document with one vector field can move from pgvector to Milvus with the callers’ requests changing only in the backend name.

Each document carries an access: block in the same grammar as a Data entity: actions says who may search, index and delete it, and rls says which documents each caller sees or may change. The rules are enforced on every backend, inside the search itself, so a limit: 10 returns ten documents the caller may read.

POST /index/site
Authorization: Bearer <token>
X-Customer: acme
X-Product: crm
X-Env: prod
X-Tenant: t1
{ "doctype": "pages", "docid": "intro", "document": { "title": "Getting started", "team": "docs" } }
PATCH /index/site/pages
{ "query": "getting started", "filter": { "team": "docs" }, "limit": 5 }
{
"results": [
{ "docid": "intro", "score": 0.98, "data": { "id": "intro", "title": "Getting started", "team": "docs", "slug": "getting-started" } }
]
}

A document can follow a Data entity: Data’s event outbox posts every committed change of the entity to the search service, which indexes or deletes the matching document. See Configuration.

AI Knowledge holds your corpus and answers searches over it. Conversation history and long-term recall are AI Memory.

  • Core Concepts: documents, fields, backends, scores and access
  • Configuration: the search/ folder, backend connections and sync
  • API: every route, request and error
  • Operations: reloads, storage names and what to watch