C1M4. Prompt always generates a multiword answer responding to the query

In the first block, I cannot get the LLM to output a single word response (FAQ / Product). The temperature is set at zero. I have given example queries and answers in the prompt. I have specifically asked for a single word response. Nothing makes a difference.

This usually comes down to prompt precision rather than temperature. Double-check that:

  • Your prompt is clearly formatted and ends with a strict instruction to return only FAQ or Product.

  • The query is correctly inserted into the prompt (string templating).

  • You’re using a low temperature (the assignment suggests ~0.3–0.5).

  • You treat any output other than the exact labels as invalid (None).

Even at temperature 0, loose prompts can still produce extra text. Small wording and formatting tweaks often fix it.

Oh. Silly me. I was not passing the prompt to the generate_params_dict function. Thanks for help!

1 Like