In less than 10m, you can spin up an agent that writes SEO-optimised FAQs (Frequently Asked Questions) based on custom search queries with Relevance AI.
To use it, type in a title of an article you're about to publish, and this agent will google the title, get the questions from the People Also Asked section (recent related search queries people also asked).
It will then scrape the content from the best webpage for each FAQ, and uses that to write an answer for each question.
Here is a 1m video showing you how to create it from scratch:
Below are all the steps involved in creating this agent 🙂
You can clone Finlay to try it out yourself. Cloning this agent will include our custom tools and prompts. You would need to modify these for your own use-cases:
Clone Finlay the FAQ-Writing Agent.
1. Create a blank agent
Just click "Create agent", and give it a name and description.
- Name: FAQ Writer Finlay
- Description: Finlay the FAQ writer takes a search query (like the title of an article), and produces an SEO-optimised Frequently Asked Questions section based on the People Also Asked section on Google search results.
2. Equip it with tools
All the tools we need to generate FAQs are already available in the list of public Relevance AI Tools.
- Tool: Google Search: This tool lets you retrieve the top 10 search results for a given query or the People Also Asked questions for a given query. Telling the agent which to retrieve is as easy is saying "please get the search results" or "please get the people also asked questions" in the system prompt (next section).
- Tool: Website scraping: This tool lets you scrape the content (raw HTML or just the text) from any webpage by giving it a URL. For this use-case, we don't need to give it any URL because it will work out which page to scrape from the content returned by the Google Search tool.
Once you've equiped your agent with these two tools, set them to "auto-run" so the agent doesn't need to ask for your permission to use them.
3. Tell your agent how to write the FAQs
The last step is to tell the agent how you want it to produce the FAQs. This is the prompt I wrote:
Key features of the prompt above:
- Role: It gives the agent a role as an SEO expert.
- Objective: To write an amazing FAQ question.
- Step-by-step instructions: For how to create the FAQ section.
- Constraints: 150 words, no source link, no promoting other products.
- How to overcome blockers: E.g. If you can't scrape content for a page, skip it (this came from a run attempt that threw up this problem).
4. Choose the model you want to use for your Agent's brain.
I chose GPT-4o as the model to power this agent.
5. Run the agent and give it a search query
Save the agent and give it a search query. I chose "What is GPT-4o" because it's a new model that was released by OpenAI this week, just to show the FAQs are up-to-date.
Then sit back and watch as the agent does its thing:
The FAQs it produced up with were exactly the same as the questions in the People Also Asked section for the same query "What is GPT-4o" on Google search results.
Woo hoo! 🥳
We just built an agent that produces SEO-optimised FAQs! When you give it a query (like the name of your blog post), it:
- Gets People Also Asked Questions (PAA): Your agent will fetch the PAA questions for your query to use as your FAQ questions. These are related queries people have recently searched for, which is great for SEO.
- Scrapes answer pages: Your agent uses the web scraper tool to get the content of the webpage that best answers your search query (link retrieved in previous PAA step).
- Writes FAQ answers: Your agent uses the scraped content to produce an original and relevant answer to the FAQ question.
You can use these FAQs at the end of your blog posts to increase the organic traffic you get to it (people who search for related questions are more likely to land on your post).
Wanna build your own version too!
Let's goooo:
Clone Finlay the FAQ-Writing Agent.
🚀