Improve AI Code Generation with simple constraints

When using AI tools like ChatGPT to generate code, it’s common to get solutions that are longer or more complex than necessary. This happens because the AI often tries to cover all possibilities unless guided otherwise.

For example, a basic prompt might be:

Write a Python script to check if a website is online. While this works, the AI may produce extra functions, complicated error handling, or unnecessary libraries.

[mai mult...]