An e-commerce company uses Claude to generate product descriptions. They set temperature=0.9 for creative variation and are happy with output diversity. However, they notice that 8% of outputs contain factual errors about product specifications (wrong dimensions, incorrect materials). Their product spec data is provided in the prompt. What parameter adjustment most directly reduces factual errors while preserving reasonable output diversity?
Select an answer to reveal the explanation.
Short Explanation
Here's the deal — factual errors in spec-grounded generation often come from high temperature pushing Claude toward less-probable tokens, including hallucinated specs. Drop temperature to 0.3–0.5 and tell it to use only the provided product data; you keep useful variety while grounding the output.
Full Explanation
Factual errors in spec-grounded generation are often caused by high temperature pushing the model toward less-probable tokens — including hallucinated or misremembered specifications. Lowering temperature from 0.9 to 0.3–0.5 substantially reduces hallucination risk while still allowing stylistic variety in word choice and sentence structure. Paired with an explicit instruction to use only specifications directly stated in the provided product data, this addresses both the probabilistic and instructional causes of factual errors. Reducing temperature to 0.0 would likely over-correct, producing repetitive outputs with insufficient variety — and deterministic generation doesn't guarantee factual accuracy, as the most probable token can still be wrong. Increasing top_p from 1.0 to 0.95 has less direct effect on factual grounding than temperature; top_p mostly affects output diversity in the tail distribution. Adding a post-processing factual verification step using a separate Claude call is a valid safety net but adds latency and doubles cost — it treats the symptom rather than the cause.