Plato computer

Rhetor-i-Wha!?

In Prof. Kondrack-Caranto’s English 279 class on rhetoric, our first project this quarter was to build a website. My goal was to build a product page for a smartphone app that uses machine learning to assess the rhetorical modes of persuasion used in advertisements, so people can be more informed about persuasion in consumer culture. Here’s how I worked with Gemini and GPT 4o to build Rhetor-i-Wha!?.

I knew I was only working with two weeks time to visualize, realize and complete the project, so I didn’t actually expect to be able to complete a full smartphone application. At the beginning of the quarter, I imagined myself finishing ChroniQuill, the micro-blogging application I started at the end of winter quarter.

For this project, I needed something more self-contained. I thought, even if I didn’t complete the vibe-coded smartphone app, I could still turn in the product website. So, I designed a sample product page using Affinity Designer, crafted a cute logo (Henny Penny is the font), threw together an icon evoking a gazing eye, and went for a bike ride around Lake Washington and Lake Sammamish. It was a beautiful day not meant for wasting indoors engineering prompts.

Knowing that I had a fall-back plan in case I frittered away my time (there were more bike rides, I admit), I spent most of the next week trying to figure out how I was going to accomplish my goal of having an actual Minimum Viable Product as a companion piece for what seemed to me to be a fun, but otherwise not very exciting project. Rather than a smartphone app, I would see what was available for use with WebGPU and running the model on a desktop computer, which would presumably have more resources and wouldn’t require me to spend money on API calls.

All Creativity is Storytelling

Coincidently, this was when ChatGPT was going through its Sycophancy Phase. Thankfully, Google was consequently offering almost two years of free AI Studio with Gemini 2.5 Pro Preview to college students (offer good until end of June). Having read that DeepMind’s coding model was topping the charts, this seemed like an excellent opportunity to test out alternatives. The Free Market wins again.

My initial attempt with ChatGPT 4o started off well enough, but the model started repeating itself after generating some promising code that leveraged Hugging Face’s transformers.js and OpenAI’s CLIP image classification model.

I turned to Gemini 2.5 Pro, which had been receiving rave reviews despite its generally lackluster productization, at least, in comparison to the slick presentation of ChatGPT. (For instance, sharing the link to this chat required me to copy in bulk, 14 separate links, each with their own set of permissions, including individual links to 13 code and graphic files I’d included as part of my conversation history.) My conversation with Gemini proved fruitful, and we quickly squashed the bugs in ChatGPT 4o’s code, leaving me with a strong proof of concept.

Back in Affinity Designer, I worked up a design for the full website that turned a product description site into a product in itself. The design turned out to be more complex than even Gemini was able to reproduce in one go, so we spent the weekend finishing up and fine tuning the project into a rhetorical pedagogy extravaganza. (I received an extension for the project, initially due on Thursday the 1st of May, which gave me time for another bicycle ride, this time out to Issaquah on I-90 and back on SR 520.)

The final product uses flexible design patterns to respond to window changes. It’s not particularly smartphone friendly, but to the best of my knowledge, Chrome on Android may theoretically be capable of running transformers.js, it is not very reliable yet. In any case, I don’t have an android phone to test it on.

The images were all generated by ChatGPT 4o, which is in rare form these days as an image generator. The audio files of Plato reading the results of the classification were generated by OpenAI.fm.

Technical Details

In my testing, Rhetor-i-Wha!? works well in up-to-date Chromium (Chrome, Brave, Opera, etc.), Gecko (Firefox), and WebKit/KHTML (Safari) browsers on Windows and macOS. Error checking is minimal, though, but the interface should give good guidance as to its status and function. It’s meant to be a pedagogic experience that guides the learner through the process of learning about the forms of rhetorical persuasion.

The most interesting part of this, for me, was where Gemini talked me through setting up a Cloudflare Worker to access LinkPreview‘s service for accessing Open Graph meta tags. Open Graph is a standard developed by Facebook that allows for web designers to share meta tag information to appear in social media posts (it’s now much more widespread). I had no idea this was even possible until Gemini suggested it might be a way to make use of LinkPreview’s service.

(If you want to watch this in action, just paste the URL of Rhetor-i-Wha!? into the Analyze URL field and it will process the Open Graph preview image Gemini and I added. “The unexamined life is not worth leading,” and the analysis website that can’t analyze itself isn’t worth building.)

A foundational goal for this project was to do everything in the browser. I decided there was no reason to complicate the project with creating a smartphone app, even one that didn’t work very well (an early idea I discussed with ChatGPT was simply mocking up a non-functional app that just randomly displayed logos, ethos or pathos message in response to anything it was queried about).

I’ve been itching for a project to try transformers.js on, and it was thanks to Gemini’s insistence that it was not only possible, but that it would walk me through the process and help me implement the feature, that gave me the confidence to expand the scope of the website from identifying uploaded images, to identify images identified by URL.

As to the veracity of the model’s image classification, the model card says, “The CLIP model was developed by researchers at OpenAI to learn about what contributes to robustness in computer vision tasks. The model was also developed to test the ability of models to generalize to arbitrary image classification tasks in a zero-shot manner. It was not developed for general model deployment – to deploy models like CLIP, researchers will first need to carefully study their capabilities in relation to the specific context they’re being deployed within.”

I’ve found it to be not entirely useless as an image classifier (in this context, it’s only testing ethos, pathos and logos content, which is unlikely to have been directly tagged, though there is no shortage of writing and media critique on the public internet with examples of rhetoric in advertising. It’s likely the models picked up some of this information in training. So, to the extent that this demonstration is accurate, public writing online and in literature are the likely sources.

On Hallucinations

Hallucinations in LLMs are still very real, and Gemini is one of the most prolific confabulators (as seen in social media memes sharing Google AI-Overview errors, such as the infamous “glue on pizza” and “eat one rock a day” results). Personally, I find this to be a tremendous value that LLMs provide. I don’t want a perfect answer machine. I’m old enough to remember the Pentium division bug. Computers and programs have, in my experience using them since the mid 1970s, always been inaccurate and often unreliable: just like people.

In writing this up, I’m noticing that Aristotle is more associated with Rhetoric than Plato, and I use Plato as the guide through this. Not Professor KC’s fault. LLMs may be prolific hallucinators, but they’ve got nothing on 60-year-old me.

In the end, decided to keep it about Plato (Socrates’ student and Aristotle’s teacher), while acknowledging that Aristotle identified the modes of persuasion, in his treatise on Rhetoric.


The code and images generated by AI models are not copyrightable under US law. This project including the images and code generated by me are released into the public domain. Share and enjoy!


Posted

in

by

Tags: