Tutorials / Getting started
Watch AI4BayesCode turn a plain-language model into a validated sampler, then load it in R and work with the posterior.
You describe the model in natural language, and AI4BayesCode parses it, completes any missing priors, decomposes it into blocks, assigns each block to a built-in sampler, and validates the generated code before handing it back.
How you start it.
AI4BayesCode runs on a general coding agent. To follow along
locally, open the AI4BayesCode folder and let the agent read the start.md skill,
as in the video above. If you have already installed it in Claude Code or Codex, skip the local
folder and launch it directly with /AI4BayesCode (or /Ai4bayescode).
With the sampler generated, you source it in R, run several chains, read the R-hat and ESS diagnostics, and pull out the posterior. Set up the tools first on the Install page, and see the API for every function shown here.