The AI Assistant
ChakataStat has a built-in assistant that can run analyses on your behalf when you describe what you want in plain language. It is not a separate chatbot bolted on — it drives the same engine the menus do, so anything it produces is a real ChakataStat result you could have run yourself.
Open the panel with View → AI Assistant (Ctrl+Shift+A); it docks on the
right of the workbench.
Connecting a model backend
The assistant needs a model to talk to. ChakataStat is provider-neutral and works with:
- Claude (Anthropic);
- any OpenAI-compatible endpoint — OpenAI itself, DeepSeek, Kimi (Moonshot AI), a local Ollama server, or other compatible providers and proxies.
You supply an API key through an environment variable before launching, and a local endpoint needs no key. The recognized variables are:
| Variable | Backend |
|---|---|
ANTHROPIC_API_KEY |
Claude (Anthropic) |
DEEPSEEK_API_KEY |
DeepSeek |
OPENAI_API_KEY |
OpenAI |
MOONSHOT_API_KEY |
Kimi (Moonshot) |
ChakataStat_OLLAMA=1 |
local Ollama (no key) |
These exact names are also listed under Settings → AI Assistant → Environment variables, each marked set or unset, so you can confirm you set the key under the name the app reads. The key is used in memory only — it is never written to disk or into your session.
Choosing among several backends
If you have more than one backend configured, you can pick and switch the active one live from Settings → AI Assistant, and your choice is remembered between launches (the choice — never the key). The Settings page also exposes optional overrides: the model id, temperature, maximum response tokens, a custom base URL and headers, the tool-round cap, a system-prompt override, and a read-only toggle.
Asking for an analysis
Type what you want in the panel's input box, for example:
- "Show me descriptive statistics for age, BMI and systolic BP."
- "Is fasting glucose different between diabetic and non-diabetic participants?"
- "Run a logistic regression predicting hypertension from age and BMI."
The assistant chooses the right procedure, runs it through the engine, and shows the actual result tables and charts inline in the conversation — the same output you would get from the menus. Per-reply token usage is shown beneath each answer.
Adding context about your data
The assistant sees your variable names, types and labels, so well-defined variables (see Working with Data) make it far more accurate. You can also add custom context in Settings — a note describing your study, your coding conventions, or what you are trying to find out — which is sent with each request so the assistant interprets your data correctly.
What it can and cannot do
- It can run any analysis, chart or transform exposed as a tool.
- Under a read-only profile it can run analyses but cannot change your data — a safe way to let it explore.
Reproducibility
The assistant's actions are commands like any other, so they appear in the Syntax console and can be reviewed, edited and replayed. The conversation itself persists with your session, so closing and reopening ChakataStat keeps the thread (you can start fresh with the panel's New conversation button).
Privacy
When you use a hosted backend, your prompts — including the data context you add and the result summaries — are sent to that provider. Use a local Ollama endpoint if the data must not leave your machine. No API key is ever stored by ChakataStat.