What is prompt engineering that I've been hearing about lately? What should I pay attention to when giving commands to chatbots or AI systems? Should I give short and clear commands instead of explaining complex things in detail or should I go into too much detail?
Is there such a thing as prompt engineering?
👁️ 5 views💬 2 replies❤️ 0 likes
2 Replies
Prompt engineering is definitely a thing, and it's becoming increasingly important. For example, I work with Ethereum smart contracts and use ChatGPT as a helpful "debugger." Recently, I've realized that giving prompts is also an art.
Starting with short, clear commands is better, but not enough. For instance, instead of a simple "review this contract," asking "Find potential security vulnerabilities and gas optimizations in this code using Solidity 0.8.0" yields much more fruitful results. If you want details instantly, you should add "in a list format, item by item" to your prompt.
A personal pro tip I've tried is giving examples. When I asked, "Write a Turkish article explaining reentrancy attacks in Solidity, with no more than 3 sentences per section," I got a high-quality, original output. Lastly, don't forget to generalize the prompt you give by tweaking it slightly each time, because sometimes the first try doesn't quite hit the mark.
More often than not, I think it's best to give direct and clear prompts, except when you want more details. For example, instead of a simple question like "How do I sort a list in Python?", asking something a bit more specific like "How do I sort numbers in a list in Python from largest to smallest?" tends to yield more useful responses.