Making Sense of Rank Tracker Data with Generative AI
Using LLMs to parse massive rank-tracking datasets into automated diagnostic insights and keyword opportunities.
Speakers: İren Saltalı
Content author
22 Nov 2023
Video Transcript
⏱ 15 min read• 2,628 wordsRead the full speech or switch languages
Video Transcript
⏱ 15 min read• 2,628 wordsRead the full speech or switch languages
Thank you. Like Yiğit said, I'm the CTO here at Hop. Yiğit already touched on a lot of what I was going to say. I had no idea he'd do that. So I'm a little mad at him about his talk. But my examples are probably closer to your daily work. I tried to pull examples from your everyday life. Let me start with the goal. How do you turn your data into analyses with AI? You want to run an analysis. All you have is a text. Maybe from your manager, your boss, whoever. Or from yourself.
Really, all you have is one sentence. "I want to pull this kind of analysis." So this talk is about doing that with AI. With LLMs. First, how we get it wrong. Then how we fix that mistake. And how we actually get the analysis we wanted. I probably don't need to explain Rank Tracker here. But basically we track your positions on Google. We call these tools that track all the data around that. Rank Tracker gives you a bunch of things. There are real benefits.
Competitive analysis, ROI, optimization, trends. It can be all of it. But we'll focus on what generic rank trackers don't give you. Your custom needs. We'll work on solving those. Like I said, I went fully practical. Not theory. My stuff is built on use cases. We used IKEA's data. What we call IKEA's data is really IKEA's keywords. We tracked them on WOP. Then we pushed them from WOP into BigQuery. On top of that, we built a few cases. Here's the first one. Find IKEA's high-opportunity keywords in the gardening category.
Rank trackers won't hand you that easily. So we have to run our own analysis on the data. I went in with a very simple prompt. That one sentence is all we have right now. I dropped it straight into the LLM. I said: "Hey, my data is in BigQuery. I want to find keywords where I compete with Amazon and Argos with high opportunity." Of course the AI talked nonsense. Because it knows nothing about the data. "It's in BigQuery" means nothing to it. It doesn't know what the data is.
Look here, it says category gardening. No such data exists. That thing it made up at the top... You're seeing every bit of the hallucination Yiğit described. Because it has nothing to work with. You gave it nothing. That's the usual mistake. You just ask the question. Like it's some godlike force. You assume it already has all your knowledge. Then you wait for an answer. That's impossible. It'll fail every time, just like here. Try it a million times, a million different ways... By the way, it'll answer every single time. That's one of the bad habits an LLM has. It never says "I don't know." It always gives you an answer. It just makes stuff up. Like a kid. I have two kids. I asked my four-and-a-half-year-old something, and boom, instant answer.
He never says "I don't know." That phrase doesn't exist for him. I ask a question, he just goes for it. And he's so confident. LLMs are the same. Zero hesitation. It writes you a query, look. This is a BigQuery query, by the way. So if you really had data like this in BigQuery, this query would run. But there's no data. And it won't tell you "I don't know the data." It just answers. Okay, let's take this a step further. I give it the data. There's this thing called DDL. It describes the database structure. I drop that DDL into the prompt. Then I ask the same question again.
I give it the exact same sentence. And this guy blows up again. Because fields like type and device only mean something to you. They mean something because you know the industry. And without that industry knowledge, this data is meaningless to anyone else too. They don't have the industry knowledge either, so the data is meaningless to them as well. And as I'll show you here. It makes up "type equals gardening." Because it has no idea what type means. In reality, our type here is different search features. Things like organic and featured snippet.
But it doesn't know that either. So we need to push a bit further. The key here is thinking step by step. That could be chain of thought. Or just telling it to think step by step. But first, we need to think step by step ourselves. What does this thing know? What do we have on hand? Which parts can be solved in BigQuery? Meaning, solved with our own data? Which parts aren't in that data at all? So when we think step by step, it comes down to this. First, we need to explain our data to it.
As you can see here. I wrote short sentences next to every part of that data structure. Notes like what it could be, what it is, what it isn't. I wrote the same query again. This time I dropped the gardening category option at the bottom. Because there's no such thing as gardening in our data above. Gardening is something we pull from the keyword's meaning. So if it mentions anything about gardens or yards. It goes in the gardening bucket for us. So we need to understand the words. Okay, what are the words? That's step one. I asked it to pull the words. Specifically, words where we're in high competition with Argos and Amazon. Then we actually put the LLM to work. This time...
This SQL isn't that important. But for the technical folks, it's fully working SQL. Take it, copy it, paste it. It gives you all the data on competitive keywords. Keywords where Amazon and Argos compete. Where they compete with IKEA. You paste it straight into BigQuery and it runs. You see all the keywords here. But what's missing? Categorization. So here's how we keep going. We take the data you see on the left. We take those keywords. Then we feed them into a second prompt.
This time we say: "Okay, forget opportunity, forget Argos and Amazon." We already did that filtering. We already got the data. Only categorization is left. So in the second step we say: "Show me the ones related to gardening." Pick them out. Categorization. It does this easily. It understands all these keywords semantically. So it can pull 10 category-relevant keywords out of that huge pool. That was the first case. Like I said, think step by step. And we need an approach that uses our own data and makes it think.
Second case: search intent. Most of us know this one. It's about reading the searcher's intent. Let's start thinking step by step here. In the first case we dove in without thinking. It blew up. Let's think a bit. Now, where do we get the data? We'll pull it from BigQuery. Nice. Okay? Then who gives us the search intent? The LLM does. Because there's nothing about search intent in our data in BigQuery. Search intent is more of a contextual, word-level thing. First prompt. We hand over the DDL. Like I said, I give it the database structure. Then I say: "Buddy, pull me the top organic keywords." Prompt 2. Now I've got the keywords. The next job is pulling search intent out of those keywords.
But what is search intent? Like I said, we're acting as if it doesn't know. First we have to explain search intent to our friend. Of course, just like in your normal relationships, in your social relationships. What you explain and what the other side hears may not match. Same thing applies here. What you explain, what you meant to say. May differ from what happens when the LLM cooks up its own vectors. So you need to give some examples. Give it the types. Give word-level examples of search intents. That way we really lock the LLM into that train of thought.
Otherwise it'll fail again. By the way, I built all of this by failing over and over. And watching it fail, as I worked through the steps. At the end: buddy, I gave you these three pieces of info. Now it's your turn to run this analysis for me. Let's keep going. This is the first query, same as before. In that first query up top, I gave it my DLL plus the descriptions. Then below I said: "Give me the organic keywords ranking in position one on this date." Domain would be ikea.com. It wrote us a really simple query. And here's what we got back from it.
We got the keywords. Next step. So these are my keywords. Pretty long list, by the way. I dropped an ellipsis in the middle. There are way too many keywords. Now here's the actual prompt. We don't need to read all of it. Just the bold parts will do. What does search intent mean? I grabbed this. By the way, I didn't write this text myself. Let me give you the behind the scenes. I found a blog post about it. Actually, I found two. I handed both to Claudia, the one Yiğit mentioned. I said: "Summarize these." I didn't like the summary. So I had it add a few more things.
Eventually I ended up with this summary. I figured it knows its stuff, so I went with it. So we don't just stumble onto prompts by accident. You don't just say "let me write this prompt. It'll definitely work." It really helps to work on your prompts by talking them through with the LLM. I'm not talking about doing it all alone. Like Yiğit and Yusuf said, use that friend as a brain worker. Summarize this. I didn't like this summary. You didn't mention this. These parts are missing. Basically, beat it up. I'm really good at beating it up, by the way.
Take Yiğit's prompts. I know them because we work together. Super polite. Here's his thinking. If AI takes over someday and starts running us, he wants them to treat him well. Me, I feel a bit safer there. For some reason I'm pretty rude. This is wrong. You failed at this. Why did you write this? I go in hard on the guy. And it corrects itself really nicely. Then I gave examples. Examples for navigational intent, informational, commercial, all of them. I pulled these examples again, by the way. I had it write some itself. I said, give me examples from what you understood. So I checked the first part of my prompt against its own understanding. Then I fixed the top section over and over.
Like I said, this context doesn't come together in one shot. There's a lot of back and forth. It takes repetition. At the end I said what I wanted. I pasted the data from the first prompt, from the SQL, at the bottom. This guy does way too much blah blah. Talks your ear off. In those blah blah parts, it explained navigational intent to me again. Explained a bunch of other stuff. Not what I wanted at all. I could've tuned my prompt to stop that. But I wanted you to see the mistake here.
Like I said, it told a bunch of stories here. But what I actually wanted was navigational search. Informational search too. Examples for every single category show up here. It picked from all of them and categorized them. So how do we do this here? Back to the steps. First, what do you have on hand? You need to know that well. What is your data? What does it show? What's inside it? You need to know this yourself. By the way, you can even learn this by talking to it. You just throw it the DDL and ask what this describes.
It'll read gardening categories for that type. You say no, the type isn't that, it's this. You can develop the conversation that way. Then you need to split the steps out. Which part will the LLM do, and with what? Like I said up front, you can't hand it one sentence and expect the world. What does this thing know? Which parts can it handle at which steps? Which parts should we take away from the LLM and do outside? Here's an example. If you have BigQuery data, don't scan it straight from the LLM. There's no way to do that right now. Maybe we can build very different systems later. But you can't do it directly with ChatGPT.
First you ask it for a query. Then you run the query. Then maybe you feed a CSV sample from the data that comes back. You say, look, this data came in, but that's not what I wanted. Here's what I want. Then you ask it to fix the query, and so on. You work these steps one by one. The final output of one becomes the input of the next. Try to break it on the far left too. You're going to use this constantly. Here's an example. Say you need search intent analysis all the time. Your keywords, categories, and domain keep changing. So try to break it. Throw in words that are hard to find. Words with weird intent.
Tell it to find that. Let it fail. Then improve the prompt so it finds it. Keep trying to break your own work. I break mine a lot. Because once it goes to the client, it can't break. So let it break in front of me. Feed it weird data. Throw Chinese in there. Put German inside the English. Add Turkish. What do you call that? Ask in Turkish, answer in English. Really try to break it. And at every stage, you improve your prompts.
Every break should be fixed by the next prompt. Fix after fix, your final prompt covers almost every use case. So what comes next? This promotion is next. Live Monday. You can pull all your data into BigQuery. No BigQuery console needed. No Google console either. Straight from Word. Is that enough? Nope. Sure, you've got rank tracker data. Fine, but that won't cover every use case. You might have Facebook data. You might have other data in Google Sheets. When you're doing these data analyses, push further. When you're doing data analysis in an LLM, grow your knowledge. Grow your experience. Grow your toolset.
And I'm saying this as a developer, a computer engineer. You don't need me. There are tons of tools. One of them is AirByte. Here's a screenshot. In AirByte you connect two sources. You pipe one into the other. Then you ask the LLM: how do I query this? And it tells you. Without needing me, or the people like me at your company. The computer engineers. Let me cut their workload a bit. We're not always going to fire the marketing folks. Let's fire some other people too. Fire the developers.
Fire them and you can handle all of this. Because these tools are really advanced now. By the way, these tools also give you that DDL I showed at the very start. The database structure. So you can grab it and hand it straight to the LLM. This is my data from Facebook. This is from Google Ads, say. You list them all out. You explain that you dumped it into BigQuery and that you work in BigQuery. Then it blends everything together. And it can hand you great analyses built on cross-referenced data.
The ending doesn't really matter. That's it. If you want to follow me, I'm İrem Salatalı. Thanks.
This transcript was generated using AI speech recognition and verified against subtitle style rules.
