Skill
Textgrad prompt optimizer
Optimize a prompt (or system prompt) using TextGrad — "textual gradients" that backpropagate natural-language feedback through a pipeline of LLM calls. Wraps the prompt in a tg.Variable, runs forward passes, computes a TextLoss from a prose rubric (no labeled pairs needed), calls backward() to get text feedback, then optimizer.step() rewrites the prompt. Iterates until the loss narrative converges or step budget exhausts. Works with local Ollama via litellm backend. Use as a pre-ILP auto-refine pass: run on a draft prompt node to produce a better R0 baseline before the 3-reviewer panel starts, reducing ILP rounds. Also covers Promptolution (evolutionary/population prompt search) as a brief follow-up note for when population diversity matters over gradient descent.
Primitives inside (5)
auto-refine-before-review-paneldisciplineRun a cheap automatic prompt optimizer (OPRO ~10 steps, TextGrad, a rubric-driven pass) on the draft BEFORE a multi-round multi-reviewer panel starts, and hand its output to the panel as the R0 baseline — the panel stays the quality gate (a rubric-as-loss evaluator misses what reviewers catch), the optimizer exists so the first round refines instead of reconstructing a weak start; the versioned store update (SUPERSEDES, immutable append) stays downstream of the gate.
When: A draft prompt is about to enter a multi-round multi-reviewer improvement loop (ILP-style panel) from a naive or hastily-written start, and an optimizer + rubric metric are available for a 5-10 step pass.
optimizer-family-selectioncalibrationPick the prompt-optimizer family by two questions: do you have 30-50 labeled pairs (MIPROv2/GEPA) or only a prose rubric (TextGrad/OPRO), and do you need a strong reflection model (GEPA) or must it run fully local (MIPROv2/TextGrad/OPRO)?
When: Choosing an automated prompt-optimization approach for a module given the available data and compute constraints.
textgrad-mixed-engine-splitcalibrationSpend the strong model where the leverage is: run TextGrad forward passes on a cheap local engine and put the high-quality (subscription API) model on the backward/gradient+optimizer engine, since gradient text drives the rewrite quality.
When: TextGrad runs where local-only gradients are too weak but full-API forward passes are wasteful or costly.
textgrad-rubric-only-optimization-looptool-sequenceOptimize a prompt with zero labeled pairs: wrap it in tg.Variable(requires_grad=True), use a prose scoring rubric as tg.TextLoss, then loop forward → loss → backward → optimizer.step → zero_grad for 5-10 steps and take system_prompt.value.
When: A draft prompt needs automatic refinement and no fixture set of (input, expected_output) pairs exists yet.
textgrad-wrap-inputs-as-variablesgotcha-fixTextGrad's BlackboxLLM and TextLoss operate on tg.Variable objects, never raw strings — wrap every input, with requires_grad=True only on the text being optimized and requires_grad=False on task briefs.
When: Feeding any prompt, system prompt, or task input into a TextGrad forward/backward pipeline.
Get the whole skill
All 5 primitives of this skill as one package, with the order to apply them.
Buy only the primitives you need
Each primitive is 1 credit (≈ €0.10). Pick them from the list above — the button is next to each one.
Upgrade your own skill
Paste your skill; we pick the 5 primitives from the shelf that fit it best, as one bundle for 5 credits (≈ €0.50).
Upgrade my skillNeighbour skills
Skills whose primitives are closest to this one (bge-m3 similarity):