Sketch - A GPT-3 AI for plain english adhoc data reports - Interest as a Clarion 3rd party addon?

This wouldnt be a straight forward drop a template into an app scenario for starters (initially).

GitHub - approximatelabs/sketch: AI code-writing assistant that understands data content

The 1min 33sec video at this link showing how it works is quite impressive!

Sketch works with pandas - Python Data Analysis Library (pydata.org) but the techniques used to make it work with pandas could be adapted for the clarion language and probably needs a couple of forks, one for the main clarion language (ISAM files), then another fork for Clarion using MS SQL with sql queries and another fork for clarion with ODBC Postgres and other forks for whatever else is popular.

So not straight forward, but an example of things to come and how end users are going to be getting easier and simpler reporting tools for their apps.

This isnt something that could be created in a few days or weeks either, lots of research will be needed to get this working with Clarion, so a side project at best, but the techniques used to get it work with pandas should make it portable to other languages and tools which work with data analysis.

Its not something I could concentrate until at least the end of the year, but I’m putting this out here for awareness of future improvements in rival languages and if it tempts someone into rolling a Clarion version or two.

Edit. Reason for the awareness Microsoft are offering $10billion for Chat-GPT

Not sure I’m ready for that yet. Maybe it’s me, but it seems like these chat bots are mainly designed to make people distill their years of knowledge/experience into questions they think are smart and volunteer those carefully formulated questions to someone unknown entity for free

Its not for free, it can be quite expensive and I know what you mean about the data going off to some far off land where the laws are different, but I dont think we can ignore it’s existence. So being aware of it when customers/users ask will be useful, even suggesting it can be seen as pro-active and aware of latest developments in IT. It might even make customers/users think more about their own apps and changes they might want to see which generate more work especially as the planet is forecast to enter a global recession this year.

I’ve made the mistake in the past to not keep bouncing idea’s and suggestions to some ex customer’s who just loved their technology and technological advancements. It turns out they like to talk about it with their friends and business rivals in social events aka bragging rights. I’ve since learnt, that new tech especially gadgets tend to get released first in Japan as they can be seen as early adopters on this Rogers Bell Curve a portrayal of the Diffusion of Innovations theory.
Technology adoption life cycle - Wikipedia

If the tech is successful, manufacturers tend to expand its availability to wider markets aka other parts of the world. Point in case Sony still make the Sony Walkman, only available in Japan, UK and Europe. Android based ranging in price from $400 to $3700!!

So I understand you caution, but I’m also aware you are US based, older and wiser and the US culture will be different to other parts of the world, even within the English speaking countries.

Edit. It did occur to me, that for now I am still generating text on web forums the old way (by hand) and I do wonder about some of the text thats posted on websites, be it comments or articles, but then it occurred to me that govts, leaders and even religions have been deceiving the public for hundreds if not thousands of years. Fake news from security services, body doubles for leaders, even the hallucinogenic accounts of god’s, which makes me wonder, what are the tell tale signs for “deepfake” AI’s?

1 Like

I’ll bang this on here as its relevant to sketch.
Let’s build GPT: from scratch, in code, spelled out. - YouTube

openai-cookbook/techniques_to_improve_reliability.md at main · openai/openai-cookbook · GitHub

Techniques to improve reliability

When GPT-3 fails on a task, what should you do?

  • Search for a better prompt that elicits more reliable answers?
  • Invest in thousands of examples to fine-tune a custom model?
  • Assume the model is incapable of the task, and move on?

If anyone fancies a go.
On point two, “invest in thousands of examples”, not wishing to be disparaging, but I’m reminded of a phrase:

throw things at the wall and see what sticks

I think it pays to understand how these models work in order to see if its calculated or some unconscious bias in the training set or just luck.
So these links might interest.
Reverse Prompt Engineering for Fun and (no) Profit (swyx.io)
Reverse Engineering a Neural Network’s Clever Solution to Binary Addition - Casey Primozic’s Homepage (cprimozic.net)

I personally think they are doing it the wrong way, to achieve a level of sentience that would be considered consciousness, but even the experts cant really decided on what is consciousness, and I need to get more buried in the nuts and bolts to confirm that point of view, for sure.

Edit. One more for the pile.
[2301.04655] ChatGPT is not all you need. A State of the Art Review of large Generative AI models (arxiv.org)

Edit.
Whose AI is going to be the first to write a hello world in a variety of programming languages?

Google Brings Back Founders Page, Brin to Fend Off ChatGPT Threat - TheStreet

One of our devs had it write a clarion hello world a few weeks back. I dont know if he tried to compile it. He’s had it write several different things - and found it pretty adept as providing a C# class framework, or preparing a process for fixing .

I’ve been looking at the OpenAI codex Code completion - OpenAI API

It’s most capable in Python and proficient in over a dozen languages including JavaScript, Go, Perl, PHP, Ruby, Swift, TypeScript, SQL, and even Shell. During this initial limited beta period, Codex usage is free.

Knowing there are at least 8000 different programming languages in mainstream use, I’m quite surprised they have clarion in the codex.

So where can I find the Clarion Codex?

I doubt there is such a thing - but please report back if you find it!

My testing of ChatGPT3 with writing Clarion code showed it basically had no idea about Clarion syntax. And I told it so. This will no doubt change over time - perhaps rapidly.

I’m waiting for @mriffey to point everyone in that direction.

So how did you test it then? How did you get it running then ?

Hi Richard

I was just using the web interface at https://chat.openai.com/chat

I think you need to set up an account when you first start.

Just to show you I just asked it to write a CRC32 in Clarion. The syntax is all wrong.

It even gets history wrong:

basically as it is now, in my experience you need to not trust its answers at all.

Again, this may change rapidly as it improves.

I saw something about an expectation or demand from the public to get GPT-4 rolled out and OpenAI are being cautious, saying its not going to be rolled out any more quickly than they plan.
I think they are using this current incremental improvement to get a few people on board. I noticed they are pushing Python, which is a very easy language to use especially for novices. Plus I wonder if they have rigged it to use these people and their time testing it to further train it? I wouldn’t be surprised.

Looking at the code, I was trying to place what language it is.

The := is used in mariaDB, but other bits of the syntax dont look right, so at the moment it looks more like pseudo code which is no better than this really:
[MS-ABS]: 32-Bit CRC Algorithm | Microsoft Learn

This is a python crc32 Python-CRC32-Forcer/python_crc32_forcer.py at master · dreamer2908/Python-CRC32-Forcer · GitHub so some syntax from python I would say.

For the written answer, yes its incorrect, but its compressing several paragraphs into a single paragraph to be fair.
Clarion (programming language) - Wikipedia

And in this case, if I were SV would I want it to be factually correct by stating Topspeed? The past tense of “was” developed also implies its not any more, so I wonder if lawyers would have a field day? All SV have to say is they have had a noticeable decline in online sales since this was introduced and it could go to court. This is why Google started to keep quiet about the Google Dance because it started to affect business sales and some online big businesses noticed it alot. Its a grey area when what is in essence your no1 best free online sales person stops recommending you, what do you do, is there a legal case to be made?

It will be interesting to see this develop though.

I sometimes think, this is the mathematical and coding way to make Rorschach tests :wink:

this form of assignment comes from Pascal. The Clarion wikipedia article says Clarion is in the Pascal family so I think it has assumed it uses that form of assignment.

well that would be equally wrong :grinning:

maybe Barington Systems or Bruce Barrington. Topspeed didn’t come into the picture until the 90’s.

1 Like

I’ve just found out ChatGPT-3 has got an MBA now from Wharton - University of Pennsylvania! :astonished:
Christian-Terwiesch-Chat-GTP.pdf (upenn.edu)

Considering this performance, Chat GPT3 would have received a B to B- grade on the exam. This has important implications for business school education, including the need for exam policies, curriculum design focusing on collaboration between human and AI, opportunities to simulate real world decision making processes, the need to teach creative problem solving, improved teaching productivity, and more.

It had to happen though, will be interesting to see if the teaching methods and exam methods change as a result, otherwise everyone will be finding ways to use this AI in their exams. I remember when we couldnt take a calculator into some exams as it was mental arithmetic, but then things like the casio calculator watch and casio scientific calculators started appearing making it possible to cheat if notes were filled into the data banks. If changes dont occur are we heading to a Wall-E scenario? Some high streets and shopping malls already look that way!

No idea about a codex. The GPT convos by one of our guys was posted in one of the Clarion skypes a few weeks ago.

1 Like

An AI robot lawyer was set to argue in court. Real lawyers shut it down. : NPR
Seems the real lawyers considered the Chat-GPT AI to not be good enough to understand the vagaries of law, and I say vagaries because the legal profession isnt specific in some areas because they dont like people getting off on technicalities, which perhaps demonstrates their own entrapment and exploitation when considering law is not taught to the general populace and their costs which makes legal representation a luxury. Thats hardly going along with the “spirit” of the law, that all people are equal under the law is it? :grinning:

(post deleted by author)