menu_book Course Curriculum (Generative AI) expand_more
Model Inputs
Generation Controls
Grounding & Retrieval
Reranking results
Learn Reranking results in Generative AI with a focused explanation, a topic-specific example, and a mastery check.
12 min read
•
Intermediate
Advertisement
generative-ai-024.py
python
hits=[{'id':'a','semantic':.8,'fresh':.2},{'id':'b','semantic':.7,'fresh':.9}]
for h in hits: h['score']=.8*h['semantic']+.2*h['fresh']
print(sorted(hits,key=lambda h:h['score'],reverse=True))
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content