Skip to content

Retrieval (RETRIEVE)

Retrieval is a relation source inside OSL-SQL: the RETRIEVE(...) table function. There is no separate /osl/retrieve endpoint any more — you SELECT from RETRIEVE(...) in a POST /osl/query body.

SELECT text, score, customer_id
FROM RETRIEVE(facet => 'meeting_transcripts',
query => 'european equity exposure',
top_k => 5)
  • facet — a declared UnstructuredFacet.
  • query — natural text; the engine embeds it with the facet’s declared model.
  • top_k — must satisfy ≤ facet.retrieval.max_top_k.
  • Metadata filters are applied by the governed store (per-subject row predicates) before the ACL overfetch trim.

Each returned passage carries a cite block (source · doc · chunk) and its denormalized entity key, so results can be attributed and correlated.

{
"text": "Anna wants to increase EU equity exposure […]",
"score": 0.91,
"customer_id": "9c1e…f04a",
"cite": { "source": "gong://…", "doc_id": "meet-2026-05-08-7a3c", "chunk_id": "chk-…" },
"redacted_fields": []
}
  • Redaction version. The facet is served at the subject’s required redaction version — exact-or-deny. Redacted metadata fields are listed in redacted_fields.
  • Row-level ACL. Deny-by-default: an actor with no grant gets zero passages.
  • Isolation. The query opens only the selected version’s Lance table — no side-channel to less-redacted vectors.