2 things can improve the quality of the AI answer:
As an example, we will turn into a potentially bad prompt into a better prompt for a hypothetical e-commerce project.
❌ Initial Prompt
Add discounts to products.
✅ Final Prompt
/Implement
Add the ability to apply discounts to products that are in cart. Make sure that: - discounts are in percentages - discounts cannot be more than 100% - only one discount can be applied to a product@shopping.js
,@shopping-service.js
,@shopping-repository.js
,@Cart.js
Use the '@'
system to tell AI exactly which files to consider as context. This produces the highest quality of answers, but requires you to know which files are relevant.
Improved Prompt
/Implement
Add discounts to products.@shopping.js
,@shopping-service.js
,@shopping-repository.js
,@Cart.js
✅ the context is specific.
❌ the requirements aren’t clear.
But what if you don’t know which files to include yet?
Use /Explain
and /Plan
to quickly research which files are relevant.
You may first want to understand how products and carts interact with each other.
/Explain
How does product get added to cart?
EasyCode can offer suggestions on which files to change, and what changes to make.
/Plan
Add the ability to apply discounts to products that are in cart.
Provide as much requirements upfront as possible. Imagine you are giving the task to another developer, the more clear you communicate what you want in the beginning, the less back-and-forth there will be.
/Implement
Add the ability to apply discounts to products that are in cart. Make sure that: - discounts are in percentages - discounts cannot be more than 100% - only one discount can be applied to a product@shopping.js
,@shopping-service.js
,@shopping-repository.js
,@Cart.js
✅ the context is specific.
✅ the requirements are clear.
Copyright © 2024 Personabo Technologies, Inc. All rights reserved. Privacy Policy