Explanation
Stop-sequences is the correct parameter to use when you want to end text generation at a specific phrase or sequence of tokens.
Why stop-sequences is correct:
- Purpose: Stop-sequences are specifically designed to halt text generation when the model encounters certain predefined sequences of tokens.
- Use case: In this scenario, when the chatbot says "Thank you for contacting us," you want the generation to stop immediately rather than continuing with additional text.
- Implementation: By setting "Thank you for contacting us" as a stop sequence, the model will stop generating text as soon as it produces that exact phrase.
Why other options are incorrect:
- B. temperature: Controls the randomness/creativity of the output (higher = more random, lower = more deterministic). Doesn't control stopping.
- C. top-p: Controls nucleus sampling by limiting token selection to a cumulative probability threshold. Affects output quality but not stopping.
- D. max-tokens: Limits the total number of tokens generated, but doesn't stop at a specific phrase.
Practical application:
In banking chatbots, using stop-sequences ensures professional, concise responses and prevents the model from generating unnecessary or potentially problematic text after the closing statement.