an independent practice · automation · optimization · modeling · ai

three systems, one thread.

systems that decide, adapt, and improve themselves.

matrices is the independent practice of sam cialek, and everything it builds is the same move made carefully: write the model down, condition it on evidence, act on what the posterior says. That move is the line running down the left of this page. It begins under the sign for integration, passes through three working systems, and ends where the practice began.

01

three systems

serif

a consumer-health causal inference engine

Wearable and biomarker data in, dose-aware recommendations out, and a causal model in between that knows what it does not know.

problem

Wearables and blood panels produce a stream of numbers and almost no guidance about what to change. Generic advice ignores the only thing that matters: how your outcomes respond to your behaviors, at your doses.

approach

serif begins with a causal DAG: sleep and training load act on biomarkers, biomarkers act on outcomes, and every arrow is a commitment that can be checked, not a decoration. The model was written down in Stan before the first data point was trusted, and Bayesian posteriors are fit over the edges of the graph, so each recommendation carries a dose and an uncertainty, never just a direction.

theta[c]  ~ normal(mu_pop, tau);      // cohorts share strength
effect[n] ~ normal(dose_curve(theta[cohort[n]], dose[n]), sigma);
two lines from the Stan program behind serif's dose curves. Every tilde is a distributional commitment, and the hierarchy is the point: 3 cohorts pool through a common prior, so each participant's curve borrows strength from all the rest.

the update

When a new biomarker draw arrives, serif does not start over. The fresh draw enters as the likelihood, everything believed the day before stands as the prior, and their product, renormalized, is the posterior the next recommendation is built on.

the update serif runs for every participant, at every draw.

result

The engine has run for 1,188 participants across 3 cohorts, turning raw wearable and biomarker streams into recommendations that are personal, dose-aware, and honest about what the data can and cannot support.

Causal diagram: sleep and training load point to biomarker, biomarker points to outcome, with dotted direct paths from sleep and training load to outcome. sleep training load biomarker outcome direct effects mediated
The shape of the serif model. Behaviors act on a biomarker, and the biomarker acts on the outcome. Dotted paths are direct effects; the solid path is the mediated one the engine estimates, per person and per dose.

prism

a Bayesian adaptive political-disposition quiz

Political disposition as 14 latent dimensions and 130 archetypes, measured by a quiz that rewrites itself as you answer.

problem

Political labels compress a person onto one axis, and fixed-form quizzes spend most of their questions confirming what the first few already established. The interesting structure, how someone reasons and not just where they land, never gets measured.

approach

prism keeps a running posterior over 14 latent dimensions and matches it against 130 archetypes. Each next question is chosen for its expected information: the engine marginalizes over the answers you have not given yet and asks the one whose answer would move the posterior most. Nothing about the order is scripted; the quiz you take is assembled by your own answers.

result

The estimate converges in about 30 questions: enough to place a person among 130 archetypes without asking a hundred things their earlier answers already implied.

Scatter plot sketch: archetype dots across two dimensions, with a dotted path that starts wide and spirals inward to a circled point labeled about question 30. one latent dimension another dimension question 1 about question 30
A sketch of two of prism's 14 dimensions. Dots are archetypes; the dotted path is the running estimate, jumping widely on early answers and settling in about 30 questions.

markets

prediction-market decomposition and tooling

A prediction-market price is one number wearing many beliefs. The tooling here takes the number apart.

problem

Related contracts move together because they share underlying drivers, and the price alone will not tell you which driver moved. Trading or forecasting on raw prices means reasoning about a sum without seeing its parts.

approach

A Bayesian factor model, prototyped in PyMC while the structure was still in question and rewritten in NumPyro once speed mattered, decomposes contract prices into a few shared latent terms plus a residual each contract keeps to itself. Live dashboards hold the decomposition current as prices move, so a move in the headline number can be read as a move in a particular belief.

result

Live dashboards over the decomposition, and an active forecasting track record built on the same machinery: forecasts placed against the latent terms rather than against the headline number.

Tree diagram: a contract price node splits into latent term a, latent term b, latent term c, and a residual; the latent terms are marked as shared with related contracts. contract price latent term a latent term b latent term c residual + + + shared with related contracts this contract only
One contract's price, split into latent terms shared across a family of related contracts plus a residual that belongs to this contract alone. When prices move, the decomposition says which term did the moving.
02

the practice

The three systems above are built from four kinds of work. Engagements draw on whichever mix the problem needs.

aautomation

Agentic pipelines and workflow orchestration: LLM-powered systems that run unattended, with a human in the loop exactly where judgment matters and nowhere else.

boptimization

Portfolio and resource-allocation optimization, and decision analysis under uncertainty. Objectives are distribution-aware: the full shape of outcomes, not just the expected value.

cmodeling

Generative models written down before they are fit, and audited with posterior predictive checks afterward: a fitted model must be able to fake data that resembles the world, or it goes back on the bench. Causal structure is stated as a DAG, so the assumptions stay visible enough to argue with.

dai

Applied LLM systems: evaluation and scoring pipelines, adaptive question engines, and machine learning that ships to real users rather than staying in a notebook.

matrices is the independent practice of sam cialek: fifteen years across quantitative finance, data science, and software engineering, now pointed at systems that decide, adapt, and improve themselves.

B.A. Economics & Mathematics New York University 2011

MBA Columbia Business School 2019

M.S. Computer Science Georgia Tech 2024

03

start a conversation

If you have a decision process that should be a system, or a system that should be smarter about its decisions, follow the thread one step further. Thirty minutes is usually enough to tell whether the problem is a fit.