menu_book Course Curriculum (Generative AI) expand_more
Model Inputs
Generation Controls
Grounding & Retrieval
Golden test sets
Learn Golden test sets in Generative AI with a focused explanation, a topic-specific example, and a mastery check.
12 min read
•
Intermediate
generative-ai-030.py
python
tests=[('2+2','4'),('capital of France','Paris')]
predictions={'2+2':'4','capital of France':'Paris'}
print(sum(predictions[q]==a for q,a in tests)/len(tests))
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content