DEV Community

Cover image for Brave New AI-World
Tiago Souto
Tiago Souto

Posted on

Brave New AI-World

The world is continuously changing. Since the dawn of time, the entropy and evolution are non-stoppable. From the void, comes the energy. From the energy, comes the matter. From the matter, comes the most things we know. This endless cycle of processing and changing lives on until the present time and will continue until we're no longer here to witness. And, as nature-made beings, we are part of this cycle and we apply this concept to our daily-basis tasks: we changed the way we create fire, harvest food, and craft shelter. From caves to pyramids, and then buildings that reach the sky, our society changed and so did our needs and capabilities. We created machines, computers, and the internet. And recently we've just created something that will change our society from now on. We created the Artificial Intelligence.

Among a billion people, there's a small self-consciousness grain of sand that I call "me". Just a random guy who started studying HTML and CSS as a kid to play around creating some games webpages, who a few years later would improve those skills to be used no longer as a play, but as a professional.
After many changes and transitions in my career, recently, I came across an unstoppable change that'll affect all. Especially us, who work as developers and software engineers. And as you can already guess, I'm speaking of AIs.

The First Steps

Image description

My first professional contact with AI happened in 2023 when a company I worked for as a contractor wanted to build a feature for content summarization. At that point, I was already longing so much to work with it, as I've been having a lot of fun as a user with ChatGPT, Midjourney, and others, had lots of ideas in mind, and I knew that's where our future as professionals is towarding to. So I started following tutorials to learn some basic concepts and finally started working on this feature. It was originally written in Python by a very experienced developer, and my goal was to fully understand this code and translate it to TypeScript. He explained to me how it works and introduced me to some tools like LangChain. So my first challenge was finding the correlations between LangChain's Python and JavaScript APIs as they are a bit different. Also, as I had almost zero experience with Python, I had to learn it a bit to understand how to translate the logic to TypeScript.

It was really fun to work on this and it took me just a few hours to fully convert the code and get it up and running. So our summarization feature worked pretty much as expected.
Working on that feature was pretty fun and I kept studying LangChain and ML in general. I ended up finding a cool tutorial that taught me how to build a web app that generates a title and description for an uploaded video using OpenAI model.

This app consists of uploading a mp4 file, using WebAssembly to convert the video to mp3, then using OpenAI Whisper to transcript the audio to text, and finally using OpenAI GPT 3 to generate the title and description. It simulates a tool that could be used by YouTube content creators to automate some parts of the process of uploading videos.
Originally the tutorial used Vite and a NodeJS server, but I followed a different approach and created a NextJS app, dockernized it, and added a few more features. It was pretty fun.

You can find the project in this GitHub repo: https://github.com/soutot/upload-ai

The Real Challenge

Image description

A few weeks later, I was about to start a new project, when I got the opportunity to work on a simple chat app using OpenAI. I did that using my previous knowledge and the result was pretty nice, so more features started being requested. First, upload files and send them as context, then experiment with different LLMs, adding different integrations with third-party APIs, and different tools and features. I started learning RAG, vector stores, and retrievers. I had to learn a bit of Python. I learned different ways of generating data sources to be consumed by the LLMs and of RAG limitations. I have studied so many different things in really a short period. But it was so satisfying that I could see that kid back in time learning the first HTML tags and CSS styles to create web pages for fun. I was really having fun learning all of this.

And, in the end, this experimental app became a real project.
This is so grateful, and I'm glad to have the opportunity to work on things I believe are going to be our new way of coding.

From this project, I could learn really a lot of things in a very short period. I deep dove into LLM and RAG concepts, read a ton of articles, code samples, and tutorials, watched countless videos, and I have no idea how many hours I put into this. But the result was satisfying.

The Goal

Image description

In the past, I used to contribute more to the dev community by answering questions on Stackoverflow, Facebook, and Slack groups. Actively participated in events, contributed to open source code, and I also wrote a few blog posts to help people.

The past few years I stepped out of this as I was focused on other things of life and career. And, also, I was missing a topic that I believed I could contribute.

As I was studying all this AI subject, I felt it could be an opportunity to share what I've learned (and still learning) about AIs from a software engineer perspective. There's already lots of new content every day on this subject, but I guess I can contribute with my 2 cents. And that's what motivated me to decide to write this series of posts. I'm far from being an expert and there're still too many things for me to learn, to revisit, and to realize I may have misunderstood. But given all the content I had contact with and the experiences with real-life projects, maybe it can be helpful for somebody, or at least for my future self.

I guess that's it for now. Just wanted to provide an overview of myself and how I got into this, and point this will be more like a learning process than a tutorial. So I recommend you keep your expectations lower, but I hope I can contribute somehow with knowledge.

See you in the next post.

What's coming next:
Part 1: Introduction Concepts
Part II: Tips for using GPT and Copilot as a Developer
Part III: Creating a chatbot with OpenAI GPT Model (NextJS)
Part IV: Creating a RAG chatbot with LangChain (NextJS)
Part V: Creating a RAG chatbot with LangChain (NextJS+Python)
Part VI: Using Images for RAG (NextJS)
Part VII: Evaluating your RAG with TruLens (NextJS+Python)
Part VIII: Evaluating your RAG responses with Ragas (NextJS+Python)
Part IX: Evaluating your RAG responses with custom LLM (NextJS)
Part X: Using different LLMs: Llama2, Mistral, Claude-3 (NextJS)
Part XI: Improving your RAG responses (NextJS)
Part XII: Introducing to LlamaIndex (NextJS)
Part XIII: Serving self-hosted LLMs with vLLM
Part XIV: Working with different vector stores
Part XV: Knowledge Graphs for RAG

Top comments (2)

Collapse
 
valdecircarvalho profile image
Valdecir Carvalho

Muito bom o seu texto! Adorei. Aguardando os próximos posts. Parabéns Tiago

Collapse
 
tiagocsouto profile image
Tiago Souto

Obrigado, Val! Se tudo der certo, vou fazer 1 post por dia sobre essa série. Espero que os demais sejam úteis para você.