From 6c65865285720aafb14f2d5eb49ec63b326cbc24 Mon Sep 17 00:00:00 2001 From: Wania Kazmi <112770629+Wania-Kazmi@users.noreply.github.com> Date: Sun, 7 Sep 2025 16:53:35 +0500 Subject: [PATCH] Clarify Top-K and Top-P definitions in readme Enhanced explanations for Top-K and Top-P sampling methods. --- 00_prompt_engineering/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/00_prompt_engineering/readme.md b/00_prompt_engineering/readme.md index bcb3464..91136f5 100644 --- a/00_prompt_engineering/readme.md +++ b/00_prompt_engineering/readme.md @@ -157,8 +157,8 @@ Before diving into prompt techniques, understand these key parameters that contr - Set appropriately for your task needs ### Top-K and Top-P (Nucleus Sampling) -- **Top-K**: Limits choices to top K most likely tokens -- **Top-P**: Limits choices based on cumulative probability +- **Top-K**: Limits choices to top K most likely tokens (**Only consider the k most likely next words (e.g., top-5 words)**) +- **Top-P**: Limits choices based on cumulative probability (**Keep adding words to the list until you reach p% total probability (like filling a bucket to 90%)**) - Work together with temperature to control randomness **Recommended starting points:**