January 2023 - August 2024
Python Flask Fly.io Redis OpenAI HTML CSS JavaScript

NotYourVocab is my pride and joy. Enjoyed by users in over 10 different countries, NotYourVocab was one of my favorite projects to show off - it’s flashy, easy to understand, and has a clean UI. It is also my longest-maintained project, with constant upgrades to the models, UI refreshes, functionality improvements, and backend performance and quality tuning. NotYourVocab is provided at no cost, with all API expenditures financed out of pocket, sharing its humor and entertainment while removing barriers for productive and professional use. Read about the original philosophy and motivation here.

What exactly
is
NotYourVocab?

Simply put, it’s a sleek site that allows users to quickly upgrade their diction level. Just input your text in the first box, select a diction level, optionally add fluff (additional filler words), and click the button! A response is generated in a matter of seconds.

How cool is that? Can you tell I’m also a video editor?

The site is intended to be accessible, providing minimal points of friction for the user. There is a simple instruction set — not much additional information is needed. And who knows, maybe I used the service to write some of this text... :)

Let’s get technical

The site uses a Flask backend hosted on Fly.io, running the Python backend and main logic on a single machine. There are client-side checks (and server-side checks, try to find the Easter egg ;D) for input length to stay within acceptable input bounds, and to prevent me from going bankrupt. On the client side, there is an underlying form submission when the user presses submit, some may go so far as to say that a POST event occurs. A local Captcha check is triggered and some information from the result is sent with the form submission, for server-side verification of the Captcha result.

The value of the diction level slider determines which prompt is appended to the inputted text for the OpenAI API request. Currently, the backend uses the GPT-4o model. The backend is kept updated with the latest version provided by OpenAI.

Prior to submitting the request to OpenAI, a function stores the requester’s IP address in a Redis database to effectively rate-limit potential spam on my 256MB RAM application. Each IP address expires after 3 seconds and isn’t stored or transmitted elsewhere.

The OpenAI request is sent, and the reply is processed, cleaned, and returned to the user through Flask’s make_response(). On the client side, a bit of JavaScript displays the text in the output field.

Two interesting quirks came to light while creating this documentation. The first was discovered when I was writing the portion about NotYourVocab’s non-English language capabilities — turns out, during the cleaning of the input strings, I was filtering out all ASCII characters, which obviously excludes characters from other languages, rendering NotYourVocab as an English-only engine. The second, more subtle quirk was the Redis IP filtering prior to Captcha verification, which in my opinion, should happen first.

Motivation

What exactly spurred the idea for such a project? Was the initial goal to provide a free service for many to enjoy and improve their diction? Surprisingly, the answer is no, though it has since expanded to become that and much more. NotYourVocab began as a continuation of a longstanding inside joke among my friends and me, where we would rely on heavy diction in normal and everyday scenarios. For example, “This calc homework is impossible.” would turn into: “The assignment provided henceforth in the calculus subset of the field of mathematics is proving to be quite the intellectual stimulation.”Logically, the next step was to create a tool that could easily generate such rephrasings. My friends now use it in text conversations, professional emails, and even homework assignments (don’t tell my school). What started as a fun and thought-provoking game has turned into something beyond me.

As a non-native English speaker, the website proves beneficial for improving grammar as well. The beauty of LLMs is that they are great conversationalists and, as a result, produce a few useful byproducts. For example, the response you get is likely to be capitalized, properly punctuated, and with grammar fixed. Considering that there are many users of NotYourVocab outside the US from countries where English is not the primary language, this website can be a useful tool for those learning English. Furthermore, NotYourVocab works with any language that GPT models support, thanks to OpenAI’s models having multilingual capabilities.

So, does NotYourVocab live up to its standards, ideologies, goals, and motivations?

Verdict:
Absolutely

NotYourVocab has exceeded my initial expectations for its impact. NotYourVocab’s achievements are a source of pride, and its future is exciting. I’m not only pleased with the site’s quality, stability, and design, but it’s also gratifying to offer such a product for many people to enjoy free of charge. The overwhelmingly positive feedback and support I get for this project further solidifies my enjoyment of continuous development.