How AI breakthroughs turbocharged my day-to-day as an SEO

Published in

This year started as a special one for me. After many years of wanting to learn more programming, it was the first year it actually made it to be one of my yearly goals.

Over time I have been evolving this model from personal OKRs to other ways of doing it, less serious, and at times, more effective. But that’s for another post 🙂

Lately, I have been simplifying my general setup and this year I decided to just have two goals. It was to acquire two new skills, one being trying martial arts (more on the health and fitness side) and learning programming to achieve more autonomy.

I already knew that my go-to way to learning programming would be through CS50, a very well reputed course from Harvard which essentially is an offline class, recorded and made online for anyone to watch.

At the same time of defining this goal, I started getting familiar with OpenAI, and when in November 2022 they released ChatGPT I already saw the enormous real potential of their new AI systems.

Of course I have had the privilege to see the potential of AI at Adevinta for years, but this was the first time I felt it was accessible to the masses in a user-friendly way and for general purpose.

While the initial version of ChatGPT was not nearly as good as GPT-4 today, it was already remarkably good at many things. This hinted to me that maybe I didn’t need to learn programming for my use cases.

Going through CS50

I started going through CS50 during the holiday season in January, at first it was really engaging, the course is extremely well made, by a teacher that truly knows how to teach a difficult thing in an easy manner. It’s not boring and the guy is generally funny and engaging.

That being said, over the following classes I started struggling to keep up with the pace. With work rapidly ramping up in January and the need for time, it was hard to make progress. I don’t consider myself a good student anymore. After finishing university, my appetite for formal learning is always low.

While the CS50 classes are long, they are not that difficult to go through. The “issue” is that you need to constantly be trying what the teacher is doing and that makes each class 2x or 3x the amount of time it takes so it can easily take 5–6h per class (in my experience, of course).

Then you need to add up the exercises, which can take an even higher amount of time. So my calculations is that probably you need over 200h to really do the course properly. That was unfortunately a time availability issue for me, and also let’s be real also something I was not willing to do even if I had that time 🥹

This post is not about CS50 at all, but I am just sharing the process so you can relate. And the takeaway here is that I discovered that I was trying to learn to be a programmer when I actually just wanted to code.

This might essentially sound dumb, but it actually is really relevant. CS50 is a introductory/foundational class in Harvard to learn programming in the computer science track. I just wanted to learn a bit of scripting to build basic scripts, call APIs and do SQL queries. Not build complex software ready for millions of requests per day.

(Kinda) Everyone cooks but not everyone is a chef. I wanted to learn the equivalent of cooking for programming, without having to go to chef school. What if AI could eliminate for me the need of actually learning the specifics of programming syntax.

To some engineers this post might sound weird, and maybe I am what could be called a ChatGPT Programmer, but I think that’s a powerful idea and will only grow from here. It might be in the intersection between No-Code and Software Engineering.

I am a very practical person and always vouch for investing time in the right things. So then…

I drop CS50 and ChatGPT goes nuts

After a few classes, and struggling to keep up, I decided to pause CS50 and focus my efforts in trying to understand if ChatGPT could be the programmer I need.

For those less familiar with ChatGPT, when it first came out it was basically a proof-of-concept for how a general purpose LLM (large language model) could be used in a consumer-facing environment, in chat form.

ChatGPT since then has growing exponentially and like few things have done in history. I currently has more than 1.5B visits per month on the website and more than 40M weekly active suers on the apps.

As you can expect from the article title, yes, ChatGPT fulfilled most of my needs without me needing to invest a significant amount of time to learn programming deep-down.

It’s worth noting that my knowledge of coding and generally understanding things didn’t start from zero. I had some existing coding knowledge but fairly limited, and due to my role at work, I have extensive experience in understanding how tech pieces connect together, what an API is, and so on.

This helped tremendously and it’s likely that not everyone can jump into utilising ChatGPT to it’s max just by reading this post, but it can inspire you to follow a similar journey.

How ChatGPT turbocharged my day-to-day as an SEO

So after this introductory part, let’s get into how ChatGPT (mainly, among other AI tools but I will focus on this one) has improved my day-to-day as an SEO.

For context I work as Head of SEO at Adevinta. While a part of my role is being a manager, I am very hands-on when needed and support the team on a number of very operational and analytical tasks. This is something part of my DNA and I believe it’s the only way to stay in the arena (pun intended, Chamath hehe) 🙂

ChatGPT is a game-changer for anyone that is willing to test it’s limits. So far, I haven’t found many — meaning that I haven’t found a task where ChatGPT hasn’t been able to help achieve successfully.

Disclaimer: I use GPT-4 within ChatGPT. I am a paid costumer because I find this model way superior to the free 3.5 version and also enjoy the stability and other perks of being a paid customer. You might get worse results if using the free version.

My Use Cases

SQL

A very obvious case is doing SQL queries. While I had some knowledge of SQL due to internal courses done at Adevinta and also some practice done outside, the reality of SQL is that having some basic knowledge is not very useful.

Whenever you decide that the Analytics UI interfaces don’t serve you, it usually means you’re trying to face a complex query, often doing operations such as replacements, sub-queries, joins of different tables and so on.

This means that knowing the basics of SQL will not be very useful to achieve your task.

With ChatGPT, that changes dramatically, effectively so far I haven’t seen any limits on these tasks. There is two important points you need to be aware when working on these initiatives:

  1. Share the table’s name(s): inform the bot about the name of the different tables, so that they can probably build the query ready for production
  2. Share the columns value details: you might want do to a quick SELECT * from table_name LIMIT 1 to get an all the column names in the table as well as examples of the values, so that the bot knows what to expect in each column.

One of the most common already established stereotypes in AI is that you need to be a master of prompting to get the right answer. This might be true for certain complex tasks but I can reassure you that you don’t need almost any prompting knowledge to get this kind of things right.

What’s in it for you as an SEO, for example?

This enables use cases such as querying the Google Search Console BigQuery Bulk Export at it’s fullest. At Adevinta we work at scale with ReallyBigData ™️. We have datasets that have billions of rows and growing.

One of the nice findings from improving my SQL skills is how easy it is to spend money on it in such cases, so be careful 😜

One of our sites GSC export table

I can tell you that we’ve built queries together that no analyst could have the patience to build even in hours, in a matter of minutes.

Queries such as the one below, where actually you only see a part of it which has extremely complicated regex based on other tools data, is something GPT-4 is more than capable of getting right… Almost always within two or three tries.

RegEx

Anyone that has worked with RegEx hates it. I personally don’t know anyone who can call him/herself “RegEx Lover”.

It’s probably closer to hieroglyphs that exists in computing. Again, I know the basics but whenever I just think of writing a new one I get a headache. This is yet another thing that ChatGPT excels at. You can get almost any RegEx right in a matter of seconds. You just need to provide examples of what you want to match and in which form, and ChatGPT will provide you with a very nice one to try.

More often than not you will need to try it a couple of times before it properly matches your expectation. But again, this is what I was doing before when copy pasting from StackOverFlow. The main difference is that before I was copying 10 times and now just 2–3.

Plus ChatGPT is way better at providing RegEx for custom needs than StackOverFlow. That one excelled at providing things that are generic, such as “match the subdomain name for URLs not containing a protocol”.

But what if you want to “match all the queries with brand name variations, including misspellings for my brand called X, and only if they contain the word ‘cars’ in it”. This is something that before basically you had to build yourself and spend countless time on a non-strategic exercise that now is just a few clicks away.

And as you can see, these things can be intertwined. You can build an SQL query that has a massive RegEx. I’ve used data from other projects and tools to feed into ChatGPT to enrich the result further. Possibilities are truly endless.

Scripting

Until here we’ve covered a few cases that are mostly valid on the Data Analytics side. But now let’s get into software-engineering-land where you can also feel like you have super powers.

One of the first things to notice is that scripting is way more complicated that doing SQL queries, because of it’s ecosystem.

For this purpose I’ve mainly used a few cloud IDE tools such as Colab, mainly focused in Data Science topics via Python, it’s cousin Kaggle, which also has pretty nice resources available, the platform though being a bit less flexible, and finally Replit, which is more like an equivalent of a real full stack cloud IDE.

Personally one of the most boring things I found when starting coding was all this local environment setup. You could spend hours trying to install all things correctly and all of a sudden something breaks or you get lost. With this cloud-native approach you avoid all that hassle and get directly into producing solutions. Also, you have the possibility to leave jobs running if you upgrade to the paid plans of such tools, which can be convenient at times.

Creating code to run in Colab (main use case) is a similar to what you do with queries, with the added load of having, of course, several more layers that you need to take care of. Installing dependencies, ensuring you’re querying the right API, ensuring you have the right data in the right format, etc. For that, probably there is a longer post that could be done but I will just focus on some basics and use cases.

I’ve built many different scripts that can achieve very meaningful tasks for my day-to-day, such as but not limited to:

  • Scraping competitors auto-suggest feature
  • Running analysis on which user-agents are more accepted in the web
  • Removing metadata from images
  • Finding hidden XML sitemaps in competitors websites
  • Deduplicating lists of keywords
  • Querying a variety of APIs and exporting in CSV

I share a lot of this code in my GitHub account. If you are interested in some that is not there feel free to reach out via DM via Twitter.

All this would have been impossible or very complicated with my existing levels of Python before. It’s true that you need to know a bit what you’re doing and understanding the code, but generally speaking Python code is very self-explanatory so unless you’re doing very complex things, it should be just fine.

If you face an error, just paste it to the chat and it will usually guess what can be happening and offer you a solution to try to fix it.

Another limitation in that part is the fact that ChatGPT is still somehow limited by the number of tokens or words you can provide in the prompt. This becomes more problematic as you build larger scripts, which don’t fit into the prompt or make the feedback loop very slow. I haven’t found a solution yet but patience 🙂

While this should be solved naturally in the next few months due to the introduction of larger 32k token models, it’s something you might want to bear in mind.

I found this process very enjoyable, having built crawlers for millions of URLs, you learn more about edge cases, error handling, multi-threading and other challenges that make me respect developers even more.

I can proudly say that Software Engineering is the second most frustrating thing in life after League of Legends 🙂

Building tools, APIs and other cool things

While scripts are one of those magic initial things, you might not want to limit yourself to just writing 30, 50 or 100 lines of code in a Google Colab, and then forgetting about it.

I knew from the beginning that one of my goals with this was creating tools to help others, and have stable solutions that I could use myself in the future.

For that task, I relied on PythonAnywhere, a mini-cloud for the Python environment. It is simple and it abstracts a lot of the work needed to be done to have a website up and running. I started that within some vacations in the south of Portugal and managed to get several tools life within that time too. I bet if I tried to set it up through a normal cloud I wouldn’t have even finished it after the trip.

This is probably the part I am most proud of since it did not only help me but also others. You can find it here: https://tools.estevecastells.com/

ChatGPT in your phone

There is a really nice trick to improve your ChatGPT usage in the phone and is having the app as one of the main apps in the menu, I put it together with the browser and WhatsApp in my case, and it totally helps with boosting usage.

I started writing this article a while ago and the amount of progress with Voice Mode, Dalle 3 and so on, is incredible, so it will probably be outdated by the time I publish it, but irrespectively, this is a nice hack and it will improve a lot how you learn and consume information.

Conclusion

I wonder what the future of learning will be. But definitely, it will change. Google already changed this a bit but AI assistants at scale will definitely change how we consume information and learn.

Nowadays, I am not sure if what I am doing might not be considered learning, but maybe that’s how things will work in the future? Just learning from the use case instead of starting with the theory. Many universities world-wide are adopting this kind of project and learn by doing mindset since a while ago, so this might just accelerate it.

I want to finalise by saying that I always said that programming is definitely not needed for being a successful SEO, and I maintain that point of view even now where I have acquired way more skills around it, but it can be helpful. Since the investment needed is much lower today, you might want to consider trying it out.