Batch Anchor Text Generation Notebook with Gemini, Claude or OpenAI
Writing anchor text for hundreds of link candidates is where a large language model earns its keep. This Google Colab notebook sends each source and target pair to the model you choose and brings back anchors you can review before anything is used.
What it helps you do
- Pick Gemini, Claude or OpenAI, with your own key kept in Colab secrets
- Start with a shortlist of your strongest candidates, about 20, and adjust the prompt until you like the output
- Give the model the real page content, collected with a custom extraction crawl
- Get anchors with confidence scores and QA flags for repetition, over-optimisation and irrelevance
- Review them in the notebook, then run the rest and export one file
A written walkthrough of the lab comes with it.
Where it is used
Lesson 3.6, after the prompt design and cost lesson in 3.5. Expect to go back and forth on the prompt a few times; that is the point of the shortlist.
It comes with the AI-powered Internal Linking Audit and Automation course, led by Sam Torres. If you want to build the whole pipeline from audit to measured links with her, that is the place to start.
What’s included
- Choose Gemini, Claude or OpenAI as the model
- Starts with a shortlist of about 20 candidates so you can tune the prompt
- Anchors with confidence scores and QA flags for repetition and over-optimisation
- Review inside the notebook, then export one file
- Written walkthrough included
Where this resource is used on MLforSEO
Walkthroughs on the blog
Concepts behind it
More internal linking resources
- Coding Script or NotebookLink Blocks for WordPress: Related Posts, Topic Cards, Siblings and Mentions
- Coding Script or NotebookLink Menu to Linking Rules: Python Script for Auto-linking Plugins
- ChecklistBefore You Build: A Checklist for Internal Linking Tools
- Coding Script or NotebookInternal Linking QA and Holdout Group Notebook
- Visualization TemplateInternal Linking Impact Dashboard (Data Studio Template) with Setup Guide
- Coding Script or NotebookInternal Link Menu Notebook: Priority Score and Versioned Recommendations
See all 26 internal linking resources →See all 29 content analysis resources →See all 73 coding script or notebook resources →
