Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this quickstart, you create a sample tuning environment (otherwise known as a reinforcement learning environment or RLE) in Frontier Tuning and inspect its artifacts. You then evaluate a baseline model, tune the model, and compare the results.
A sample template provides ready-made artifacts and mock data so you can try the workflow before preparing your own business data. The workflow uses the CLI. The API alternative covers only template discovery and environment creation.
Before you begin, confirm service access, the CLI installation, and permission to evaluate and tune models.
Prerequisites
To follow the examples, you need:
- Access to the tuning service and permission to create an environment.
- The Frontier Tuning CLI installed. See Install and set up the Frontier Tuning CLI.
- Permission and available capacity to evaluate and tune a model in your environment.
- For the API creation alternative, an access token authorized for the service.
What the sample includes
The contents depend on the template you choose. A template can include:
- Skills: Instructions that describe what the model should do.
- Evaluation criteria: Requirements for assessing responses.
- Samples and mock data: Example inputs for exploring the scenario and trying evaluation or training.
An employee-onboarding scenario, for example, could use fictional employee information to generate a checklist. The skill describes the task, and the evaluation criteria check whether the response includes required training and first-week tasks. This example is illustrative; check the template list for available scenarios.
Create a sample tuning environment
Review the available templates and choose a scenario to try. Use either the CLI or the API to create the environment.
Use the CLI
Sign in before discovering templates or creating an environment:
ftune auth login
List the templates:
ftune environments templates list
Replace <template-id> with an ID from the list and review its details:
ftune environments templates get <template-id> -o json
Create a tuning environment from the selected template:
ftune environments create --name "My sample RLE" --template-id <template-id>
Save the environment ID returned by the command. Use it as <environment-id> in subsequent commands.
Use the API
Use the API only for template discovery and environment creation. Then use the CLI to inspect the environment, evaluate models, and run tuning.
Don't include access tokens in shared examples or captured output.
List the available templates. Replace
<access-token>with a token authorized for the service.GET https://substrate.office.com/KnowledgeGraph/api/v1.0/Environments/Templates Authorization: Bearer <access-token>Copy a template ID from the response and retrieve its details. Replace
<template-id>with the selected ID.GET https://substrate.office.com/KnowledgeGraph/api/v1.0/Environments/Templates/<template-id> Authorization: Bearer <access-token>Create an environment with the selected
templateId.POST https://substrate.office.com/KnowledgeGraph/api/v1.0/Environments Authorization: Bearer <access-token> Content-Type: application/json { "displayName": "My sample RLE", "description": "Explore tuning with ready-made artifacts and mock data.", "templateId": "<template-id>" }Save the environment ID returned in the response. Use it as
<environment-id>below, and sign in to the CLI before continuing:ftune auth login
Inspect the environment
Review the environment and its contents:
ftune environments get --env-id <environment-id>
ftune skills list --env-id <environment-id>
ftune samples list --env-id <environment-id>
ftune models list --env-id <environment-id>
The skill and sample lists help you understand the task and example inputs. The model list shows models available in the environment.
Before evaluating, confirm that the environment includes Evaluation-type samples. The default evaluation uses these samples. Choose a base model that's available for evaluation and eligible for tuning. Use that model for the baseline evaluation and tuning job.
Evaluate a baseline model
Replace <base-model> with the model you selected and start an evaluation:
ftune evaluate start --env-id <environment-id> --base-model <base-model>
Copy the evaluation job ID from the response. Replace <evaluation-job-id> with that ID to check progress:
ftune evaluate status <evaluation-job-id> --env-id <environment-id>
When the baseline evaluation completes successfully, get the results:
ftune evaluate results <evaluation-job-id> --env-id <environment-id>
Keep the baseline results for comparison with the tuned-model evaluation.
Tune a model
Start a tuning job with a base model eligible for tuning. This example names the resulting model my-sample-model:
ftune tune start --env-id <environment-id> --base-model <base-model> --new-model my-sample-model
Copy the tuning job ID returned by the tuning command. Replace <tuning-job-id> with that ID to check progress:
ftune tune status <tuning-job-id> --env-id <environment-id>
Wait for tuning to complete successfully before evaluating the resulting model.
Evaluate the tuned model
List the models again and identify the tuned model:
ftune models list --env-id <environment-id>
Replace <tuned-model-id> with the resulting model's ID and start a new evaluation:
ftune evaluate start --env-id <environment-id> --base-model <tuned-model-id>
Use the new evaluation job ID, not the baseline evaluation ID, in these commands:
ftune evaluate status <evaluation-job-id> --env-id <environment-id>
After the tuned-model evaluation completes successfully, get its results:
ftune evaluate results <evaluation-job-id> --env-id <environment-id>
Compare the results
Compare the baseline and tuned-model results using the same evaluation samples and evaluation criteria. Look for changes in the criteria that matter to the sample task, rather than assuming tuning improves every response. Review failed tool calls before interpreting differences in scores.
Note
Sample artifacts and mock data are intended for learning and experimentation. Sample results don't establish performance on your business scenarios. Evaluate with representative data before using a tuned model in production.