PumasAide

PumasAide is a bridge between AI assistants and Pumas. You describe analyses in natural language; the AI uses Pumas tools on your behalf and returns results.

New to Pumas?

Jump straight to NCA Analysis Walkthrough or Population PK Walkthrough to see PumasAide in action, then return here to learn more.

What Can You Do with PumasAide?

Here are examples of what you can ask:

  • Load and transform data: "Load the PK data from study_data.csv and show me the first few rows"
  • Build models: "Create a two-compartment model with first-order absorption"
  • Fit models: "Fit this model to my data using FOCE"
  • Run NCA: "Calculate AUC, Cmax, and half-life for each subject"
  • Simulate: "Simulate 100 subjects at 50mg, 100mg, and 200mg doses"
  • Visualize: "Create a VPC plot comparing predictions to observations"

Every action generates reviewable Julia code, so you learn Pumas syntax while getting results.

How It Works

When you make a request, the AI assistant reads the relevant documentation and workflow guides, then writes Julia code to perform the analysis. Each step produces a script saved to the programs/ directory.

For example, when you ask "Load my PK data from study.csv", the AI:

  1. Looks up the data loading API documentation
  2. Writes a Julia script to programs/01-data/01-load-pk-data.jl:
using CSV, DataFrames

pk_data = CSV.read("../../datasets/study.csv", DataFrame; missingstring = ["NA", ".", ""])
  1. Executes the script, making pk_data available in the workspace
  2. Shows you the result and a preview URL

This approach gives you:

  • Traceable actions: Every operation produces an executable Julia script
  • Reviewable code: You see what the AI writes before it runs, and can edit scripts directly
  • Reproducibility: Scripts in programs/ can be re-run independently, version controlled, and shared
  • Learning opportunity: Watch how natural language maps to Pumas code

Persistent workspace: Objects (DataFrames, models, fit results) stay in memory across tool calls, so each step builds on previous results naturally.

Live preview: View plots, tables, and results at http://localhost:8081/preview while working.

The generated code uses standard Pumas packages (Pumas, NCA, Bioequivalence, AlgebraOfGraphics, SummaryTables), so everything you learn transfers directly to manual Pumas workflows.

What's a 'tool'?

In AI terminology, a "tool" is a function the AI can call to perform actions. PumasAide provides three tools: pumas_knowledge for looking up documentation and API references, include_julia_file for executing scripts, and eval_julia_code for quick inspection. The AI writes standard Julia code against Pumas packages—there are no special abstractions to learn.

Capabilities

  • Load and transform pharmacometric data
  • Perform non-compartmental analysis (NCA)
  • Build and fit population PK/PD models
  • Run simulations for dose selection and trial design
  • Generate publication-quality plots and tables
  • Create formal analysis reports

See the NCA Analysis Walkthrough and Population PK Walkthrough for complete worked examples.

Why Use It

  • Natural language interface: Describe goals instead of writing code
  • Guided workflows: Built-in steps for data preparation, model specification, and quality checks
  • Reproducible output: Every step generates Julia code saved to programs/
  • Standard Pumas packages: Generated code uses Pumas, NCA, AlgebraOfGraphics, SummaryTables—transferable to manual workflows
  • Learn while doing: Review the Julia code the AI writes to learn Pumas patterns naturally. Use pumas_knowledge to look up any function you're curious about.

Data Privacy

Your data flows only to your chosen LLM provider (Anthropic, OpenAI, Google, etc.). No analysis data is sent to PumasAI. You control your data and can select providers that meet your compliance requirements.

Suggested Learning Path

Beginner:

  1. Start with the interactive tutorial: ask "Walk me through an NCA analysis with sample data"
  2. Follow the NCA Analysis Walkthrough or Population PK Walkthrough
  3. Try basic visualizations with your own data

Intermediate:

  1. Build a PopPK model from scratch using natural language
  2. Review the generated code in programs/ to understand Pumas syntax
  3. Use Workflows for structured analyses

Advanced:

  1. Configure Organization Rules for your team's thresholds and methodology
  2. Edit generated code directly for specialized needs
  3. Combine PumasAide sessions with manual Pumas coding

Next Steps