menu_book Course Curriculum (Generative AI) expand_more
Model Inputs
Generation Controls
Grounding & Retrieval
Top-k sampling
Learn Top-k sampling in Generative AI with a focused explanation, a topic-specific example, and a mastery check.
12 min read
•
Beginner
generative-ai-010.py
python
scores={'A':0.52,'B':0.27,'C':0.14,'D':0.07}
print(sorted(scores.items(),key=lambda x:x[1],reverse=True)[:2])
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content