← Back to concept explainers

Concept Fable

Prompt optimizer

Conclusion first:Teleprompter in DSPy refers to an optimizer used to optimize prompts, demonstrations, or program settings. Based on training samples, evaluation metrics, and module structure, it searches for more effective few-shot examples, instructions, or reasoning strategies. When enterprises use it, the key is not blind automatic parameter tuning, but preparing representative data, reliable metrics, and clear task boundaries.

Teleprompter · Prompt optimization tool

Read the story first. There is no rush to give a definition here; let the question grow on its own first.

Fable

The rehearsal coach no longer teaches actors by volume, but tests scenes round after round with samples

The troupe had a prompter who stood behind the curtain to remind the actors. In earlier years he supplied lines only from memory, and whenever an actor forgot, he hurriedly added a line.

As the new play became complex, the prompter often supplied the wrong thing: when emotion should be prompted, he read a line; when blocking should be prompted, he mentioned a prop. The more the actors relied on him, the more obvious the mistakes became. Once an actor forgot why he had entered, and the prompter supplied only the next line. The line was right, but the emotion was wrong, and the whole scene felt abrupt.

The troupe leader had him write each scene's cues on small cards: when to prompt, what to prompt, how to cover a forgotten line, and which things must not be said directly to the audience. After rehearsal, whichever card worked and whichever misled had to be revised. The first version of the cards was written too densely, and the actors could not read them clearly when nervous. The troupe leader had him layer the prompts: save the goal first, then the key action, and only last fill in the small details.

Later, prompting was no longer an improvised shout but a rehearsed prompt design. The actors still performed on stage, while the prompter backstage helped them reach the right state more reliably. During rehearsal, the prompter would even deliberately cover a card to see if the actor could pick up on their own. Prompt only when necessary; a prompt should only steady someone at a fork.

The troupe leader also reminded him that prompting must not overpower the actors. If the prompt comes too early and too fully, the actors lose their own judgment; if there are too few prompts, key moments will collapse.

Later, before a new play opened, the prompter would walk through the whole performance with the actors. Where lines were easily forgotten, where emotions easily went wrong, where a prompt couldn't be too obvious—all were tuned during rehearsal. Prompts should serve the performance, not steal it.

Later, Mr. Prompter took on apprentices, and he didn't let them memorize universal lines either. Every actor's point of tension is different, and every play's turning point is different, so prompts must be adjusted to the goal and to failure samples. A good handrail looks light, but behind it lies repeated testing and design. In the end, the troupe leader collected all these little cards and change records into the prop chest. When a new play went into rehearsal, they first dug through the old chest, then retested for the new cast. Prompting isn't about being clever on the spot; it's about paving the places where you're likely to slip, in advance.

A good prompt is like an invisible handrail. It does not act in the performer's place, but it determines whether the performer, when nervous, forgetful or at a fork, can be brought back onto the right track.

Reveal

This story is about: prompt optimizers

Teleprompter in DSPy refers to an optimizer used to optimize prompts, demonstrations, or program settings. Based on training samples, evaluation metrics, and module structure, it searches for more effective few-shot examples, instructions, or reasoning strategies. When enterprises use it, the key is not blind automatic parameter tuning, but preparing representative data, reliable metrics, and clear task boundaries.

What matters is that it is not just a term, but a structural problem that repeatedly appears in real AI / Agent systems. Understanding it lets you judge when to add a model, when to change a process, and when to add governance.

Metaphor mapping

  • Prompt sign plus requirement: manual prompt modification
  • A model playbook: few-shot demonstrations
  • Tuning by experience: non-reproducible prompt engineering
  • Rehearsal Coach: DSPy Teleprompter / Optimizer
  • Training samples, validation samples, scoring criteria: optimize data and metrics
  • Keep good combinations: search and select prompts / demos
  • Accuracy, Cost, Recall: Optimizing Trade-off Metrics
  • Final insight: Teleprompter uses data and a metrics system to optimize LLM programs

Andy Ren Xu's judgment

The practical value of this concept is that it helps you break "AI features that look smart" into deliverable, verifiable, and governable units of work.

DSPy optimizerfew-shot examplesprompt compilationmetricbootstrap
京ICP备2026014272号