Back to Prompt Library
testing

Optuna Prompt Optimization Strategy

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: EU DMA/DSA Policy Compliance Graph Agent

Format
Code-aware
Lines
1
Sections
1
Linked challenge
EU DMA/DSA Policy Compliance Graph Agent

Prompt source

Original prompt text with formatting preserved for inspection.

1 lines
1 sections
No variables
0 checklist items
Propose an Optuna-based strategy to optimize the prompt for the 'Compliance Assessor' agent. This agent takes a DMA/DSA article and a company's internal practice description. Optuna should tune prompt parameters (e.g., tone, specificity of instructions, few-shot examples) to improve the accuracy of compliance status identification (compliant/non-compliant/at-risk). Describe the objective function for Optuna.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Preserve the rubric, target behavior, and pass-fail criteria as the baseline for evaluation.

Tune next

Adjust fixtures, mocks, and thresholds to the system under test instead of weakening the assertions.

Verify after

Make sure the prompt catches regressions instead of just mirroring the happy-path examples.