
Answer-first summary for fast verification
Answer: stop-sequences
## Explanation The **stop-sequences** parameter is used to control when text generation should stop by specifying sequences that, when encountered, will halt the generation process. ### Why stop-sequences is correct: - **Purpose**: Stop sequences allow you to define specific phrases or tokens that signal the AI to stop generating further text - **Use case**: In this scenario, when the chatbot reaches "Thank you for contacting us." you want it to stop immediately rather than continuing with additional text - **Implementation**: By setting "Thank you for contacting us." as a stop sequence, the generation will terminate as soon as that exact phrase is produced ### Why other options are incorrect: - **B. temperature**: Controls randomness/creativity in responses (lower = more predictable, higher = more creative) - **C. top-p**: Controls vocabulary diversity through nucleus sampling - **D. max-tokens**: Sets a hard limit on the total number of tokens generated, but doesn't stop at specific phrases Stop sequences are particularly useful for chatbots and conversational AI to ensure responses end at appropriate closing statements.
Author: Ritesh Yadav
Ultimate access to all questions.
No comments yet.