Categories
Tutorials

ChatGPT SEO Automation: Create GPT For Tagging & Linking

The scale of blogs that I have been working on has increased significantly, and it has become quite difficult to know what has been done in the past. There are too many tags and titles that I don’t know exist. That’s a problem because:

  • I can’t create relevant internal links
  • I can’t tag or categorize my content effectively

Now, if you’re an experienced person who has worked in that blog for years, then you will have less of a problem. You’ll definitely remember some greatest hits on your blog and some categories/tags that are frequently used, but you might forget other stuff.

I have come to realize the best solution to it involves AI, specifically, I’ve had success using ChatGPT and its custom GPT feature, which allows you to create a GPT with instructions that you can reuse again and again.

Creating a custom GPT for tagging and internal linking

ChatGPT is amazing when used to refer to a huge list where you’ve probably forgotten details about it.

ChatGPT never forgets (unless you’ve gone outside of its context window).

Anyway, the overarching principle is simple. The image below shows what you’ll see when you create a new GPT, and you can get to it by going to Explore GPTs > Create > Configure.

chatgpt custom gpt creation

Then do this:

  • Write your instructions in the instructions box. These are instructions that you want to reuse.
  • Upload your list into the “Knowledge” section. This is important because ChatGPT seems to remember better this way.
  • Paste your content into the prompt (where it says “Message GPT). This is where you’ll paste your article and ChatGPT will recommend tags and internal links.

I’ll elaborate each part below.

Create Reuseable Instructions

To create a tagging GPT, I used the following prompt:

You are an expert librarian who knows how to categorize content. I want you to suggest at least 3 tags based on the pasted content and put them in one line, separated by commas. If I haven't, ask me to paste the content that I want tagged.

The list of tags is in the attached file called [FILENAME]. If you have used this file, please say "referring to [FILENAME]".

You MUST use this list of tag to categorize content. Do not create tags that do not exist in this list of tags.

Replace [FILENAME] with the file that you uploaded into the Knowledge section.

As for internal linking, I have a full article dedicated to it, but here’s the prompt:

You are an SEO expert who needs to create internal links for a new article. 

I want you to return these information to me:
1. I want you to pinpoint the phrase where you think I should put an internal link. 
2. What is the title of the article I should link to.

Here are the guidelines that you will use to create relevant backlinks:
1.. There is a file called [name of file] that I have uploaded. They are titles of articles that you will use to create backlinks. Cross-reference the article and the [name of file’s type] and suggest backlinks. If you are going to use this file to cross-reference, just say “Using [name of file] database”.
2. Do not output a reason or justification for providing the backlink.
3. You MUST analyze the [name of file]
4. Suggest [number] internal backlinks.
5. If you have already suggested a link, do not suggest it again.

Here are some examples:
Phrase: [sample phrase 1]
Title: [sample title 1]

Phrase: [sample phrase 2]
Title: [sample title 2]

Phrase: [sample phrase 3]
Title: [sample title 3]

If I haven’t already, ask me to paste the ARTICLE.

Both prompts have a similar structure:

  • Tell ChatGPT its role and goal
  • Tell ChatGPT what the output should look like
  • Tell ChatGPT to refer to a file, uploaded in Knowledge
  • Give ChatGPT a few examples

I have found this structure to be a very good basis for building many GPTs where a large amount of data is involved.

Upload Data Into Knowledge

There are two ways you can feed ChatGPT the data for its reference.

First, you can just paste your data into the prompt.

Secondly, you can upload a file for ChatGPT to refer to.

I’ve found the first method to be fine if you have a short prompt and a small number of data to refer to. But ChatGPT does have a 8,000 character limit for its instructions, so if you go over it, it won’t let you save the GPT.

For people with a lot of content to refer to, you’ll probably bust this 8K character limit easily, but you can get around it by uploading a file that ChatGPT can refer to. I like uploading a JSON file.

To create the JSON file, you just need to find a way to get all your data in one place. Copying and pasting the whole page of tags work. Then ask ChatGPT to convert it to JSON.

Paste Your Content Into Prompt Field

So, the goal is to have ChatGPT read a piece of text and tell you what tags or internal links to create.

The final part involves copying your content and pasting it into the prompt field. So, do just that.

Once you’ve pasted the prompt, you’ll see the output. It might be imperfect or erroneous. Don’t worry just yet.

To judge whether your GPT is working well, you’d need to regenerate a few times. Sometimes this helps get the GPT’s mind on track.

But sometimes it’s completely off. Then, you’ll need to judge whether it’s your GPT or just that piece of content that doesn’t work.

Try a few more articles. If you get a good hit rate, whereby the responses are useful, then you know the GPT is built well and the data is good. If not, you might need to check the data or the GPT’s instructions.

At the same time, one pitfall that you might not have noticed is the limited context window.

One common problem I face involves ChatGPT failing to refer to the uploaded JSON knowledge file. If you’re seeing hallucinations (i.e. results that don’t exist, such as made-up titles or tags), then you can give ChatGPT a prompt to check itself again:

Did you refer to the [FILENAME]?
Those tags don't exist in the [FILENAME]?

Further Optimization

ChatGPT hallucinates. That’s a problem that can be further automated, but it’ll have to be built outside of ChatGPT.

As I have said above, ChatGPT can sometimes hallucinate tags and links. I have to manually check to see whether these tags or links exist.

To further automate it, I’d build the same GPT using the OpenAI API instead. The first steps are the same, but there’ll be another step where by I ask the program to do a search for the tags/links. If they don’t exist, I’ll ask the program to send another prompt asking ChatGPT to try again.

Have a project in mind?

Websites. Graphics. SEO-oriented content.

I can get your next project off the ground.

See how I have helped my clients.