What you’ll do
- Get a passage generated by the current prompt and a passage generated by the revised prompt
- Score both passages using Grade Level Appropriateness, Vocabulary Complexity, and Sentence Structure
- Determine whether the revised prompt has improved your output’s quality
What you’ll need
- Node.js or Python
- Google API key ↗ (needed for Grade Level Appropriateness and Vocabulary Complexity)
- OpenAI API key ↗ (needed for Vocabulary Complexity and Sentence Structure)
- Current prompt and revised prompt, both for the same grade and task
Steps
1
Install the SDK
Install the package for the language your pipeline uses:
- TypeScript
- Python
TypeScript
2
Score both prompt versions
Score each prompt’s output with all 3 evaluators: Grade Level Appropriateness, Vocabulary Complexity, and Sentence Structure.
3
Determine whether the revised prompt should be shipped
Ship the revised prompt only if its output’s:For any dimension that fails its check, change the prompt to address that evaluator’s
- Evaluated grade level is at or below your target
- Vocabulary Complexity and Sentence Structure scores have not gotten more complex
If the revised prompt is meant to produce a more difficult text, be sure to reverse the check and ensure that your Vocabulary Complexity and Sentence Structure scores HAVE gotten more complex.
reasoning.To monitor one dimension of a sample over time, see Monitor quality in production.Related topics
Resource Library - Improve quality by refining prompts
Score outputs from before and after a prompt change on the same rubric so
you can see what shifted.
Quickstart
Run an evaluator in the Evaluators playground, a Python notebook, or with
the SDK.
Tutorial: Vet content quality in production
Score each output and rewrite anything above your grade-band target.
Tutorial: Monitor quality in production
Track grade band across a sample of outputs and catch a shift over time.