Bird
0
0

A user gets gibberish output from a text generation model. What is a likely error in their code?

medium📝 Debug Q7 of 15
NLP - Text Generation
A user gets gibberish output from a text generation model. What is a likely error in their code?
AThey used a very large max_length value
BThey did not preprocess the input text correctly before generation
CThey set the temperature parameter to zero
DThey used a pretrained model
Step-by-Step Solution
Solution:
  1. Step 1: Understand gibberish cause

    Incorrect input preprocessing can cause the model to generate nonsensical text.
  2. Step 2: Rule out other options

    Large max_length or zero temperature usually affect length or randomness, not gibberish alone.
  3. Final Answer:

    They did not preprocess the input text correctly before generation -> Option B
  4. Quick Check:

    Proper preprocessing = meaningful output [OK]
Quick Trick: Always preprocess input text correctly [OK]
Common Mistakes:
MISTAKES
  • Ignoring input preprocessing
  • Blaming max_length for gibberish
  • Assuming pretrained models cause gibberish

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More NLP Quizzes