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.
-
Create an account
Sign up at app.heurastudios.com 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.
-
Start a notebook
Press New notebook. It opens on
script.mdin the middle, with Data, Tests, Output and Session in the sidebar. The model’s name comes from its script, so start there. -
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.
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 for what each kind of line does.
-
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 library and add 20 to 30 rows in your own schema.A run needs at least 5 examples and fixes to train.
-
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_atcreated_atWhich customer spent the most this year? sum,order by,limit 1What was revenue in March? shipped_atcreated_atTests that no example asks are held out. Those are the ones the release gate decides on.
-
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.
-
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.
-
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.
-
Ship it
Call it from your apps through the OpenAI-compatible API, put it on your website with one script tag, 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
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
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?"}]}'