menu_book Course Curriculum (Generative AI) expand_more
Model Inputs
Generation Controls
Grounding & Retrieval
Top-k retrieval
Learn Top-k retrieval in Generative AI with a focused explanation, a topic-specific example, and a mastery check.
12 min read
•
Intermediate
generative-ai-019.py
python
hits=[('doc-7',.92),('doc-2',.88),('doc-9',.61),('doc-3',.55)]
print(sorted(hits,key=lambda x:x[1],reverse=True)[:3])
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content