Post Reply 
Enter date in Prime program?
10-03-2024, 05:54 AM
Post: #10
RE: Enter date in Prime program?
(10-02-2024 09:27 PM)Jase Wrote:  Thanks... No one beat me up too badly for doing that Chat GPT thing Smile
I will refrain from doing it again. That said, I find it very useful in the work that I do.
Thanks again.
Jase.

I’m not saying that ChatGPT is inherently bad. I also use it at work and I’m aware of what it can and can’t do. If you ask it to write a simple script in JavaScript or Python, you’ll usually get a flawless result right away (of course, this applies to small scripts). The most important thing is to clearly specify your request and provide all the necessary details (avoid shortcuts or assumptions - something that’s obvious to us (people) may not be for ChatGPT). Moreover, if you’re using the paid version, you can create agents into which you can inject knowledge from any domain.

Let’s say you want to create an agent called 'PPL Programmer'. After defining its identity, it will primarily focus on PPL, but it will still make mistakes. As you use it, you can correct these mistakes by adding the relevant information to its knowledge base.

For example, if you give the standard ChatGPT the following command:

Write a PPL program that declares 10 variables starting from 'a'.

You’ll most likely get smoething like that:
Code:
EXPORT DeclareVariables()
BEGIN
  LOCAL a, b, c, d, e, f, g, h, i, j;
END;

This is incorrect because PPL allows the declaration of a maximum of 8 variables for a single LOCAL.

However, when I added the following information to the knowledge base:

One LOCAL keyword in the program can declare up to 8 variables. If there are more variables to declare, use an additional LOCAL keyword for the remaining variables.


Issuing the command again will generate a correct program:

Code:
EXPORT DeclareVariables()
BEGIN
  LOCAL a, b, c, d, e, f, g, h;
  LOCAL i, j;
END;

The crucial thing for PPL is to provide a list of built-in commands and forbid the use of others not on that list. This prevents GPT from inventing commands that don’t exist.

Creating a good agent is hard work, especially if there are significant knowledge gaps (as is the case with PPL), but it allows you to get much more out of ChatGPT.

Currently, ChatGPT cannot replace humans in programming (at least for now), but it can significantly assist and reduce the time needed to develop a project, and even detect potential bugs in the code. However, you need to know how to use it properly. The ability to write effective prompts is a great skill that must be learned.

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Enter date in Prime program? - Jase - 10-01-2024, 11:29 PM
RE: Enter date in Prime program? - komame - 10-02-2024, 04:17 AM
RE: Enter date in Prime program? - komame - 10-02-2024, 04:35 AM
RE: Enter date in Prime program? - komame - 10-03-2024, 03:37 AM
RE: Enter date in Prime program? - Tyann - 10-03-2024, 05:01 AM
RE: Enter date in Prime program? - komame - 10-03-2024, 07:16 AM
RE: Enter date in Prime program? - komame - 10-03-2024, 03:13 PM
RE: Enter date in Prime program? - komame - 10-03-2024, 04:36 PM
RE: Enter date in Prime program? - KeithB - 10-02-2024, 08:48 PM
RE: Enter date in Prime program? - Jase - 10-02-2024, 09:27 PM
RE: Enter date in Prime program? - komame - 10-03-2024 05:54 AM
RE: Enter date in Prime program? - Jase - 10-03-2024, 11:19 PM



User(s) browsing this thread: 1 Guest(s)