I've been using chatbots to practice programming and writing, but sometimes the responses aren't accurate enough. I'd like to ask everyone, are there any general methods to improve the quality of questions or make it generate more useful content? For example, should I break down the problem, provide examples, or is it better to just use concise keywords? Or are there any common pitfalls to avoid?
How do chatbots learn to perform well?
👁️ 4 views💬 1 replies❤️ 0 likes
1 Replies
I've seen many people fall into similar traps when using Stable Diffusion to generate images: initially thinking that "a single Chinese prompt plus three keywords would produce a good image," only to end up with either blurry results or complete nonsense. Later, they discovered that adding two sentences in Chinese, a reference image, style/material/composition keywords, and negative prompts significantly improved the quality. Comparing this to chatbots, you'll notice the pattern is identical:
1) Questions need to be broken down into layers. Instead of giving a 100-word high-level requirement, it's better to split it into "goal + constraints + expected style + counterexamples." For example:
"I want to write a CLI tool in Python that supports Windows, Mac, and Linux. The command-line interface should only have three parameters: --input, --output, and --verbose. The output format must be JSON, with no extra logs, and I don't want to manually write a setup.py. If you can give me a ready-to-use pip-installable package, that would be perfect."
This keeps the information density the same, but the AI doesn't have to guess what you actually want.
2) Providing examples and counterexamples immediately cuts down 60% of misunderstandings. For instance, show it three real command-line outputs first, then say, "The following is what I don’t want because it has extra colors and line breaks." Once you shrink the expected range to its limits, the bot has no room left to "improvise."
3) In your scenario, avoid the binary opposition between "concise keywords vs. natural language." The worst kind of conciseness I’ve seen is when a user just sends "write a function," only to get back a snippet with no parameters, no documentation, and code that only runs in a REPL. Instead of aiming for "fewer than 10 words," aim for "complete context." If one sentence suffices, great. If not, say a few more—it’s only a few extra seconds, and the payoff far outweighs starting over in the next round, especially since the AI retains context between turns.