Bayesian A/B test (Beta-Binomial) returning full posterior + recommendation
Per-row — runs once for each row.
| name | type | description |
|---|---|---|
| variants | JSON | Array of variant labels (use ARRAY_AGG in caller) |
| conversions | JSON | Array of binary outcomes (parallel to variants) |
Two-arm test with obvious winner
WITH
log AS (
SELECT
*
FROM
(
VALUES
('A', TRUE),
('A', FALSE),
('A', FALSE),
('A', FALSE),
('A', FALSE),
('A', TRUE),
('A', FALSE),
('A', FALSE),
('A', FALSE),
('A', TRUE),
('B', TRUE),
('B', TRUE),
('B', FALSE),
('B', TRUE),
('B', TRUE),
('B', TRUE),
('B', FALSE),
('B', TRUE),
('B', TRUE),
('B', TRUE)
) AS t (variant, converted)
)
SELECT
ab_test (ARRAY_AGG(variant), ARRAY_AGG(converted)) AS result
FROM
log;Assess the confidence/quality of a cascade execution result.
Compare values in a group for similarities, differences, and patterns
Generate the strongest counterargument to a position
Differentially-private count (Laplace mechanism, sensitivity=1)
Differentially-private mean (Laplace mechanism)
Detect logical fallacies in an argument
Bayesian A/B test (Beta-Binomial) returning full posterior + recommendation
Per-row — runs once for each row.
| name | type | description |
|---|---|---|
| variants | JSON | Array of variant labels (use ARRAY_AGG in caller) |
| conversions | JSON | Array of binary outcomes (parallel to variants) |
Two-arm test with obvious winner
WITH
log AS (
SELECT
*
FROM
(
VALUES
('A', TRUE),
('A', FALSE),
('A', FALSE),
('A', FALSE),
('A', FALSE),
('A', TRUE),
('A', FALSE),
('A', FALSE),
('A', FALSE),
('A', TRUE),
('B', TRUE),
('B', TRUE),
('B', FALSE),
('B', TRUE),
('B', TRUE),
('B', TRUE),
('B', FALSE),
('B', TRUE),
('B', TRUE),
('B', TRUE)
) AS t (variant, converted)
)
SELECT
ab_test (ARRAY_AGG(variant), ARRAY_AGG(converted)) AS result
FROM
log;Assess the confidence/quality of a cascade execution result.
Compare values in a group for similarities, differences, and patterns
Generate the strongest counterargument to a position
Differentially-private count (Laplace mechanism, sensitivity=1)
Differentially-private mean (Laplace mechanism)
Detect logical fallacies in an argument