AI Dictionary › AI Fundamentals
Top-k is a sampling technique that narrows the model's options to the k most probable tokens, discarding all others before drawing. If k is 40, the model considers only the 40 highest-probability candidate words and ignores the rest of the vocabulary, however vast. It is like a bouncer who admits only the first 40 on the list and shuts the door on everyone else, regardless of how close they were. Unlike top-p, the count is fixed: always 40, whether the model is very confident or very uncertain. This makes it simple but rigid.
Top-k matters because it is a direct way to stop the model from picking absurd, very low-probability words. Its limit is rigidity: when few options dominate, 40 is too many; when many are valid, too few.
From our network
INDACO TMS: Transport Management for European Logistics
Shipment tracking, multi-carrier EDI and automated invoicing in one cloud platform. Invoices generated in under 10 seconds.
Visit indacotms.com →From the Agora Intelligence blog
📱 Download the Android app (beta) iOS coming soon
Say what you mean. Get what you need.
Grace Certified, the AI coach that trains and certifies your prompt engineering, by Agora Intelligence.