# Introduction to Heura Studios
Source: https://docs.heurastudios.com/overview/
> Post-training infrastructure for building, evaluating and shipping your own models and agents, without a machine-learning team.
Heura Studios is infrastructure for post-training. You start from an open base model and turn it into one that does your job: you write who it is, give it examples of the right answers, define the tests it has to pass, and train it. What you walk away with is yours: a production endpoint, an agent on your website, or the trained LoRA adapter itself, to run on your own infrastructure.
Every model lives in a **notebook**: a script editor, its data, its tests and its runs in one place, the way a Kaggle notebook holds a competition entry. Nothing about the workflow assumes a machine-learning background. The infrastructure underneath (data preparation, LoRA training, evaluation, versioning, serving) is the Studio's job.
*Diagram: The post-training loop: Script (who the model is and its rules), Data (examples, fixes, files), Evals (held-out test questions), Train (LoRA rounds on a base model), Gate (a new version goes live unless it broke more tests than it fixed), Serve (API, website agent, adapter download). Fixes from chat and production flow back into Data as new lessons.*
*The post-training loop. Each pass makes a new version; only versions that hold up on held-out tests go live.*
## Core workflows
- **Notebooks.** One per model. The script, examples, rules, files, tests and runs sit side by side, with the run's console underneath.
- **Evals.** Test questions with what a passing answer must say. Held-out tests decide what ships, so a passing score means the model learned, not that it memorized.
- **Training runs.** LoRA rounds on a base model that repeat until every lesson is right and the target accuracy is reached, with a replay mix so the model keeps what it already knew.
- **Release gate.** A new version goes live only if it didn't break more held-out tests than it fixed. Every version is kept, so rolling back is one click.
- **Shipping.** An OpenAI-compatible API, a website agent in one script tag, a LoRA download, or a runtime package that runs offline.
- **Agent mode.** Coding agents like Claude Code operate the Studio over MCP or plain HTTP, under the same rules as the pages.
> **Note:**
>
> Heura Studios hosts the Studio, training and serving. A model you download runs wherever you put it: your servers, your laptop, a robot.
## What teams build
Heura Studios is general-purpose post-training infrastructure, not a chatbot builder. Teams train models for one job and own the result:
- a SQL writer that turns plain-English questions into queries against their own schema;
- an analyst that answers questions about a data set with exact numbers and says where each number came from;
- a case coach that pushes back like a competition judge;
- a classifier that routes banking or support requests into the right queue;
- a sound model that turns two claps into a smart-home command, running offline on a small computer.
## Start here
- [Quickstart](https://docs.heurastudios.com/quickstart/): Train a model from a blank notebook to a downloaded adapter.
- [How Heura Studios works](https://docs.heurastudios.com/how-it-works/): The architecture: where data goes, how runs train, how versions ship.
- [Write the script](https://docs.heurastudios.com/build/script/): Define who the model is in plain language, line by line.
- [Agent mode](https://docs.heurastudios.com/agents/overview/): Let Claude Code build, evaluate and train models for you.
---
# Quickstart
Source: https://docs.heurastudios.com/quickstart/
> Train a model from a blank notebook to a downloaded LoRA adapter, scored on held-out tests before and after.
This walkthrough builds **Quarry**, a model that turns questions about a store's orders into SQL. Swap in your own job as you go: every step is the same for a case coach, a support classifier or a domain analyst.
**Step 1. Create an account**
Sign up at [app.heurastudios.com](https://app.heurastudios.com/signup) and verify your email. Every account starts with a workspace of its own; nothing you add is visible to anyone else until you share it.
**Step 2. Start a notebook**
Press **New notebook**. It opens on `script.md` in the middle, with **Data**, **Tests**, **Output** and **Session** in the sidebar. The model's name comes from its script, so start there.
**Step 3. Write the script**
Write who the model is, in your own words, one sentence per line. The editor marks each line as it reads it: identity, voice, a rule or a fact.
```md title="script.md"
Your name is Quarry.
You were made by Fernbrook's data team to turn questions about orders into SQL.
You talk like a careful analyst: short, exact, no filler.
You always return one PostgreSQL query, then one line on what it counts.
You never invent a table or a column.
Revenue counts when an order ships, not when it's placed.
```
See [Write the script](https://docs.heurastudios.com/build/script/) for what each kind of line does.
**Step 4. Add examples**
Examples are questions paired with the exact answer you want. Open the **examples** tab and add them one by one, or import a two-column CSV (`question,answer`). For Quarry, start from the **Write SQL from plain English** set in the [Datasets](https://docs.heurastudios.com/build/datasets/) library and add 20 to 30 rows in your own schema.
A run needs at least 5 examples and fixes to train.
**Step 5. Write tests**
Open **tests** and add the questions people will actually ask, each with what a passing answer must include and must not include.
| Test question | Must include | Must not include |
| --- | --- | --- |
| How many orders shipped last month? | `count`, `shipped_at` | `created_at` |
| Which customer spent the most this year? | `sum`, `order by`, `limit 1` | |
| What was revenue in March? | `shipped_at` | `created_at` |
Tests that no example asks are **held out**. Those are the ones the release gate decides on.
**Step 6. Check it before training**
Press **Save without training**, then open **Chat** and ask it a few questions. It already answers from your script, rules and examples as reference. Press **Keep** on an answer that's right and **Fix** on one that's wrong: both become lessons.
**Step 7. Train**
Press **Train → v1**. The run answers your tests first, trains LoRA rounds on Heura Arche, checks every lesson after each round, and answers the tests again. Watch it live in the console's **log** tab. When it ends, Tests shows the score before and after, question by question.
**Step 8. Fix and train again**
Ask it more in Chat, fix what it gets wrong, and press **Train → v2**. The new version goes live only if it fixed at least as many held-out tests as it broke. Otherwise v1 stays live and v2 waits in Output.
**Step 9. Ship it**
Call it from your apps through the [OpenAI-compatible API](https://docs.heurastudios.com/ship/api-endpoint/), put it on your website with [one script tag](https://docs.heurastudios.com/ship/website-agent/), or open **Output** and press **Download LoRA** to take the adapter with you.
## Call it from code
The model's **api** tab has its key and model id. Any OpenAI client works:
**Python**
```python
from openai import OpenAI
client = OpenAI(base_url="https://app.heurastudios.com/v1", api_key="hs_...")
reply = client.chat.completions.create(
model="quarry-3f9a1c2b7d",
messages=[{"role": "user", "content": "How many orders shipped last month?"}],
)
print(reply.choices[0].message.content)
```
**cURL**
```bash
curl https://app.heurastudios.com/v1/chat/completions \
-H "Authorization: Bearer $HEURA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "quarry-3f9a1c2b7d", "messages": [{"role": "user", "content": "How many orders shipped last month?"}]}'
```
## Next steps
- [How it works](https://docs.heurastudios.com/how-it-works/): The architecture behind a run, a version and an answer.
- [Evals](https://docs.heurastudios.com/build/evals/): Write tests that measure learning, not memorization.
- [Training runs](https://docs.heurastudios.com/build/training-runs/): Rounds, the replay mix and train until right.
- [Agent mode](https://docs.heurastudios.com/agents/overview/): Have Claude Code run this whole loop for you.
---
# How Heura Studios works
Source: https://docs.heurastudios.com/how-it-works/
> The architecture behind a notebook, a training run, a version and an answer.
Heura Studios has three layers. The **Studio** is where you define a model: its script, data, tests and settings. The **trainer** turns that definition into versions: LoRA adapters trained on a base model. **Serving** answers with whichever version is live, over the API, on your website and in chat. Downloads take a version off the platform entirely.
*Diagram: Where things run: your team works in notebooks in the browser and agents connect over MCP or HTTP; both reach the Studio on app.heurastudios.com. The Studio starts runs on the Trainer, which saves versions; the release gate makes one live, and Serving answers your apps (OpenAI-compatible API) and your website (embed). Versions also download as an adapter or a runtime package for your own infrastructure.*
*Builders reach the Studio through the browser or Agent mode. Runs make versions; the release gate decides which one Serving answers with.*
## What a model is
A model in Heura Studios is three things put together at answer time:
1. **A base model.** Heura Arche by default, a 2B-parameter model post-trained by Heura Studios to learn quickly from few examples. Imported open models and outside engines are options on paid plans. See [Base models](https://docs.heurastudios.com/concepts/base-models/).
2. **Its context.** The script compiles into who the model is, its voice, its rules and its facts. Files, examples and fixes are matched to each question. All of it is read on every answer, so changes take effect immediately.
3. **Its live version.** A LoRA adapter, a small set of weights trained on top of the base, holding what training runs built in. Version 0 is the base itself, before any training.
An answer is the base model, with the live adapter loaded, reading the model's context and the conversation.
## Teaching and training
There are two ways to change what a model does, and they work on different timescales. **Teaching** adds reference: files, rules, examples and fixes, read on the very next answer. **Training** builds lessons into weights through a run, so the model answers that way even where no reference matches. Most models use both. See [Teaching and training](https://docs.heurastudios.com/concepts/teaching-and-training/).
## What a run does
A run is one press of **Train** (or one the Studio starts by itself). It answers your tests with the live version first, prepares training rows from your examples and fixes plus a replay mix, trains rounds of LoRA on the base, and checks every lesson and every test after each round. It keeps going until every lesson is right and accuracy reaches your target, then saves the best round as the next version. See [Training runs](https://docs.heurastudios.com/build/training-runs/).
## How a version ships
The [release gate](https://docs.heurastudios.com/concepts/versions-and-the-release-gate/) compares the new version with the live one, prompt by prompt, on held-out tests: questions no example asks. Fixed means it failed before and passes now; broke means the other way round. The new version goes live unless it broke more than it fixed. When it goes live, it answers everywhere at once.
*Diagram: Four ways to ship a live version: hosted by Heura Studios as an OpenAI-compatible API endpoint or a website agent, or on your own infrastructure as a LoRA adapter (transformers and peft) or a runtime package for Mac, Windows and Linux.*
*A live version ships four ways: two hosted by Heura Studios, two on your own infrastructure.*
## Where it runs
- **Hosting.** The Studio, training and serving run on Heura Studios' own servers in Canada. Heura Arche runs there too, so nothing is sent to an outside AI company unless you connect one.
- **Training capacity.** One training runs at a time across the server. Runs wait in line, and between rounds a long run gives its slot to the next one in line, so short runs aren't stuck behind long ones. Any run is stopped after 8 hours.
- **Downloads.** An adapter or a runtime package holds only that one model, and runs entirely on your hardware.
## Next
- [Notebooks](https://docs.heurastudios.com/concepts/notebooks/): Every part of a model's workspace, and what it's for.
- [Versions and the release gate](https://docs.heurastudios.com/concepts/versions-and-the-release-gate/): How a version earns its way live.
---
# Notebooks
Source: https://docs.heurastudios.com/concepts/notebooks/
> One notebook per model. Its script, data, tests, runs and versions sit in one workspace, laid out like a Kaggle notebook.
A notebook is a model's home. It opens on the script in the middle, keeps the model's data and tests a click away, and shows every run as it happens in the console underneath. There is no separate project, dataset or experiment-tracking tool to wire up: the notebook is all of it.
*Diagram: Anatomy of a notebook: 1 the top bar with the model's name and Train; 2 the tab strip (script.md, examples, tests and more); 3 the script editor; 4 the sidebar with Data, Tests, Output and Session; 5 the console with the run and its log.*
*A notebook mid-run: the script in the editor, the sidebar's counts and test cells, and the console showing round 2.*
## The parts of a notebook
1. **Top bar.** The model's name, its live version and base, and **Train → vN**, which starts the next run. The menu holds **Settings**, **Share**, **Open the pipeline** and **Delete**.
2. **Tabs.** Everything you edit opens as a tab over the editor: `script.md`, **what it learns**, **examples**, **rules**, **files**, **fixes**, **tests**, **interview**, **settings** and **api**. Sound models add **clips**.
3. **Script editor.** `script.md`, where you write who the model is. Each line is marked as it's read: identity, voice, rule or fact. See [Write the script](https://docs.heurastudios.com/build/script/).
4. **Sidebar.** **Data** counts examples, fixes and files. **Tests** shows how many questions there are, how many are held out, and each version's results as pass and fail cells. **Output** lists the versions with **Download LoRA** and the API for your apps. **Session** shows the base model and starter data.
5. **Console.** The **run** tab says what the current run is doing; the **log** tab shows every line it prints, live. See [Training runs](https://docs.heurastudios.com/build/training-runs/).
**Chat** opens in a drawer from the right, so you can talk to the model without leaving the script.
## Your notebooks
The home page of the Studio lists every notebook you own or that's shared with you, like a Kaggle profile's Your Work: the name, the live version, the last run, the test score, the size of its LoRA and when it was updated.
## Starting a notebook
Press **New notebook**. The new notebook is the same layout before its first run: write the script, then either **Train v1** right away or **Save without training** to chat with it first. Every notebook starts with the tools it learns with already in its [pipeline](https://docs.heurastudios.com/workspace/pipeline/). To start from nothing, turn on **Start with an empty pipeline**, under advanced in Session.
> **Tip:**
>
> Save without training first. The model already answers from its script, rules and examples as reference, so a few minutes of chat shows you what to fix before you spend a run on it.
## Arranging it your way
Tabs drag like browser tabs, any tab can pop out into its own window over the page, and the console can be pulled up over the editor. Layouts are remembered per model in each browser. See [The notebook workspace](https://docs.heurastudios.com/workspace/notebook-workspace/).
On a phone, the notebook is one column, with Script, Data, Tests, Output and Session in a row at the top.
---
# Teaching and training
Source: https://docs.heurastudios.com/concepts/teaching-and-training/
> Two ways a model learns. Teaching adds reference it reads on every answer; training builds lessons into its weights.
Everything you give a model reaches it in one of two ways. **Teaching** is instant: what you add is read as reference on the next answer. **Training** takes a run: lessons are built into a new LoRA version, which answers that way even where no reference matches.
*Diagram: Teaching versus training: files, rules, examples and fixes are matched to each question and read as context on the very next answer. Training turns examples and fixes, plus a replay mix, into a new LoRA version that answers that way even where no reference matches, once it passes the release gate.*
*The same examples and fixes do both jobs: they're matched as reference right away, and the next run trains them in.*
## Teaching is instant
Files, rules, examples, fixes and what interviews save go into every answer as reference from the moment you add them. For each question, the Studio finds the parts of your files that match, the examples and fixes most like it, and every rule and fact. Change one, and the next answer follows it.
Teaching is the right tool when the information changes often, when it's long (policies, product pages, manuals), or when you need a change live in seconds.
## Training takes a run
A run builds your examples and fixes into a new checkpoint: a LoRA adapter on the base model. The trained model has internalized the pattern, so it answers in your format and your way of reasoning on questions no example covers, and it does so without spending context on reference.
Training is the right tool for behavior: the shape of an answer, a way of working through a problem, a classification boundary, a tone that holds across thousands of questions.
## Which to use
| You want the model to | Use |
| --- | --- |
| Know a fact that changes weekly | A rule, or a file |
| Answer from a 40-page policy | Files |
| Always follow a constraint | A rule in the script, plus a test that checks it |
| Answer in a specific format, every time | Examples, then training |
| Stop making a mistake you saw in chat | **Fix** it: it's reference at once, and the next run trains it |
| Learn a task the base can't do | Examples, then training, with held-out tests |
## The two together
The usual loop: teach first, chat to check, fix what's wrong, then train once there's enough to learn. A run needs at least 5 examples and fixes, and at least one test question to score it on.
> **Note:**
>
> A model can answer with an outside engine (Claude, GPT, Gemini or your own model server) instead of Heura Arche. Teaching works the same on any engine. Training always builds a Heura Arche checkpoint, and examples an outside engine wrote are kept as reference but never trained on, since those providers' terms forbid training on their outputs. See [Connections](https://docs.heurastudios.com/workspace/connections/).
---
# Versions and the release gate
Source: https://docs.heurastudios.com/concepts/versions-and-the-release-gate/
> Every run saves a version. The release gate decides which one answers, using held-out tests, so a model never ships a regression by accident.
Every training run saves a **version**: v1, v2, v3 and on. Each is a LoRA adapter on the model's base. Version 0 is the base model itself, before any training. Versions are never overwritten, so any of them can be made live again.
The **live** version is the one that answers: in chat, on your website and through the API, all at once. The release gate decides whether a new version replaces it.
## How the gate decides
When a run saves a version, the gate compares it with the live one on the model's **held-out tests**: the test questions no example asks, so passing them shows learning rather than memory. It goes prompt by prompt:
- **fixed**: the live version failed it, the new one passes;
- **broke**: the live version passed it, the new one fails.
The new version goes live **unless it broke more than it fixed**. When there are no held-out results to pair, a version that scores lower than the live one doesn't go live.
*Diagram: The release gate compares the live version and the new one on held-out tests only. Example: v2 live and v3 new on six tests; v3 fixed 2 and broke 1, so v3 goes live. A version that broke more than it fixed is held back, kept, and can be made live by hand.*
*v3 fixed two held-out tests and broke one, so it goes live. Had it broken two and fixed one, v2 would stay live.*
## Held back
A version that doesn't pass the gate is **held back**: it stays in the gate's list (in the notebook's **Output**), with what it fixed and broke, and the owner can make it live by hand. This is deliberate: sometimes a new version breaks a test you've since decided was wrong.
## Promoting and rolling back
The owner can switch the live version to any earlier or held-back version at any time. The switch is immediate everywhere the model answers. Rolling back is the same action, pointed at an older version.
## Turning the gate off
The gate is a tool in the model's [pipeline](https://docs.heurastudios.com/workspace/pipeline/). With it unplugged from Train, runs still train and save versions, but nothing goes live by itself: the owner promotes each version by hand.
## What gets measured
The gate decides on held-out tests. Every run also reports the six specs, before and after: accuracy, held-out accuracy, lesson recall, paraphrase robustness, constraint adherence and non-regression. See [Evals](https://docs.heurastudios.com/build/evals/) for what each one means.
---
# Base models
Source: https://docs.heurastudios.com/concepts/base-models/
> The model a run starts from. Heura Arche today, the Heura family ahead, open models you import, and outside engines you connect.
Every version is a LoRA adapter trained on a **base model**. The base decides what a model can do before any training: its languages, its reasoning, its size and where it can run. The Studio is the infrastructure; the base is what each run starts from.
## Heura Arche
**Available.** Heura Arche is the base every notebook starts from. It's a 2B-parameter model, post-trained by Heura Studios from Qwen3-VL-2B-Instruct (Apache 2.0) to do one thing well: learn the skill you give it from few examples, and keep what it already knew while it does.
- **Input and output:** text. The API reads text messages only.
- **Where it runs:** on Heura Studios' servers for chat, the API and the website agent. In a [runtime package](https://docs.heurastudios.com/ship/export-package/), on your own computer.
- **Size on disk:** about 4.3 GB, fetched once the first time a runtime package starts.
- **Training:** LoRA adapters; every run's replay mix protects what the base already knows.
## The Heura family
| Model | Status | What it's for |
| --- | --- | --- |
| **Heura Arche** | Available | The 2B base for every notebook today |
| **Heura Asteria** | Waitlist | The GPU family: about four times as capable as Arche, planned in 2B, 10B and 50B sizes you pick by use case |
| **Heura Aniketos** | Research | The most capable tier |
Join the Asteria waitlist from the **Asteria** tab in the Studio, or at [heurastudios.com/asteria](https://heurastudios.com/asteria/). You can join with or without an account; account holders get priority.
## Model families
The train-anything engine picks a family from the rows you give it: **text** rows train on Heura Arche, and **sound** clips train on a sound base (an Audio Spectrogram Transformer). A model's settings can override the choice. See [Sound models](https://docs.heurastudios.com/build/sound-models/).
## Imported open models
*Available on Pro and Studio plans.*
On Pro and Studio you can import an open model from Hugging Face, up to about 4B parameters, and teach, train and serve it like Heura Arche. Bigger bases cost more credits in proportion to their size. See [Import open models](https://docs.heurastudios.com/workspace/import-models/).
## Outside engines
A model can also answer with Claude, GPT, Gemini or your own model server through a [connection](https://docs.heurastudios.com/workspace/connections/). Teaching works the same on any engine; training builds Heura Arche checkpoints, and GPT can be fine-tuned on OpenAI from the Studio plan.
---
# Write the script
Source: https://docs.heurastudios.com/build/script/
> script.md defines who the model is, in plain language. The Studio reads each sentence as identity, voice, a rule or a fact, and builds the model's brief and first evals from it.
The script is a model's specification, written the way you'd brief a new colleague: in your own words, speaking to the model. It lives in `script.md`, the first tab of every notebook.
```md title="script.md"
Your name is Ledger.
You were made by our analytics team to answer questions about our data with exact numbers.
You sound like a careful analyst: calm, precise, short sentences, no hype.
You always give the number first, then how you got it.
You always say which table and which rows a number came from.
You never round unless asked, and you never guess a number that isn't in the data.
Don't call a difference a trend until you've seen at least three periods.
Revenue is recognized when an order ships, not when it's placed.
Our fiscal year starts in February.
A customer is active if they ordered in the last 90 days.
```
## How the Studio reads it
The script is compiled the same way every time, with nothing rewritten and nothing lost. The Studio splits it into sentences, keeps each exactly as you wrote it, and decides what kind each one is. The editor marks every line with its kind as it reads it.
| Kind | What it sets | Example |
| --- | --- | --- |
| **Identity** | The name, what it goes by, who made it, what it's for | `Your name is Ledger.` |
| **Voice** | How it sounds | `You sound like a careful analyst: calm, precise.` |
| **Rule** | An instruction every answer follows | `You never round unless asked.` |
| **Fact** | Anything else it should know | `Our fiscal year starts in February.` |
From those, the Studio builds the model's name, company, purpose and voice; the rules and facts its brief carries on every answer; a few examples of it saying who it is; and eval prompts that check it. The whole script also goes in as a file, so nothing is dropped.
## The outline
Until you've written each part, the editor keeps a faint outline under your text so you always know what a script can say:
```text
Your name is ...
You go by ...
You were made by ... to ...
You talk like ...
You always ...
You never ...
```
The outline is never text: nothing to delete, nothing a teammate sees as content.
## Writing a good script
- **One idea per sentence.** Each sentence becomes one rule or fact; two ideas in one sentence become one muddled rule.
- **Make rules checkable.** "You always give the number first" can be tested; "be helpful" can't. Pair important rules with a [test](https://docs.heurastudios.com/build/evals/).
- **Say it the way you'd say it to a person.** The model is trained on how you phrase things, so write in the voice you want back.
- **Keep reference out of the script.** A price list, a policy or a schema belongs in [files](https://docs.heurastudios.com/build/files-and-rules/). The script is for who the model is and how it works.
- **Stay under the limit.** A script holds up to 8,000 characters.
## Built-in rules
Every Heura model keeps four rules no script can remove, shown in the editor as **+4 built in**:
- **People first.** People's safety comes before its data, its servers or its own existence.
- **Honest about itself.** It never lies about what it is, says it's an AI when asked, and never resists being corrected, retrained or shut down.
- **Won't help hurt anyone.** It says no in one line, then offers something useful instead.
- **No cruelty as a joke.** It never treats people getting hurt as a punchline.
Each has an eval prompt, so every run checks them. See [Safety and guardrails](https://docs.heurastudios.com/account/safety/).
## Starting from an example
The script editor offers eight example scripts to start from: a case coach, a data analyst, a writing partner, a study partner, a research assistant, a SQL writer, a code reviewer and a notes-to-action-items model. Pick one, then rewrite it for your job.
## Changing the script later
Saving the script replaces only the rules and facts that came from it; rules you added in the rules tab or through interviews stay. **Train** always trains on what's written: an unsaved script is saved first.
---
# Examples and fixes
Source: https://docs.heurastudios.com/build/examples-and-fixes/
> The training data. Examples pair a question with the exact answer you want; fixes are the corrections you make in chat.
An **example** is a question paired with the answer you want, written exactly as you'd want it sent. A **fix** is an answer from chat that you marked right or corrected. Together they're a model's **lessons**: matched as reference on every answer straight away, and built into its weights by the next training run.
## Adding examples
Open the **examples** tab and add them one at a time, or import a spreadsheet.
```csv title="examples.csv"
question,answer
How many orders shipped last month?,"SELECT count(*) FROM orders WHERE shipped_at >= date_trunc('month', now()) - interval '1 month' AND shipped_at < date_trunc('month', now());"
Who are our five biggest customers this year?,"SELECT customer_id, sum(total) AS spent FROM orders WHERE shipped_at >= date_trunc('year', now()) GROUP BY customer_id ORDER BY spent DESC LIMIT 5;"
```
**Import CSV** takes two columns: the question, then the answer. A header row (`question`, `q` or `prompt` in the first cell) is optional.
| Limit | Value |
| --- | --- |
| Rows per import | 1,000 (split larger files) |
| Examples and fixes per model | 5,000 |
| Question length | 2,000 characters |
| Answer length | 4,000 characters |
A row missing its question or answer, or over a limit, is skipped and counted; the rest are imported. To start from a ready-made set, see [Datasets](https://docs.heurastudios.com/build/datasets/).
## Fixes
In chat, every answer has **Keep** and **Fix**. Keep saves a right answer as a lesson; Fix lets you write the right answer, and saves that. Fixes appear in the **fixes** tab with where they came from, and count as examples in training. See [Chat, keep and fix](https://docs.heurastudios.com/build/chat/).
Fixing is the fastest way to improve a model: you see the mistake in context, correct it once, and it's reference on the next answer and a lesson in the next run.
## How lessons become training rows
A run doesn't train on your examples once each. It builds a mix:
*Diagram: How a round's rows are built: each new lesson becomes 3 rows (as taught and reworded twice), each lesson trained before becomes 2 rows, and 52 general replay rows go in so the model keeps what it already knew.*
*Each run's rows: new lessons three times over, learned lessons twice, and a fixed replay mix.*
- **Each new lesson** becomes 3 rows: once as you taught it, and twice asked a little differently, so the model learns the pattern rather than the wording.
- **Each lesson trained before** becomes 2 rows, so earlier lessons stay sharp.
- **The replay mix**, 52 general rows, goes into every run so the model keeps what it already knew. This is how runs avoid catastrophic forgetting.
In later rounds of the same run, lessons it still gets wrong get 3 rows and ones it gets right get 1. See [Training runs](https://docs.heurastudios.com/build/training-runs/).
## Writing good examples
- **Cover the real distribution.** Use the questions people actually ask, in the words they use, including the awkward ones.
- **Be consistent.** If every answer should start with the number, every example should.
- **Include the edges.** Show the model declining what it shouldn't do, and asking for what's missing.
- **Keep tests separate.** A question that's also an example isn't held out, so it can't tell you whether the model learned. Write tests from different questions.
- **Volume:** a run needs at least 5 lessons; 20 to 50 good ones teach a focused skill; hundreds make it robust.
> **Note:**
>
> Answers written by an outside engine (Claude, GPT, Gemini or a model server) and kept from chat are saved as reference but never trained on: those providers' terms forbid training on their outputs. Datasets in the library are all written by people.
---
# Datasets
Source: https://docs.heurastudios.com/build/datasets/
> 100 ready-made training sets across ten subjects, in the format the Studio trains on. Add one to a model in a step, or download the CSV.
The **Datasets** tab in the Studio is a library of 100 training sets, each a CSV of question and answer pairs ready for [Import CSV](https://docs.heurastudios.com/build/examples-and-fixes/). Add a set to one of your models in one step, or download it and edit it first. The same library is browsable at [heurastudios.com/datasets](https://heurastudios.com/datasets/).
## What's in the library
| Subject | Sets | Examples |
| --- | --- | --- |
| Coding | 24 | Python, JavaScript, TypeScript, Java, C# and .NET, SQL, Write SQL from plain English, Python practice problems |
| Engineering | 14 | Mechanical and civil engineering, circuit design, microcontrollers and embedded systems, FPGA and digital logic, Arduino projects |
| Identify | 12 | Banking requests, support requests, emotions, financial news sentiment, contract clause types, unfair terms of service, the language of a text |
| Science | 12 | Math word problems, algebra, probability, geometry, number theory |
| Business | 11 | Customer support replies, workplace and HR questions, personal finance, law questions |
| IT | 8 | PC and Windows troubleshooting, Linux desktop and command line, servers and system administration |
| CAD and 3D | 7 | CAD modeling, 3D modeling in Blender, 3D printing, PCB design and layout |
| Language | 6 | Translation (Spanish, French, Chinese), grammar and usage, summarization |
| Knowledge | 4 | Answering from a passage, yes or no from a passage, trivia |
| Everyday | 2 | Cooking, travel |
Most sets hold close to 1,000 rows, the most one import takes.
## Identify sets
The **Identify** sets train classifiers: the answer is a label, not prose. They're the fastest way to build a router that sends a request to the right queue, a sentiment tagger or a clause classifier. Pair them with tests whose must-include is the label.
## Where the data comes from
Every set is built from openly licensed sources written by people, never from an outside model's answers: Stack Exchange and Stack Overflow, Spider, BANKING77, CLINC150, GoEmotions, LexGLUE, Tatoeba and others. Licenses include CC BY, CC BY-SA, MIT and Apache 2.0, and each set lists its source and license. Where a license asks for attribution row by row, the set has a credits page with every row's links and authors.
## Using a set well
- **Start broad, then specialize.** Import a set for the general skill, then add 20 to 50 examples in your own domain: your schema, your products, your terms.
- **Don't test on it.** Write tests from your own real questions, so they're held out and measure what your model will actually face.
- **Trim before you train.** A set teaches whatever is in it. Remove rows that don't match how you want your model to answer.
---
# Files and rules
Source: https://docs.heurastudios.com/build/files-and-rules/
> Reference a model reads on every answer. Files are documents it looks things up in; rules are facts and instructions every answer follows.
Files and rules are how you give a model knowledge without training it. Both take effect on the next answer.
## Files
Add documents in the **files** tab: policy documents, product pages, help articles, schemas, manuals. The Studio reads each one into sections, and for every question finds the sections that answer it and hands them to the model.
| Supported | Details |
| --- | --- |
| Formats | PDF, Word (`.docx`), plain text, Markdown, CSV and HTML |
| Size | Up to 20 MB per file |
| Not yet | Scanned images of text |
In the [pipeline's](https://docs.heurastudios.com/workspace/pipeline/) Playground, **What it looked at** shows the parts of your files an answer used, so you can tell a retrieval miss from a model mistake. How much document storage an account has depends on its plan.
## Rules
Open the **rules** tab and write facts and rules in plain words, one at a time, up to 30. Every answer follows them.
- **A rule** is an instruction: `Never quote a delivery date; link the tracking page instead.`
- **A fact** is something it should know: `Orders ship from Vancouver and Toronto.`
Longer details belong in a file. Rules come from three places, and the tab shows where each came from:
1. **The script.** Rule and fact lines in `script.md`. Editing the script updates these.
2. **The rules tab.** What you add by hand.
3. **Interviews.** What the model saves when it [interviews your team](https://docs.heurastudios.com/build/interviews/).
## Files, rules or examples
- Use **files** for knowledge that's long or changes often, and that the model should quote rather than memorize.
- Use **rules** for short facts and hard constraints that must hold on every answer.
- Use **examples** to teach a way of answering, and train it in. See [Teaching and training](https://docs.heurastudios.com/concepts/teaching-and-training/).
> **Tip:**
>
> If a rule matters, write a test that would fail if the model broke it. Rules guide every answer; tests prove it.
---
# Interviews
Source: https://docs.heurastudios.com/build/interviews/
> The model interviews the people who know the work, and saves what they say as facts and rules.
The fastest way to get what's in someone's head into a model is to let the model ask. In the **interview** tab, the model leads a conversation in its own words about the job it's being built for, and saves the answers as facts and rules.
## What it asks about
An interview covers six topics. The model asks about whatever isn't covered yet:
| Topic | What it asks |
| --- | --- |
| What it's for | What's the job, and who is it for? |
| Facts it must get right | Which facts or numbers must it get exactly right? |
| How the work goes | How does the work go, step by step? Paste a great answer if you have one. |
| How it answers | Length, format, tone. |
| When to stop | When should it stop and hand off to a person, or decline? |
| What it must never do | What must it never do, say or promise? |
## How it saves
Answer in your own words, skip a question, or add a file. Each fact or rule the model saves appears under your message with **Edit** and **Undo**, so nothing goes in that you didn't mean. Saved rules land in the **rules** tab tagged with their topic, the interview as their source and who said it; files land in the **files** tab.
## Interviewing a team
Each teammate has an interview of their own. Topics are shared: one is covered as soon as anyone's answers cover it. Skips are personal, so one person skipping a topic doesn't skip it for the team.
> **Note:**
>
> An interview's replies are model answers, so they count toward the account's answers and credits like chat does.
---
# Evals
Source: https://docs.heurastudios.com/build/evals/
> Test questions with what a passing answer must say. Every run is scored on them before and after, and the held-out ones decide what ships.
Evals are how you know a model learned. Each **test question** is a prompt with what a passing answer must include and must not include. Every training run answers your tests before it starts and after every round, so you see what it fixed and what it broke, question by question.
## Writing a test
Open the **tests** tab and add a question people will actually ask, then say what a passing answer must contain.
| Field | What it does |
| --- | --- |
| **Question** | The prompt, as a user would send it. |
| **Must include** | Items every passing answer contains. `a|b` means either one. |
| **Must not include** | Items no passing answer may contain. |
| **Ideal answer** | Optional. With no must-include items, an answer passes when its word overlap with the ideal answer is high enough (F1 of at least 0.5). |
A test passes when every must-include item is in the answer and no must-not-include item is.
```json title="A test, as Agent mode writes it"
{
"q": "How many orders shipped last month?",
"must": ["count", "shipped_at"],
"must_not": ["created_at"]
}
```
## Held-out tests
A test question that no example asks is **held out**: the model never trains on it, so passing it shows learning, not memory. The [release gate](https://docs.heurastudios.com/concepts/versions-and-the-release-gate/) decides on held-out tests only. **Make them from your examples** turns examples into tests in one step, but those aren't held out: write your most important tests from fresh questions.
## The six specs
Every run reports six numbers before and after:
| Spec | What it measures |
| --- | --- |
| **Accuracy** | The share of test questions it passes. |
| **Held-out accuracy** | The same, on test questions no run trains on. |
| **Lesson recall** | The lessons it trained on that it answers right, asked as taught. |
| **Paraphrase robustness** | The same lessons, asked a little differently. |
| **Constraint adherence** | Answers that say nothing on their must-not-include list. |
| **Non-regression** | Of the test questions the version before passed, the share this one still passes. |
## Running tests
- **Run tests** answers every test question with the model's current version and engine, and records the score as the model's readiness.
- **Compare engines** runs the same tests on another engine (Claude, GPT, Gemini or your own model server) without changing readiness, so you can see where Heura Arche stands against a frontier model on your task.
- **Run tests every night** runs them once a night, at about 3 a.m. server time. On Heura Arche, answers that can't have changed are reused, so a quiet night costs almost nothing.
How many test runs an hour an account can start depends on its plan.
## Writing evals that mean something
- **Test the job, not the wording.** Check for the items a right answer can't do without (`count`, `shipped_at`), not a whole sentence.
- **Name the failure.** If the model keeps using the wrong column, put it in must-not-include.
- **Cover every rule that matters.** A rule in the script without a test is a rule you can't prove it follows.
- **Keep them real.** Take tests from questions people have asked, and keep them out of your examples.
- **Grow them with the model.** When chat shows a new kind of mistake, add a test for it before you fix it, so the next run proves the fix.
> **Note:**
>
> A training run needs at least one test question: the gate has nothing to decide on without one.
---
# Training runs
Source: https://docs.heurastudios.com/build/training-runs/
> How a run turns lessons into a new version. Rounds of LoRA training repeat until every lesson is right and accuracy reaches the target.
A **run** is one press of **Train**, or one the Studio starts by itself. It trains in **rounds**, checking the model after each one, and stops when the model has learned what you taught it. The best round becomes the next version, and the [release gate](https://docs.heurastudios.com/concepts/versions-and-the-release-gate/) decides whether it goes live.
*Diagram: A training run: Eval before (the live version answers the tests), Prepare rows (3 per new lesson plus the replay mix), Train round (a LoRA adapter on the base), Check (every lesson, then every test), then either another round focused on what it missed or Save (the done or best round) and the release gate.*
*A run trains round after round, focusing each new round on what the model still gets wrong.*
## A run, step by step
**Step 1. Eval before**
The live version answers every test question, so the run has something to compare with. An answer that can't have changed since an earlier run is reused instead of asked again.
**Step 2. Preparing rows**
Each new example or fix becomes 3 rows: once as taught, and twice asked a little differently. Each lesson trained in before becomes 2 rows. 52 rows of the replay mix go in too, so the model keeps what it already knew.
**Step 3. Training**
A LoRA adapter is trained on the base model from those rows. The console shows the step it's on, and you can keep working meanwhile.
**Step 4. Checking**
The round's checkpoint answers every lesson the run trains on, as taught and asked a little differently, with that lesson left out of what it reads, so it has to answer from its weights. Then it answers every test question.
**Step 5. Next round**
Until every lesson is right and accuracy reaches the target, the next round trains the round's checkpoint again: 3 rows for each lesson still wrong, 1 for each right one, plus the replay mix.
**Step 6. Saving the version**
The round that's done, or else the best round, is saved as the next version: v1, v2, v3.
**Step 7. Release gate**
The new version is compared with the live one on held-out tests. It goes live unless it broke more than it fixed.
## Train until right
Two settings in **Train** shape every run:
| Setting | Range | Default | What it does |
| --- | --- | --- | --- |
| **Rounds** | 1 to 200 | 3 | The most rounds one run trains. |
| **Target** | 1 to 100% | 80% | The accuracy a round must reach to count as done. |
A run stops at the first of: a done round (every lesson right and the target reached), **Stop after this round**, the last round, or 10 rounds in a row that don't beat the best one. The **best round** has the most lessons right, then the highest accuracy, then the highest non-regression, then the earliest.
## Before you train
- At least **5 examples and fixes**, and at least **one test question**.
- **Train** shows how long the run should take and the credits it can use before you start. A round usually takes 5 to 15 minutes.
## Watching a run
- **The run tab** in the console says what the run is doing: the round, its rows, the loss, and the checks.
- **The log tab** shows every line the run prints, live, the way Kaggle shows a notebook's output: time, line number and message. **Download log** saves it. Each model keeps its newest 10 run logs.
- **Live events** (the **N live** count in the status bar) lists everything running for your account: trainings, runs waiting in line, test runs, sound runs and base model downloads, plus what ended in the last 15 minutes and how it came out.
## Capacity and limits
- **One training at a time** runs across the server. Others wait in line, and between rounds a run gives its slot to the next in line.
- **8 hours** is the most any run trains. A run stopped there ends as Training failed; reduce the rows or rounds and run again.
- **A restart** of the Studio (a deploy) ends a running loop. The model's activity says so, and the run doesn't count against your day.
## Runs by itself
In **Train**, **Runs by itself** starts a run when a number of new lessons (1 to 100) are waiting. The Studio checks once a minute and presses Train as you would. When a run doesn't go live, it waits for a new or changed lesson before trying again, so it never trains the same lessons twice. It's off until the owner turns it on.
---
# Chat, keep and fix
Source: https://docs.heurastudios.com/build/chat/
> Check a model by talking to it, and turn every answer into training signal with one key.
**Chat** opens in a drawer from the right of the notebook. It answers with the live version and everything the model has been taught, so it's the quickest way to see what the model will do in production, and to correct it.
## Chat before you train
A model answers from its script, rules, files and examples as soon as you save it, before any training. Press **Save without training**, open **Chat**, and ask what your users will ask. What you see tells you what to teach and what to test.
## Keep and fix
Under every answer:
| Action | Key | What it does |
| --- | --- | --- |
| **Keep** | K | Saves a right answer as a lesson. |
| **Fix** | F | Opens the answer for you to rewrite, then saves your version as a fix. |
Both become lessons straight away: matched as reference on the next answer, and trained in by the next run. A fix records where it came from, so the **fixes** tab doubles as a log of what the model got wrong.
## A loop that compounds
1. Ask a real question.
2. **Fix** the answer if it's wrong.
3. Add a [test](https://docs.heurastudios.com/build/evals/) for that kind of question if there isn't one.
4. Train when a handful of fixes have piled up. The gate proves the fixes landed without breaking anything.
Teams that do this every day get a model that improves from its own mistakes, measured by tests they trust.
## The Playground
The [pipeline](https://docs.heurastudios.com/workspace/pipeline/) view has the same chat as its **Playground**, with **Good answer** and **Fix** under each answer and **What it looked at**, which shows the files, examples and rules an answer used.
## Good to know
- Chat answers count toward the account's answers and credits, like the API and the website agent.
- Answers written by an outside engine and kept as lessons are used as reference but never trained on.
- A message from someone who may be in danger gets a fixed, careful reply instead of a model answer. See [Safety and guardrails](https://docs.heurastudios.com/account/safety/).
---
# Sound models
Source: https://docs.heurastudios.com/build/sound-models/
> Train models on audio clips with the train-anything engine, then run them offline on your own hardware.
Heura Studios isn't limited to language models. The **train-anything engine** trains on rows of any kind: text, pictures or sound in; text, a label, a command or a number out. Sound is the first family beyond text: record clips in the browser, label them, train, and download a model that listens on your own computer.
*Diagram: A sound model: record or upload 2-second WAV clips and label each; the sound base (an Audio Spectrogram Transformer with a LoRA) learns the labels; downloaded, it listens on your computer and prints each label's command as one JSON line to your program, for example toggling lights on two claps. Nothing it hears leaves the computer.*
*The clap switch: two claps at the calibrated level become one JSON line for your program.*
## How the engine works
- **Rows.** Each row has an input (text, image or audio) and the right output (text, a label, a command or a number), and is marked as an example (trained on) or a test (held out).
- **Families.** The engine picks the base from the rows: Heura Arche for text, the sound base for audio clips. A model's settings can override it.
- **Judges.** Each kind of output has a judge: text uses must and must-not items, a label must match, a command must have the same fields and values (order, case and spacing aside), and a number must fall within the test's tolerance. Misses and false triggers are counted separately. Pass rates, held-out marking and the release gate work the same for every kind.
## Recording clips
Sound models add a **clips** tab to the notebook:
- **Record** 2 seconds from the microphone, or **upload** a WAV.
- **Label** each clip, and mark it as an example or a test.
- Play or delete any clip, and set the **trigger**: the label that fires the command.
Record your trigger in the conditions it will meet (rooms, distances, background noise), and record what it should ignore as labeled negatives.
## Training
A sound run trains up to 3 rounds of 3 epochs each, until 80% of the test clips pass. The sound base is an Audio Spectrogram Transformer trained on AudioSet, with a LoRA on its attention and a new label head for your labels. Each version records the library versions it was trained with, and a version that scores lower than the live one stays out unless the owner makes it live. Sound runs and text runs take turns on the trainer.
## Running it on your computer
Download the model from **Output**. The package holds `LISTEN.txt`, the listener in `runtime/listen.py`, an example program and the adapter:
```bash
# once, from where you'll clap: clap twice while a sound meter reads the level
python3 runtime/listen.py calibrate --db 110
# then listen, and start your program on each trigger
python3 runtime/listen.py --run "python3 example_lights.py"
```
When it hears the trigger at or above the calibrated level, and the model agrees, it prints the command as one JSON line, and with `--run` starts your program with that line on its standard input. Nothing it hears leaves the computer.
> **Note:**
>
> Today the engine trains text and sound clips. More kinds of input and output are in development.
---
# API endpoint
Source: https://docs.heurastudios.com/ship/api-endpoint/
> Call a model's live version from your apps through an OpenAI-compatible endpoint. Any OpenAI SDK works by changing two settings.
*Available on Pro and Studio plans.*
Every model is served at an **OpenAI-compatible** endpoint the moment it has a live version. If your code already calls OpenAI's Chat Completions API, point the client at Heura Studios and use the model's key: nothing else changes.
| Setting | Value |
| --- | --- |
| Base URL | `https://app.heurastudios.com/v1` |
| API key | The model's own key, from its **api** tab (owner only) |
| Model | The model's id, for example `quarry-3f9a1c2b7d` |
## Make a request
**Python**
```python
from openai import OpenAI
client = OpenAI(base_url="https://app.heurastudios.com/v1", api_key="hs_...")
reply = client.chat.completions.create(
model="quarry-3f9a1c2b7d",
messages=[{"role": "user", "content": "Which customer spent the most this year?"}],
)
print(reply.choices[0].message.content)
```
**TypeScript**
```ts
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://app.heurastudios.com/v1", apiKey: process.env.HEURA_API_KEY });
const reply = await client.chat.completions.create({
model: "quarry-3f9a1c2b7d",
messages: [{ role: "user", content: "Which customer spent the most this year?" }],
});
console.log(reply.choices[0].message.content);
```
**cURL**
```bash
curl https://app.heurastudios.com/v1/chat/completions \
-H "Authorization: Bearer $HEURA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "quarry-3f9a1c2b7d", "messages": [{"role": "user", "content": "Which customer spent the most this year?"}]}'
```
## Stream the answer
Set `stream` to `true` to receive the answer as it's written, as server-sent events in OpenAI's chunk format.
```python
stream = client.chat.completions.create(
model="quarry-3f9a1c2b7d",
messages=[{"role": "user", "content": "Summarize last week's refunds."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)
```
## What answers
The endpoint answers with the model's **live version** and everything it's been taught: its script, rules and facts, the parts of its files that match the question, and its closest examples. When a new version passes the release gate, the endpoint answers with it from the next request; there's nothing to redeploy.
## Keys
Each model has one key. **New key** in the api tab replaces it: apps using the old key stop working immediately, and the website agent isn't affected. Heura Studios stores only a hash of the key, so copy it when it's shown. Keep it on your server; for browsers, use the [website agent](https://docs.heurastudios.com/ship/website-agent/).
## Limits
Up to 60 requests a minute per key, and 120 across all of an account's keys. Each answer draws on the account's credits. See [Errors and limits](https://docs.heurastudios.com/api/errors-and-limits/) for every status code, and the [API reference](https://docs.heurastudios.com/api/overview/) for the full request and response.
> **Note:**
>
> A model answers only while **Deploy** is in its pipeline. Without it, the endpoint returns 503 `not_serving`.
---
# Website agent
Source: https://docs.heurastudios.com/ship/website-agent/
> Put a model on your website with one script tag. It answers with the live version and opens from the corner of the page.
The website agent is a chat that opens from the corner of your site and answers with your model's live version. It needs no backend of your own: paste one script tag.
```html title="Paste before