PyAutoFit: Scientific Inference with Natural Language
AI Assistant | Documentation | Installation Guide | Introduction on Colab | HowToFit
Bring your models, data and likelihood code. Fit models, explore results and develop your analysis through conversation.
Getting Started
PyAutoFit and the autofit_assistant allow one to perform scientific inference using purely natural language.
Simply open your AI coding agent (codex or Claude Code are recommended) and input the following prompt:
Example Natural Language Prompt for Claude Code, Codex or other AI coding agent
I want to perform scientific inference with PyAutoFit (https://github.com/PyAutoLabs/PyAutoFit) and the
autofit_assistant (https://github.com/PyAutoLabs/autofit_assistant).
Begin the "start here" guide for a new user.
PyAutoFit is designed to be used entirely through natural language — the natural-language inference page walks through this, including its AI First Design.
Bring Your Own Likelihood (BYOL)
Already have a likelihood function for your science problem? Point the assistant at your existing code and it can set it up with PyAutoFit — defining the model, choosing priors with you, configuring a search and organising the results:
Example Natural Language Prompt for Claude Code, Codex or other AI coding agent
Set up PyAutoFit with my existing science project. An example likelihood function can be found at
[GitHub link or local directory].
First, give me an overview of my project and likelihood function. Compose an appropriate model, explain it to me,
and recommend a non-linear search (for example MCMC, nested sampling or maximum-likelihood estimation).
Do not begin inference until we have discussed the setup and I give you the go-ahead.
Once inference is running, explain how the results are written to disk and show me how to inspect and interpret
them with PyAutoFit.
The assistant answers this prompt with its BYOL mode — bring your own likelihood, the assistant brings the inference. It reads your code and restates what your likelihood scores, composes a model with priors chosen with you, wraps and validates your function unchanged, recommends a search, and runs nothing until you say go.
Your existing science code remains the source of the likelihood. With PyAutoFit built around it, you can perform inference through natural language while gaining access to features such as flexible priors and model composition, MCMC and nested sampling, automated result handling, model comparison and scalable workflows.
What is PyAutoFit?
PyAutoFit is a domain-agnostic Python package for scientific model fitting and Bayesian inference. It supports nested sampling, MCMC and optimisation, alongside advanced methods such as hierarchical models, search chaining and Bayesian model comparison.
autofit_assistant connects natural-language requests to runnable PyAutoFit workflows. Ask it to compose a model, discuss priors, run inference or compare competing explanations. You guide the science; it writes and runs Python scripts you can inspect, rerun and share.
Human Readable Documentation
- The PyAutoFit readthedocs, which includes an installation guide and an overview of PyAutoFit's core features.
- The introduction Jupyter Notebook on Colab, where you can try PyAutoFit in a web browser (without installation).
- The autofit_workspace GitHub repository, which includes example scripts demonstrating PyAutoFit's features.
- The standalone HowToFit repository, a series of Jupyter notebook lectures which give new users a step-by-step introduction to PyAutoFit.
HowToFit
For users less familiar with Bayesian inference and scientific analysis you may wish to read through the HowToFits lectures. These teach you the basic principles of Bayesian inference, with the content pitched at undergraduate level and above.
The lectures are available in the standalone HowToFit repository.
Support
Support for installation issues, help with Fit modeling and using PyAutoFit is available by raising an issue on the GitHub issues page.
We also offer support on the PyAutoFit Slack channel, where we also provide the latest updates on PyAutoFit. Slack is invitation-only, so if you'd like to join send an email requesting an invite.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autofit-2026.9.14.1.tar.gz.
File metadata
- Download URL: autofit-2026.9.14.1.tar.gz
- Upload date:
- Size: 8.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.0.1 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8300bd70f748da328443e7fe754bf1edc84da27170f7c61e8888e7ba43e4d5f6
|
|
| MD5 |
c8066a01956906c048b64e9d1128eda5
|
|
| BLAKE2b-256 |
74861ac7762d182af7e90be14fcdebef6f3c2454a645d7cad690a2a18b06d454
|
File details
Details for the file autofit-2026.9.14.1-py3-none-any.whl.
File metadata
- Download URL: autofit-2026.9.14.1-py3-none-any.whl
- Upload date:
- Size: 8.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.0.1 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4b5b6afaa436329c766593353ec3bcafc3d5eefdbf9da962134d1e93a04becd
|
|
| MD5 |
0f9c42dbc2d61958b9388dbc8153e3df
|
|
| BLAKE2b-256 |
5d076972eff95285766fc79655fdc80d18f57e69b325bfd81685ef896c6385b6
|