What you’ll do
- Score a passage with the Grade Level Appropriateness evaluator
- Treat a grade band above your target as a failed check
- When it fails, use the Vocabulary Complexity evaluator for the words and reasoning to send back to your model
- Ask your model to rewrite the passage, if needed
- Score the rewritten passage before it reaches a student
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)
- Text passage and the grade band you want it to stay within
Steps
1
Install the SDK
Install the package for the language your pipeline uses:
- TypeScript
- Python
TypeScript
2
Assess the grade level for your text passage
Grade Level Appropriateness takes a text passage and returns the grade band at which a student can read independently:
3
Determine whether the result meets your target
Compare the returned grade band with your desired target. If the result is higher, it means the passage is too difficult for your audience and should not ship.
4
Rewrite the passage, if needed
If the result grade band is too high, run Vocabulary Complexity on the same passage.Share the returned
tier_2_words, tier_3_words, and reasoning with your model to help it rewrite the message for the target grade level.5
Score the rewrite before it ships
Rerun Grade Level Appropriateness on your rewritten passage. Ship only if the result is at or below your target grade level.
Related topics
Resource Library - Vet content quality in production
Score every output in your pipeline, then rewrite and re-check anything that
misses the rubric.
Quickstart
Run an evaluator in the Evaluators playground, a Python notebook, or with
the SDK.
Tutorial: Monitor quality in production
Track grade band across a sample of outputs and catch a shift over time.
Tutorial: Improve quality by refining prompts
Compare two prompt versions on grade band, vocabulary, and sentence
structure.