Skip to main content

Writing Good Prompts

For New Applications

If you are building an application from scratch you can be as vague as you like, Priset will add as many details that are needed to complete the task for you. You may enter the following prompt:

Prompt
Create a web application which will display community notices 
stored in the database. Provide some dummy data.

And Priset will do it for you. It will create a solution with the client project and the server project, but it will not create a test project as it will assume that is not required. But, if you prompt it with:

Prompt
Create a web application which will display community notices 
stored in the database. Provide some dummy data.
Also create the tests for the server API endpoints.

It will create a solution with three projects: 1) the client, 2) the server, and 3) the server tests.

For Existing Applications

But things are different if you are working on an existing application. Say you already have the client server application and you want to change something on the client only, you should always start your prompt with:

Prompt
In my client ...

This will direct Priset to focus on the client side and change the relevant parts there. However, there is no guarantee that something in your prompt would not direct the tool to also have a look at the server side ... hence, if you want to definitely stop the tool from looking into the server finish your prompt with an explicit negative like:

Prompt
In my client ... Do not change the server code.

The Choice of Words

You need to remember that AI is not a perfect machine. Priset is designed to generate high-quality, efficient, and clean code. However, we always recommend that a human developer performs a final review, as you would with any team member's code.

One example that highlights this is a prompt like below:

Prompt
On the terms of service page replace all "mailto" links with invoking the Contact form with subject 435

The word invoking "threw off" AI to add a navigation link to the /contact page instead of opening the modal dialog that contains the Contact form. So, to be on the safe side it would be better to have given it the following prompt:

Prompt
On the terms of service page replace all "mailto" links and open the modal Contact form with subject 435

That's why it's good to watch where the AI is going and see which changes it is doing. If you see it's going in the wrong direction stop it and:

  1. Either start all over again OR
  2. Type "continue" (or some other human-understandable commandand) and provide some extra instruction. For example:
    a) "continue, but don't ...",
    b) "I meant to do this not that"
    c) "continue, but specifically do ..."
pro tip

To continue processing (after stopping the tool) add any additional requirements you think would restrict or better define the task Priset is currently performing. Use any human-understandable command / information or instruction that would re-direct and guide the tool.