Tiles
Download
Skip to Content
Manual

Manual

Reminder: this is in alpha.

Enjoy these sample commands in lieu of a formal doc.

Tiles

Commands in this section are intended for regular users. Most user-facing functionality is available through slash commands in the chat REPL.

Onboarding

This is what the first run looks like when you type tiles in your terminal.

Tiles onboarding flow in the CLI
Click to expand

First-run onboarding flow (tiles)

CLI Commands

tiles # Onboarding and launching REPL tiles account create <nickname> # Create root identity (nickname optional) tiles account set-nickname # Set nickname tiles account # Show account details tiles data set-path <path> # Set data directory tiles run [MODELFILE_PATH] # Run a model (default if not provided) tiles run -m # Run with experimental memory model tiles update # Check for and install app updates

Examples

# Onboarding and launching REPL tiles # Create root identity (nickname optional) tiles account create alice # Set nickname tiles account set-nickname # Show account details tiles account # Set data directory tiles data set-path ~/.tiles/data # Run a model (default if not provided) tiles run # Run a model from a specific Modelfile tiles run ./path/to/Modelfile # Run with experimental memory model tiles run -m # Check for and install app updates tiles update

Tilekit

Commands in this section are meant for developers.

Prompt Optimization

We have DSRs (dspy-rs) built into the Tiles CLI to automatically optimize system prompts in Modelfiles.

CLI Commands

tiles optimize <MODELFILE_PATH> [--data <path>] [--model <provider:model-name>] # Optimize SYSTEM prompt in Modelfile

Examples

# Optimize SYSTEM prompt in a Modelfile tiles optimize path/to/Modelfile # Optimize with custom training data tiles optimize ./Modelfile --data training-data.json # Optimize using a specific model tiles optimize ./Modelfile --model anthropic:claude-3-5-sonnet-20240620

Optimize Command Details

The tiles optimize command refines the SYSTEM prompt in your Modelfile automatically using DSRs (dspy-rs) and the COPRO optimizer.

Basic Usage:

tiles optimize path/to/Modelfile

By default, this will:

  • Generate 5 synthetic examples automatically if you do not provide your own training data
  • Use openai:gpt-4o-mini as the optimization model
  • Update your Modelfile in-place with the improved SYSTEM prompt

Options:

  • --data <path> - Provide your own training data as a JSON file
  • --model <provider:model-name> - Specify a different model to use for optimization

Requirements:

Your Modelfile must contain a starting SYSTEM prompt, so the optimizer knows what it should build upon.

Training Data Format:

If supplying your own data, use JSON structured like this:

[ { "input": "User query here", "output": "Expected AI response here" } ]

Example:

Let’s say you have a Modelfile:

FROM llama3 SYSTEM "You are a helpful assistant."

To optimize its SYSTEM prompt using Claude:

export ANTHROPIC_API_KEY=sk-ant-... tiles optimize ./Modelfile --model anthropic:claude-3-5-sonnet-20240620

This will rewrite the SYSTEM line with a more effective version based on the optimization process.

Last updated on