Published Aug. 19, 2024
With the advent of AI chat assistants, I would be remiss not to make my own from scratch.
Named (by itself) after Ada Lovelace, the first computer programmer, ADA (or Artificial Directive Assistant) is a plug-and-play AI framework for converting user requests into back-end operations, built in Python. It can be used with any chat AI API without any amount of fine-tuning; you should be able to use any sufficiently trained LLM (large language model) and experience roughly the same results. The goal is to become less dependent on the model itself, and more dependent on the context in which you build on top of it.
The following is a conversation with ADA that displays some of its basic capabilities, using GPT-4o as its model. The Tkinter GUI is designed to hide "system" messages from the user. These messages include queries that ADA forms to retrieve information, and the results of those queries.
An LLM alone has no access to the internet, and is incapable of true randomization. Therefore, there is information hidden from the user in this example. The next image will show what messages are taken out of the user interface.
Beneath the hood, ADA sends a JSON structured message back to the user if it interprets the request as something the assistant can't do alone, like tell the weather. This JSON message is intercepted by a message parser that either invokes a separate API (in the instance of datetime and weather), or uses functions built into Python (such as randomization). ADA then relays the results.
Here is how ADA was taught what to do in these contexts. Before the context of our conversation, I provided a history of self-assertions for the model, and examples of what to do when asked for things like the weather. There are other built-in features I will examine in future posts.
(NOTE: This image does not include randomization, but the model was given an example similar to these).
Two things to note from the example above:
1. The framework required no fine-tuning of the model. Fine-tuning is like after-market training; if you didn't personally create the language model, you can still retrain it on additional examples of messages and responses in order to shift its behavior. However, as mentioned before, one goal of ADA is to place a focus on using the context of conversations to achieve goals, rather than the model itself. With clear directions as to what format the AI should use, most models can immediately utilize the protocol needed for invoking higher functions (i.e. JSON values), without any training involved.
2. The model used heuristics (i.e. a mental shortcut) for summing the random numbers. The Python code that resulted in the number 8 was not actually ran; it just posted the code it would run, and gave the answer anyways. Given that the LLMs are just a statistical models, it found and gave the most likely answer to that math question without doing the actual math. This behavior is undesirable and extremely difficult to notice. I will explore examples of this in my next post regarding Dungeons and Dragons (a very math intensive game which is perfect for testing AI).
Again, this is just a surface level example of what ADA is capable of, and I look forward to posting a more detailed system analyses. I have explored and implemented countless applications of AI using this framework that I will continue to write about.
Copyright © 2024 Hoffmain - All Rights Reserved.
We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.