Tutorials / Getting started
Watch AI4BayesCode turn a plain-language model into a validated sampler, then load it in R and work with the posterior. Two short parts, back to back.
Due to technical issues, these recordings are low resolution. We will upload a higher-definition version as soon as possible.
Part 1 · Generating the sampler
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 rather than a model of its own. 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).
Part 2 · Running it in R
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.