SOFIA – Transformer-Powered Fully Integrated Assistant

During the past year, the field of Natural Language Processing went through a Renaissance due to the significant improvements achieved by Large Language Models. While they still aren’t great at creating content they can be quite useful for tasks involving summarization, generation of ideas and supervised decision making. Interestingly, LLMs aren’t just capable of text generation but can also be employed for decision making. Seeing the opportunities provided by those models when used the right way but also feeling limited by having to open an application and interact with them in a dedicated window to then copy and execute the actions and provide the response back myself, I started developing an automated agent for better integration into existing systems.

Performing a more complex task using a terminal would usually require me to search for a specific command, rewrite it for my purpose, execute it and then continue working with the output. The agent automates this process by generating and performing actions like reading / writing files, listing directories, interacting with the user to ask for more information and executing shell commands. It then receives feedback from the action such as the output of a command and decides on how to proceed or to finish the conversation. All critical actions are only executed after user confirmation.

Performing a simple information retrieval task

The agent is based on Meta’s LLaMA3 with 70B parameters and is capable of performing a surprising number of tasks autonomously such as collecting system information, cleaning up directories, changing system configurations and writing and executing code (after user confirmation) to obtain information computationally.

Generating a .desktop file and configuring it for launch on startup
Generating and executing code to answer a computational question

It sometimes makes mistakes, wrong assumptions or generates instructions or code that do not work or do not fulfill the user’s requirements. It is essential for the user to check the agent’s proposed action and request changes or decline it if necessary.

Fixing code, instructing the agent to change its action
Performing a simple inline computation

The agent can be quite useful in everyday automation tasks. As it may make mistakes or generate dangerous commands, each of its actions should be checked carefully by the user before execution. With this in mind, it helps accelerate simple administration tasks that would otherwise have to be done manually.