5-min Smol AI Tutorial

Every so often, there comes a project that shows us we are merely scratching the surface of generative AI, and Smol AI is a prime example of such an endeavor. Lauded as one of the fastest-growing open source AI projects, it amassed over 8,000 stars on GitHub in just five days. But what is Smol AI, and how can you use it to build applications quickly and effectively? This step-by-step, user-friendly guide offers a brief smol ai tutorial.

What is Smol AI?

Smol AI is a cutting-edge software that, quite literally, writes code for you. Think of it as your pocket-sized engineering team, capable of building out entire codebases for simple to complex applications. From creating a calculator app to an entire snake game, Smol AI does it all.

How does Smol AI work?

Using Smol AI is a fairly straightforward process, divided into a few distinct stages.

  1. Pass your requirement into a prompt: This stage involves generating the architecture of the app. Smol AI takes your requirements and transforms them into a blueprint for the application.
  2. Generate a list of dependencies: Smol AI then creates a list of dependencies so that it can understand the functions and variables across different files.
  3. Generate the code for each file: Lastly, it utilizes a for loop to pass on both the requirement, architecture, and dependency to a new prompt to write the code for each individual file.

However, bear in mind that, as of now, Smol AI is not bug-free. Quite often, it may generate some codes that require manual modification to run properly.

Setting up Smol AI

Setting up Smol AI is simple and involves the following steps:

  1. Clone Smol AI's GitHub repo on your local machine.
  2. Open the cloned folder in your visual studio code.
  3. Rename the example.env file to .env and input your OpenAI key.
  4. Install Moto, a cloud computing platform on which Smol AI runs.
  5. Run Smol AI using the provided command line.

To avoid exceeding OpenAI's rate limit due to multiple simultaneous API calls, you can use a modified main.py code, which includes a delay between API calls.

Gathering Product Requirements

To ensure Smol AI produces the results you want, it is recommended to add a detailed product requirement document. This document should include core functionalities, interface descriptions, as well as file structure. You can create a Markdown file (.md) and put all product requirements in it for easy updates.

Running and Debugging the Code

Once you have gathered your requirements and run Smol AI, you will find the generated file under the "generated" folder. If you encounter any bugs or errors while running the code, Smol AI offers a debug mode where you can analyze potential errors and get suggestions on how to fix them.

Conclusion

While Smol AI, in its current format, might not completely replace a full-fledged developer or engineer, it still holds exciting potential. Especially for product designers and managers who need to quickly build and test product ideas with real users, it's a valuable tool. As the AI ecosystem continues to evolve, we can envision a future where a complete AI product team could carry out experiments autonomously.

Dive into the world of Smol AI, and you will find it a revolutionary step towards the 'no-coding' future. Give it a try and feel free to share your experience or any creative application ideas you have with Smol AI. Happy coding!