Every clover_* function below is plain SQL after curl -fsSL https://rvbbit.ai/clover-install.sql | psql. The diagrams are the real execution DAGs from the installer — arguments flow into hosted model steps (and deterministic code gates), and out as a typed SQL value. Receipts record the exact model version for every call.
■ encoder model■ LLM (gemma-4)■ code gate
Before the list — the one weird argument
model_blob_b64 — you hold the model, not us.
clover_fit and clover_anomaly_fit train a model on your rows and return it to you as a base64 blob inside the JSON result (->>'blob_b64'). Nothing is stored server-side — the model is just data in your database, like any other value. Operators that take model_blob_b64 are asking for that string back. The usual shape is one statement, fit feeding predict through a CTE:
Fit → predict, one statement
WITH model AS (
SELECT rvbbit.clover_fit(
'classifier',
'[[1,1],[2,1],[1,2],[8,9],[9,8],[9,9]]', -- features'["small","small","small",
"big","big","big"]'-- labels
) AS m
)
SELECT rvbbit.clover_predict(
m->>'blob_b64', -- the model, straight back in'[[9,9]]'-- rows to classify
)->'predictions'->>0FROM model; -- → big
Or keep the model — it's yours
-- Train once, store the blob like any value:CREATETABLE churn_model ASSELECTnow() AS trained_at,
rvbbit.clover_fit('classifier',
f.features, f.labels) AS m
FROM my_training_set f;
-- Reuse it anywhere, forever, no refitting:SELECT rvbbit.clover_predict(
(SELECT m->>'blob_b64'FROM churn_model
ORDERBY trained_at DESCLIMIT1),
c.features)
FROM new_customers c;
Same pattern for clover_anomaly_fit → clover_anomaly_score, and clover_explain takes the same blob (plus its sha256, also in the fit result) to produce SHAP attributions.
Encoder specialists
26 operators
Single hosted encoder models — embeddings, rerank, sentiment, NLI, OCR, transcription, forecasting, tabular prediction. Unmetered on every tier.
clover_anomaly_fit(features) → jsonb
Fit an anomaly detector on numeric rows (client-held model)
Returns your model. The fitted model comes back IN the result — result->>'blob_b64' — nothing is stored server-side. Hand that string to clover_anomaly_score / clover_explain, usually via a CTE (worked example ↑), or save the row in a table to reuse it forever.
Score rows for anomalousness against a fitted detector
model_blob_b64 = a model you fitted earlier. It's the blob_b64 field returned by clover_anomaly_fit — chain them in one statement with a CTE (worked example ↑) or read it back from wherever you stored it.
clover_classify_scores(t, labels) → jsonb
Zero-shot classification with the winning label and every candidate score
clover_cluster(values, num_clusters) → jsonb
Cluster a JSON array of texts into assignments and representative groups
clover_document_parse(doc) → jsonb
Parse a document into Markdown, typed blocks, tables, cells, hierarchy and source geometry
clover_embed(t) → jsonb
Reusable Arctic text embedding vector for KNN, similarity and clustering
SHAP feature attributions for a fitted TabPFN or anomaly model
model_blob_b64 = a model you fitted earlier. It's the blob_b64 field returned by clover_fit / clover_anomaly_fit — chain them in one statement with a CTE (worked example ↑) or read it back from wherever you stored it.
clover_extract(t, entity_types) → jsonb
Entity extraction (GLiNER) over your types
clover_fit(task, features, labels) → jsonb
Fit a TabPFN model on tabular rows — the fitted model is returned to you
Returns your model. The fitted model comes back IN the result — result->>'blob_b64' — nothing is stored server-side. Hand that string to clover_predict / clover_explain, usually via a CTE (worked example ↑), or save the row in a table to reuse it forever.
clover_forecast(series, horizon) → jsonb
Forecast a numeric series N steps ahead — median + quantile bands
Predict with a clover_fit model — classifications or regressions
model_blob_b64 = a model you fitted earlier. It's the blob_b64 field returned by clover_fit — chain them in one statement with a CTE (worked example ↑) or read it back from wherever you stored it.
clover_relations(t) → jsonb
Extract (subject, predicate, object) relation triples from text
clover_relevance(t, criterion) → float8
Relevance score 0..1 of text to criterion
clover_sentiment(t) → text
Sentiment label + score for a text
clover_series_anomalies(series) → jsonb
Score a long time series for anomalies with CPU-side TSPulse
clover_series_embed(series) → jsonb
Create a semantic TSPulse embedding for the most recent 512 points
clover_series_impute(series) → jsonb
Fill missing points in a time series with TSPulse reconstruction
clover_web_research(question) → jsonb
Research the public web with cited claims, typed knowledge, tenant-scoped snapshots, and exact evidence lineage
clover_web_research_deep(question) → jsonb
Research with one bounded follow-the-evidence pass to close material gaps
clover_web_scrape(url) → jsonb
Fetch a public HTTP(S) page or document and return Markdown, metadata, provenance, and extraction diagnostics
clover_web_watch(question, seed_urls) → jsonb
Refresh stable public URLs, reuse unchanged evidence without another synthesis, and report source and claim changes
Composite cascades
14 operators
Multi-step operators: encoder output flows through a deterministic code gate (or a second encoder) before it becomes SQL. The DAG is the documentation.
clover_classify(t, labels) → text
Zero-shot classification over your labels
clover_contradicts(a, b) → bool
TRUE if two statements contradict (NLI 3-class)
clover_entails(premise, hypothesis) → bool
TRUE if premise entails hypothesis (NLI)
clover_image_similar(a, b) → float8
Similarity of two images, or an image and a text description
clover_language(t) → text
ISO language code of text
clover_means(t, criterion) → bool
TRUE if text semantically matches a criterion (cross-encoder)
clover_moderate(t) → jsonb
Full moderation category scores
clover_ocr(doc) → text
OCR a document to plain text through the structured Granite-Docling parser
clover_sentiment_score(t) → float8
Continuous sentiment in [-1, 1]
clover_series_similarity(a, b) → float8
Compare two time-series shapes with TSPulse semantic similarity
clover_similar(a, b) → float8
Embedding cosine similarity of two texts
clover_toxic(t) → bool
TRUE if text is toxic
clover_transcribe(audio) → text
Transcribe audio to text (Whisper large-v3-turbo)
clover_web_markdown(url) → text
Fetch a public HTTP(S) page or document and return its cleaned Markdown
LLM operators
21 operators
Prompt-engineered gemma-4 steps with strict output contracts — extraction to your schema, repair, translation, judgment, logic. Metered by lanes, never tokens.
clover_llm_anonymize(t) → text
Rewrite text with all PII redacted ([NAME], [EMAIL], ...)
clover_llm_apply(t, instruction) → text
Apply an instruction/question to a text — answers only from the text
clover_llm_ask(q) → text
One-shot ask against the hosted generalist
clover_llm_canonical(t) → text
Canonical form of a value (NYC -> New York City)
clover_llm_consensus(texts, focus) → text
Synthesize the shared consensus across a JSON array of findings
clover_llm_contradicts(a, b) → bool
TRUE if two texts oppose each other on the same subject
clover_llm_date(t) → text
Messy text to ISO 8601 date, or NULL
clover_llm_extract(t, schema) → jsonb
Freeform text to a JSON object per a schema you describe
clover_llm_fallacies(argument) → jsonb
Detect logical fallacies — JSON array of {fallacy, explanation}
clover_llm_fix(value, hint) → text
Repair malformed values given a type hint (gmial.com -> gmail.com)
clover_llm_implies(premise, conclusion) → bool
TRUE if premise implies conclusion — incl. the quantifier logic fast NLI misses
clover_llm_means(t, criterion) → bool
TRUE if text semantically matches a criterion — LLM-judged for inputs that need thought
TRUE if two values identify the same real-world entity
clover_llm_score(t, criterion) → float8
Judge text against any English-phrased criterion, 0-1
clover_llm_steelman(argument) → text
Rewrite an argument in its strongest, most defensible form
clover_llm_supports(evidence, claim) → float8
How strongly evidence supports a claim, 0-1
clover_llm_timeline(t, reference_date) → jsonb
Extract a normalized chronological event timeline from text
clover_llm_translate(t, lang) → text
Translate to any language — returns only the translation
clover_llm_valid(value, rule) → bool
TRUE if a value satisfies an English-phrased rule
clover_triples(text, focus) → jsonb
Extract knowledge-graph triples from text as strict JSON — same contract as the built-in rvbbit.triples, so every KG surface (data_crawl, Document Brain, Scry) can run on it