Recent

Author Topic: Programming Pascal with an AI Chatbot 2.0  (Read 16927 times)

Bogen85

  • Hero Member
  • *****
  • Posts: 702
Re: Programming Pascal with an AI Chatbot 2.0
« Reply #105 on: January 12, 2023, 12:23:23 am »
Hmmm...

This seems to be the source of some of my problems:

Code: Text  [Select][+][-]
  1. - interpreter parses tokens from prompted input into fifo, executes

It took that literally, and named the variable input it seems....

Because it also took this literally...
Code: Text  [Select][+][-]
  1. - program creates interpreter, calls run
  2.  

And it created a new method called Run to call the existing _run

That clearly did not come from a scraped example... It came from my faulty specification.



Hartmut

  • Hero Member
  • *****
  • Posts: 893
Re: Programming Pascal with an AI Chatbot 2.0
« Reply #106 on: January 12, 2023, 11:38:43 am »
One major problem (which it me also shows it is not scraping examples) is the every submission of the prompt results in a different completion.
Some work, some don't.
Maybe your "temperature" is too high?

https://beta.openai.com/docs/guides/code/best-practices says about that:
Quote
Lower temperatures give more precise results. Setting the API temperature to 0, or close to zero (such as 0.1 or 0.2) tends to give better results in most cases ...
In cases where you need Codex to provide different potential results, start at zero and then increment upwards by .1 until you find suitable variation.

If you use the recommended model "code-davinci-002" for code completion, the temperature is automatically set to zero, if you use the playground https://beta.openai.com/playground
More about code completion you can find in https://beta.openai.com/docs/models/codex

Bogen85

  • Hero Member
  • *****
  • Posts: 702
Re: Programming Pascal with an AI Chatbot 2.0
« Reply #107 on: January 12, 2023, 12:33:40 pm »
One major problem (which it me also shows it is not scraping examples) is the every submission of the prompt results in a different completion.
Some work, some don't.
Maybe your "temperature" is too high?

Yeah, I need to play around with that.
But I've also found that adding a requirement like:

Code: Text  [Select][+][-]
  1. append markdown list: each requirement and fully explain detail how met

Not only only improves the quality of what it generated, it also tells me how I specified things incorrect.

It does not require full text, since the prompt size is limited (too big is rejected, I'm setting the highest possible for size) I've found you can really get creative on terse requirements to reduce the size, and since it is explaining what it understood you can refine it as needed.


avra

  • Hero Member
  • *****
  • Posts: 2535
    • Additional info
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

 

TinyPortal © 2005-2018