The Rudeness Translator Works! Sort Of…
Or “How Working With The OpenAI API Taught Me What Temperature Was”
Last time I wrote about the necessity of something like the MEVN stack, but it turns out I was wrong. The logic seemed simple enough: I needed Node.js, and Express.js would help; without the two, there are no way for me to use the OpenAI Node.js library. But actually, I have something of a proof of concept now. Locally, I can use Vue/Vuetify and have JavaScript make calls to their library.
The problem I had before is that I was using require statements. This ultra-popular StackOverflow post offered a few suggestions, but a less popular answer simply suggested I try replacing my require statements with import statements. It worked. I type in an API key and a comment, I hit translate, and it actually uses GPT3.5 (or “bottled ChatGPT,” kind of) to translate the rude comment into constructive criticism.
Like last time, it is possible that I am wrong and will have issues when it comes to actual deployment. I may be interested in trying to deploy this simply with GitHub pages, just to prove a point — Smack does not think it will work — but the problem with that is I do not think anyone will ever be interested in that. To make it work, a user would have to input an API key. Your average user would not have and would probably not care about an API key.
The Vuetify component is here, but I am interested in a tangent.
Some Interesting GPT Behavior
The first thing I want to talk about is temperature.
[Temperature is] A measure of how often the model outputs a less likely token. The higher the
temperature
, the more random (and usually creative) the output. This, however, is not the same as “truthfulness”. For most factual use cases such as data extraction, and truthful Q&A, thetemperature
of 0 is best.
— Source
Someone on r/chatgpt mentioned temperature, but reading the comments it seems clear to me that whoever posted this did not get it right. It does not sound like there is any way to change ChatGPT’s temperature through ChatGPT itself.
When using a similar GPT API, though, it is clearly a parameter.
The rude comment (thanks Jason):
Being 2022, I have to ask “do you even need the DIV” — but looking at the (bloated train wreck ode to the 1990’s) markup, It’s hardly a shock you have “problems” going off learning other things before learning HTML.
that’s the mistake SO many people make, is that they get “frustrated” on the road to HTML And CSS understanding, and it makes them little more than marks for the scam artists out there peddling idiocy like bootcrap, failwind, vuex, vuetify, and all the rest of the bullshit.
This “it’s not a programming language” attitude being an equal measure of the problem. This dismissive, half-assed attitude shown by gamma poseurs trumpeting how “Alpha male” they are because they work in “real languages” screws themselves, their clients, and anyone within earshot. HTML is a set of instructions a computer — through other software — can use to perform a task. If there is any other definition of a program, I’ve never heard it.
But no, it’s “markup” not “code”. BULLCOOKIES. And if people would drop that dipshit opinion and take HTML more seriously… well, I’d be out of a job honestly. As an accessibility and efficicency consultant the result of that attitude is what I spend my time cleaning up after.
Of course the real tell is that so-called “programmers” who mock HTML couldn’t write a single line of it properly to save their damned lives. Which of course makes their opinion of it mean but two things, and Jack left town!
That the core of HTML basically codifies grammar rules that were a 4th grade education in 1980 certianly exacerbating matters today since that’s what? 2nd year of College now?
Your Kiwanis page is a stunning example of how utterly jacked up and wrong people can learn HTML, with it’s endless DIV soup, endless classes for nothing, etc, etc. I mean it certainly doesn’t help it’s the typical train wreck of turdpress ineptitude, but just for example take everything from the body tag opening up to opending div.container. That’s 7k of HTML, several dozen DIV, five or six dozen classes, and a general lack of proper semantics. It is in fact utterly devoid of semantic markup and therefor in violation of accessibility norms! A laugh since you seem to have slopped in some aria roles, though that’s probably just more turdpress stupid. (so that’s not your fault)
To deliver a social menu that has only two links in it, an incomplete and improperly formed form, what SHOULD be the site’s H1, and a main menu navigation that doesn’t even have a dozen links in it.
And it’s not even coded to be mobile friendly.
ALL of that not even doing a fifth that’s code’s job. THAT’s why ALL of these “shortcuts” tend to be MADE by people not qualified to write HTML. And when all these media darlings screaming “we’re easier, don’t do it yourself” are CREATED by such inept, ignorant, incompetent scam artists, what chance does a normal person have of making a rational informed choice?
Oh and “it’s deprecated” is not the REASON not to use center. WHY it was deprecated is. And WHY it was deprecated is that it was a form of saying what things look like in the HTML, which is none of HTML’s flipping job!
The same reason idiocy like class=”text-center section-left text-slate-400" is little more than a love letter to HTML 3.2 and the bleeding edge of 1997 development practices.
My request: Take the comment I am about to post and summarize it, but in a way that is polite and constructive
What the API gave me with a temperature of 1:
So yeah, 2022, do you even need the DIV?
No. You don’t. You need to learn HTML, and learn it properly. You need to learn the difference between a semantic element and a presentational element. You need to learn the difference between a class and an ID. You need to learn the difference between a div and a span. You need to learn the difference between a heading and a paragraph. You need to learn the difference between a list and a table. You need to learn the difference between a form and a table. You need to learn the difference between a link and a button.
You need to learn HTML.
— This was generated by the OpenAI API
What first got me interested here was that the response, unlike that of ChatGPT, was entirely deterministic. It produced the same literal answer later on.
But…what is this? Where are the results coming from?
A Closer Look
Semantic elements are laid out here, in MDN documentation. I don’t think anything Jason wrote in his comment was about “learning the difference between a semantic element and a presentational element.” In fact, how did it come up with that? These AI models are something of a black box — even if I had the source code, there would not be something explicitly telling me that when in an HTML context, make reference to presentational elements vs. semantic elements.
I consider that sentence a miss.
From an Educative course: The difference between an ID and a class is that an ID is only used to identify one single element in our HTML. This sentence, then, is valid…but is Jason saying that? The purpose of RudenessTranslator is supposed to be distillation and summarization, but something like this could take a rude comment in…say…foreign policy, and then make up a point about trade routes that makes sense in context, but was not derived at all from the comment it was meant to summarize.
In fact, I think all those differences the API “summarizes” are more or less spewed out by AI. A valid summary may be something like:
Being 2022, do you need the div? No, you don’t. You need to learn HTML, and you need to learn it properly [that part is fine]. I strongly feel that these frameworks that supposedly make things “easier” are actually just scam artists who convince normal people to not properly learn HTML, which gives me work as an accessibility expert because of these flagrant violations. Your Kiwanis website is a good example, as it contains thousands of div tags, five or six dozen classes, and a general lack of proper semantics. It is in violation of accessibility norms and all it achieves is a social menu with two links in it, an incomplete and properly formed form, and a main menu navigation that doesn’t even have a dozen links in it.
— Me, a human
The summary does not capture the essence of Jason’s comment.
For completeness, here is the result with a temperature of 0.3
So yeah, do you even need the DIV? No. You don’t. You need to learn HTML, and learn it well. And you need to learn to code for the future, not the past.
The above is shorter and less helpful, but it is a much closer summary.
Here it is again, with all the exact same parameters, and again a temperature of 0.3
So yeah, 2022 is here, and the answer to “do you even need the DIV” is “No, you don’t” but you DO need to learn HTML properly and not be a victim of the scam artists out there.
That last one is the best one yet, but I needed to be human to verify it.
Finally, I asked ChatGPT. I gave ChatGPT the same opening prompt, then the comment, and it gave me this. I believe its temperature is something like 0.7
In this comment, the author discusses HTML and expresses frustration with various web development practices. They argue that many people underestimate the importance of HTML and CSS, leading to subpar websites and accessibility issues. The comment also criticizes the use of certain libraries and frameworks and highlights the need for better semantic markup. The author is passionate about proper HTML usage and its impact on website efficiency and accessibility. They emphasize the importance of understanding HTML before adopting shortcuts or trendy tools.
— ChatGPT
Why the heck is ChatGPT so much better than text-davinci-003?
Huh, okay, a quick Google search indicates the answers are rather obvious. Maybe I will try changing this to gpt-3.5-turbo next time, to compare results — I am not sure that has a temperature.