Taking people out of the loop using AI or hand calculators

When my children were young it was easy to be the big brain – “Papa knows everything”. He can drive, make food, or buy ice cream. It was a bit of a shock once the kids are no longer in elementary school. They start to study math, biology, physics and chemistry. Just ask papa a question and watch him try to remember back a few decades to when he learned that. How many seconds until he comes up with the excuse “I don’t use that in my daily life, I would have to look into that for you”.

The last hold out school topic is math. Papa can still do math and geometry. However, just the other day my youngest asked me to help him. We both looked at his homework and tried to solve for x or y given a couple of equations. I am rusty so it took perhaps a bit longer but then we hit the final question – solve x, y and z given three equations. This is not really any more difficult than solving for x and y but there is more steps.

It was embarrassing to see that I kept making small mistakes on my journey to solve the three equations. It is not that my youngest was doing any better but at least he did know the results. Early on, he used his smart calculator to solve this problem. It is a bit humbling to see a handheld that seems to do math better. Shoot, that calculator can be purchased for less than 100 bucks.

This particular math crisis was fresh in my mind when OpenAI unveiled GPT 3 in the form of ChatGPT. It didn’t seem like magic but it certainly seemed to both understand all of my questions as well as come up with some reasonable answers. It didn’t seem to matter what topic I was focusing on the information that came back was at least relevant, on some topics the answers came back more like a dictionary description.

If my child’s hundred dollar calculator can replace my math skills what can the OpenAI project do? Well, it turns out that it can do a lot. I decided to see if OpenAI could do my sons homework, not all of it just one problem.

solve for x and y when 3x + y = 16 and x + y = 4

To solve for $x$ and $y$ when $3x + y = 16$ and $x + y = 4$ using elimination, we can follow these steps:

  • We are given the equations $3x + y = 16$ and $x + y = 4$.
  • We can add these two equations to get $4x + 2y = 20$.
  • We can rearrange this equation to get $2y = 20 – 4x$.
  • Dividing both sides by 2, we get $y = 10 – 2x$.
  • We can substitute this value for $y$ in the second equation to get $x + (10 – 2x) = 4$.
  • This simplifies to $x + 10 – 2x = 4$, which means $-x = -6$.
  • Therefore, $x = 6$.
  • We can substitute this value for $x$ in the equation $y = 10 – 2x$ to get $y = 10 – 2(6)$.
  • This simplifies to $y = 10 – 12$, which means $y = -2$.

Note: In this solution, we used the elimination method to solve the system of equations. Another method we could have used is substitution, which involves expressing one of the variables in terms of the other and substituting this expression in the other equation.

I guess that not only can OpenAI understand my question but it can also calculate the answer.

Of course with GPT 3 being in the news there have been a lot of different people talking about it. One statement was that his son couldn’t wait to get his hands on ChatGPT. Why? Because he could get it to churn out his homework. The hypothetical answer was to generate a description of Russian disinformation campaign at an eighth grade level. I actually tried it and this is something that ChatGPT seems to excel at, creating definitions or explanations of things. I went a bit further and asked for the same thing but at a college level and ChatGTP was able to produce that as well. Yet, in college you might need or want to document your references and when that was added as a qualifier ChatGPT was able to create references too.

It is not clear if ChatGPT will replace our news anchors on television despite it seeming to have a clearer description of some of the topics of the day. Yeah, but could it ever replace the humble software developers that helped to make it what it is today? I wish I would have kept more of my interactions but I did as the following and I did receive answers for every single thing.

  • Give me an example of a hello world in 6502 assembly
  • Give me an example of a 3 state machine written in java
  • create the methods creating and inserting items into a linked list in C
  • Write a political attack add accusing politician Jane Doe of being soft on crime and fiscally irresponsible.

Ok, I cannot remember exactly what kind of political attack add I asked for but I did give it a few specific conditions and despite knowing nothing about my fictitious politician ChatGPT came up with some text for a fairly mean spirited advertisement.

ChatGPT even know a bit about its heritage. When I asked about OpenAI I found out who founded it and when as well as one of the founders, Elon Musk, had a disagreement and left in 2018.

Are we being slowly (or quickly) being replaced by machines? The situation seems rather like the question “is the US was monitoring all of the internet traffic”. It was rumoured to be so but only after Edward Snowdan revealed how much Uncle Sam was looking at other people information that everyone lost their mind. Off topic, but it begs the question

“is the internet good?”
“Should we be sharing so much with the internet giants to get free things?”

I do think that ChatGPT is a huge wake up just how perilous most professions are to AI coming in and eating our lunch. However, ChatGPT is really good at what it does and just super confident about things it is less certain of.

I actually had a real life problem, could ChatGPT answer it? In my database I had some duplications and cleaning up duplications has always been a bit of a nightmare. I tried to ask ChatGTP in many different ways how I could remove the duplicate records while leaving the originals in tact. No matter how I phrased my question I got this back as a solution.

DELETE FROM employees
FROM employees

The answer almost looks ok, but it turns out that it will delete all records that have any duplications.

My question was specific to Postgres so I did the research myself and if you look hard enough you might even find a solution. This is the solution that I did find.

WHERE (ctid, tableoid) = ANY(ARRAY(SELECT (ctid, tableoid)
FROM (SELECT row_number() OVER (PARTITION BY column_with_duplicate_values), ctid
FROM tab) x
WHERE x.row_number > 1));

This solution is actually much harder to understand but it does delete any additional entries while leaving the first one in place.

Neither the robot from the Terminator movies nor the IRobot from the Asimov’s books are coming for us yet, but the most recent ChatGPT has proven that our computer may understand human communication better than we do ourselves. If you don’t believe me, look at what the business department creates as a specification and what the software developers deliver as a solution.

This entry was posted in Soapbox and tagged . Bookmark the permalink.