Krushi Raj Tula / Writings / Ai and llms opinion /

Image generated by LLM

My Opinion on AI and LLMs

March 17, 2024

10 mins.

Technology tags:
aillm

AI and LLMs - What do you need to know?

Intro

We see a boom in usage of AI, LLMs and chatbots in recent year. People have been astonished with the results that we are seeing from these, this is surely a disruptive tech. But, we all have the same question, “How far can the AI go?“.

We have a vast area of expectations where AI can go, what AI can achieve and what it can do. Let’s not get into predictions zone now. We will look at what AI can do now and how will it effect us.

What can AI do now (not in future)?

In principle every AI that we had till pre-LLM era was a niche AI i.e., we had an AI specifically for playing chess or cards based games, we had AI just to run a car or drone, we had AI to detect anamolies in the images, we had AI to do something very fast when compared to a average human in a specific field. But with the introduction of LLMs we are seeing buzz around AI being able to do almost everything. People are claiming that AI is like a super-human that can do almost everything for you. Be it in the writing copies or code, reading large texts, generating images, videos and a lot more to mention.

So, does this mean it can do anything? People always had this question of “Will AI replace us?“. It wasn’t just a threat for a single field or profession it was considered a threat for almost every field and every profession out there. Because, why not, now it can write marketing posts, blogs, read enormous content and summarise in no time when compared to humans, generate images, video and audio in just few seconds, can write code to build applications. It is natural to think that we might get replaced by the AI in the near future.

Will AI replace us?

I would like to start this with a famous quote (allegedly by Elon Musk, I couldn’t find the reference video or tweet for this) that says, “AI won’t replace you but the person using AI will!”.

What did he mean by that? Will AI not replace us? Are we still pioneers in the game?

To understand that we must have a basic understanding of how current AI tools work and how LLMs work at the fundamental level. (if you want to dig deep on this top, What Is ChatGPT Doing … and Why Does It Work? is a good article). In simple terms LLMs are being trained by lots and lots and lots of data, from this data it builds a probabilistic next possibilities when it sees a series of words. It guesses one word at a time, with good probablity. As it is trained on a very large data, it seems to be guessing right words in the series.

Let me give you an example or an analogy. We all learnt our mother tongue without proper learning of grammar or vocabulary for that language. How was this possible without formal education on that language? It was because we have been listening to it for a very long time and we have been habituated with the patterns and we just make guesses with some high probability (so we have been fed with large amounts of data and our brain does a guess work). In theory the same thing is happening with the LLMs.

Bionic Reading is another example to show that we think just like what LLMs do now. We try to predict the next word. I know, I know you might argue that how is it same or that both are completely different. Just take this analogy. When you open the link for bionic reading above you have 2 paragraphs, while reading your brain constantly tries to predict the next word, by making emphasis on just parts of the words it increases the prediction confidence for most of the words and you try to predict faster hence read faster. Also bionic reading doesn’t work well if you don’t know the words, or if you are seeing the words for the first time. Which means your brain was never trained on that new data and it couldn’t predict it. Same would be the case with LLM, it needs to data to do something.

With this, one must realise that it can only create from what has been fed to it. It still doesn’t have the ability to create something completely new on its own. So if you’re thinking that it can create anything better than humans, you’re wrong, because it only can work on the data it has been trained with, nothing new will be created.

How can one make use of AI?

Now that you’ve known that AI/LLMs you see these days are basically some program that has access to large amounts of data. With that you can take it to advantange that you have access to such enormous data at your fingertips.

  • Consider it as someone who has access to large data to lookup before writing something
  • It can be an intern for your work (I will tell why I called it intern)
  • It can be a pair programmer that has access to a lot of already written code, algorithm patterns and docs
  • It can be an assitant to get tedious tasks done based on the existing data/work
  • Any role that can be performed with the work that has already been done to do the same again or in a similar way

Some examples of where it would work and where it wouldn’t:

AI as a developer

If you want to create a new app with the help of LLM. If you ask it directly to build an app for you with a feature list given. It will give you some basic setup with some mediocre code. But if ask specifics about it, then the AI will give you better answers but not all the code. Now trying asking even more specific about a minute problem. Use the proper vocabulary and proper jargons, now you will see the answers which feels like it is coming from an expert. An example for this would be the following, I want it to write a smart contract for me

  • Ask it write a code to create an NFT smart contract where it distributes another ERC20 as dividend

    • You won’t really get code for this, as the data it got trained would probably not have enough data for this
  • Now ask it for a code to create and NFT with ERC721, 721 Enumerable standards, also an ERC20 abstract factory usage, where it can accept ERC20 tokens for exchange of NFTs, then distribute the tokens to all holders

    • You would now get a better code but not completely working
  • Now ask it for a smart contract class where we keep track of all the holdings of NFT and ERC20 tokens. Then use a function to calculate all the distributions, a function that calls send function in ERC20 to distribute the tokens. Use proper storage and memory on the blockchain to store the holdings and distribution data.

    • Now you will get some really good code, you might have to still work on it

The reason why people feel like AI is working is that the queries they are asking are from pre-trained data. Whatever the code you get from code related AIs like GitHub or Open-Interpreter or Devin, it is all based on the existing code base. The reason why it wouldn’t work better with writing smart contracts is that it is fairly new topic with not much data for training on this when compared other areas in development. This would also be the same case if you want to take help of LLM to design a new ML model. Unless you use proper vocabulary and ask pin pointed questions all you hear from it is to use a Neural network or basic regression model.

AI as a writer

Consider you are writer who write blogs, books, news articles, copies for marketing. You want the AI to do your job. Now lets take a contemporary event, say current of Gold price soaring and you want it write an article about it.

  • Ask it directly to write a news article about the soaring gold prices in the current month.

    • It will give you a news article but it might not have a proper structure and it won’t give out really any good information
  • Now ask it to go through previous events when the gold prices were up and compare those events with current day and ask it for an analysis on that. Also mention to have a proper template followed by most news article writers

    • Now you will see some good structured information and stats that could help the readers
  • Now tell it about your view, ask it to rewrite in the tone of your choice. Ask it pull up the historical data and also cite all the references from previous news articles. Ask it pull some data points like GDP, Per capita income, inflation, gold reserves, currency strength, political events etc., and then do some proper analytics on the data points and deduce the insights.

    • It will now give you one of the best article with all the data properly used with a proper structure which is almost ready for publishing.

The key takeaway is that you must have minimum knowledge about what you ask, use proper vocabulary so the guessing works with correct phrases on LLM. More the data and specifics you mention better the quality of the answers because of better picking of next words in the series of words it generates.

LLMs are just autocomplete on steroids - Linus Torvalds (reference https://youtu.be/VHHT6W-N0ak)

Endnote

AI is not some silver bullet to tackle all things. It is just a new tool which better at doing things. Make use of it to boost productivity, for example a piece of code that you’d write in 1hr, with the help of AI/LLMs you can get it done within 20mins or so. Get the basics right, put LLMs into work to make your work faster. It will boost your research speed by 10 folds. It will help you comprehend large texts without losing important information. So think of AI as an assistant that does the heavy lifting for you when you instruct them in the proper direction and help you all along.

We also made an episode on how AI and LLMs are being used and can be used, you can listen to it here


Krushi Raj Tula

By Krushi Raj Tula A developer, geek, enthusiast, who loves to solve problems and fix things with technology. You can reach out to him on Twitter!