start_optimization_session
Run a single optimization cycle on a workspace: evaluate the system prompt against test cases, score responses, analyze failures, and generate a revised prompt suggestion for user review.
Instructions
Run one optimization pass on an existing workspace.
Prerequisites (do these first):
start_web_app → workspace URL + ID
set_system_prompt → starting prompt
add_test_cases → at least one case with targetAnswer
What this does:
Read system prompt and test cases from get_workspace_state.
Run each test case against the model (write + execute a temp Node.js script).
Score each response vs targetAnswer (LLM-as-judge, 0–100), call post_test_result.
Analyse failures, write improved prompt, call post_prompt_suggestion.
Present the suggestion — do NOT auto-apply. User reviews in the UI.
This is one iteration. After the user approves or rejects the suggestion, call start_optimization_session again or switch to loop_optimization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | ||
| threshold | No | Pass score 0–100 (default 70) | |
| maxIterations | No | Goal iterations for tracking (default 5) |