All posts

Neural Net Training: How Tarsk Learns Your Workflow

Neural Net Training: How Tarsk Learns Your Workflow cover image

Every coding session teaches Tarsk something about your project. The files you touch, the tools you call, the skills you activate. After five committed sessions, Tarsk starts training a small neural network on that data. The model learns which skills, tools, and files belong with which kinds of tasks. On your next session, it uses those predictions to skip work that would waste your tokens.

How Training Works

When you start a chat, Tarsk records your prompt and which skills activate. It extracts keywords from your message and stores them alongside the activated skills. That record sits as a pending sample, tagged to your current thread.

When you commit your work, Tarsk labels those pending samples with what actually happened: which tools you called and which files ended up in the commit. It then retrains two neural networks on the most recent 200 committed samples from that project.

The first network learns the relationship between your prompt keywords and the skills/tools you used. The second learns the relationship between your prompt keywords and the files you touched.

Both networks are small feedforward models with a single hidden layer of 16 neurons. They train for up to 2,000 iterations, targeting an error threshold of 0.01. The training runs locally on your machine. Nothing leaves your device.

What the Networks Predict

Once Tarsk has trained on at least five committed sessions, the models start making predictions at the start of each new chat. Three kinds of predictions run in parallel:

Skill pruning. Your system prompt includes auto-discovered skills that describe how to handle certain tasks. Each skill adds its description, usage instructions, and activation criteria to the prompt. The neural network scores each skill against your current prompt. Skills that score below 0.12 relevance get removed from the prompt before the model sees it. The model still receives the skills that matter to your task, just without the ones that do not.

Tool promotion. Tarsk loads some tools on demand. When you start a session, certain tools sit in a deferred state. The model would normally need a dedicated search turn to activate them. The neural network predicts which deferred tools your task will need and promotes them to eager loading. You skip the search round trip.

File prefetch. The neural network predicts which files your task will touch. For files that score above 0.65 relevance, Tarsk reads up to 24KB of content and injects it into the prompt before the conversation starts. The agent begins with those files in context instead of spending turns on exploratory reads and greps. Tarsk prefetches up to three files per session.

What You Save

Each prediction type saves something different:

  • Pruning irrelevant skills removes their descriptions from the system prompt. That saves tokens on every turn of the session, because the model re-reads the full prompt each time it responds.
  • Promoting deferred tools saves one activation turn per tool. Instead of the agent searching for and loading a tool mid-conversation, the tool is ready from the start.
  • Prefetching files saves the turns the agent would spend reading and searching for those files. A file already in context means one fewer grep or read call.

The Daily Spend widget tracks these savings. Open it to see:

  • Skills pruned, tools preloaded, and files prefetched (today and last 30 days)
  • Estimated tokens saved from skill pruning
  • Estimated turns saved from tool promotion and file prefetch
  • Number of commits that triggered training in the last 30 days

The numbers update after every session. A heavy coding day with 20-plus tool calls and multiple commits trains the network on a batch of new samples and applies predictions to the next session.

What You See in Settings

The Neural Net Savings toggle lives in Settings under General. It is on by default. When enabled, Tarsk records training samples from your sessions and applies predictions at the start of new chats.

Turn it off, and Tarsk stops recording samples and stops running predictions. Existing trained models stay saved but go unused. Turn it back on, and predictions resume immediately if the project already has enough training data.

The toggle does not delete your training data or models. It controls whether predictions run during your sessions.

When Predictions Improve

Five commits is the minimum before predictions start. After that, every commit adds new training data and retrains the models.

Consistent prompts help most. When you work on the same project with similar tasks, the network learns strong associations: these keywords mean this skill, these keywords mean that file. Projects with varied tasks or infrequent commits produce weaker signals. The network may prune fewer skills or prefetch fewer files in those cases, which is the safe default.

Your data never leaves your machine. The network trains on your commits, predicts from your patterns, and stores everything locally.

Privacy

The neural network trains entirely on your device. Training samples, keyword mappings, file associations, and the trained model weights all live in your local Tarsk data directory. None of it is uploaded to a server, synced to a cloud account, or sent anywhere outside your machine.

Tarsk does not log your prompts, your predictions, or your training data. No telemetry pipeline sends what the network learns to a remote endpoint. The predictions happen in memory at the start of your session and stay there.

If you turn the Neural Net Savings toggle off, predictions stop immediately. Your existing training data and models remain on disk in case you re-enable the feature later, but nothing new is recorded and nothing runs until you switch it back on.

The training data comes from your own committed work. You control what enters the training set through your normal git workflow. Commits that touch sensitive files produce training samples that include only keyword and file-name associations, not file contents.

What You Get

The feature runs on its own. Tarsk trains after every commit, applies predictions at the start of each chat, and reports the results in your Daily Spend widget. You do not configure models, tune thresholds, or manage training data.

After a week of commits on an active project, check the widget. You will see cumulative tokens saved from skill pruning and cumulative turns saved from tool promotion and file prefetch. Those numbers reflect real API calls you did not have to make.

Start Saving With Neural Net Training

Neural Net Savings is on by default. Commit your work, and Tarsk learns from it.