Create a Custom GPT to Write Articles

Create a Custom GPT to Write Articles

Everybody can use ChatGPT to generate content and articles. Most of the world can also probably create their own custom GPT and upload 20 documents and have content being incrementally created based upon existing content.

If you want to generate new fresh content based upon your existing website's content though, you will need Magic Cloud and GPT Creator.

With Magic Cloud you can scrape your website, and create a custom machine learning model. This model can be exposed through an API, which you can connect to your own custom GPT. Once connected, you can ask your GPT questions such as; "Write a blog post to me about the benefits of using 'xyz' for 'qwe'". 30 seconds later your GPT have created dozens of paragraphs for you, high quality content, in the style of your existing content - Minus all the typos and spelling errors of course 😉

Custom GPT that writes articles for you

How it works

When you ask your GPT to produce content for you, your GPT will invoke your API endpoint with your query. Your API endpoint will return the most relevant content from your website back to your GPT, which again will use ChatGPT to generate your content according to your instructions. Watch the following video to understand the process.

The entire process of creating the GPT takes only some few minutes, and you can create as many GPTs as you wish. You can have one GPT for writing blog articles, another to create high quality LinkedIn posts, a 3rd GPT to create marketing emails, etc. All GPTs are based upon your existing website content, the only difference being its system message.

The Code

Below is the API endpoint's code if you want to create a GPT for yourself. Create a new folder in your "modules" folder using Hyper IDE, name your folder "my-custom-gpts" or something. Then create a new file in that folder named "get-context.get.hl" and put the following code into your Hyperlambda file. Save the file, and go to "Manage/Endpoints" and filter for "openapi". Write "my-custom-gpts/get-context" into the query parameter to retrieve an OpenAPI specification for only this endpoint, and copy and paste the URL into your custom GPT as an "action".

.arguments
   query:string
.description:Returns context from your training snippets as a string, using VSS search through your training data.

// Making sure caller passed in a [query] argument since this argument is mandatory.
validators.mandatory:x:@.arguments/*/query

// Invoking slot responsible for retrieving context.
unwrap:x:./*/signal/*
signal:magic.ai.get-context
   type:ainiro_io
   vector_model:text-embedding-ada-002
   prompt:x:@.arguments/*/query
   threshold:decimal:0.3
   max_tokens:int:2000


// Returning result to caller.
unwrap:x:+/*
return
   context:x:@signal/*/context

Watch the video for more details. You might want to watch this video too for more detailed information about how to create your "get-context" endpoint.

Use cases

I once heard a marketing manager claiming that marketing is about three things:

  1. Content
  2. Content
  3. Content

After ChatGPT this might have changed to some extent, since content is so cheap to produce. However, content is still highly valuable, and Google is still ranking websites based upon content - Something proven by me being willing to manually write a blog article about this subject today. Hence for a marketing manager, having a GPT that incrementally produces all sorts of different content for me, is probably highly valuable. Marketing of course is just "level 1". Below are some examples I can think about related to this, but there are probably a bajillion more examples if you squeeze your head.

  • Marketing emails
  • Blog articles
  • LinkedIn posts
  • InMail messages
  • Facebook posts
  • Tweets
  • Technical documentation
  • Tutorials
  • Etc, etc, etc ...

Basically everything you can imagine more or less that requires text-based content to be produced for some reasons. And the point being that more content attracts more eyeballs. If you're interested in how we can help you out with such GPTs, you can contact us below.

Below is a screenshot of me sharing the article my GPT created for me on LinkedIn. After having generated the article, all I needed to do was to find one relevant image, and I was done. Instead of spending hours writing high quality articles, the entire process took me only 5 minutes in total! Psst, Follow us on LinkedIn for more content like this.

GPT generator for LinkedIn articles

If the marketing manager was correct and it's all about content, this implies I can use my GPT + Magic to generate hundreds of unique high quality articles, every single day, based upon my existing content from my existing website. That's pretty cool if you ask me ... 😉

Thomas Hansen

Thomas Hansen I am the CTO of AINIRO.IO AS. I am a software developer with more than 25 years of experience. I write about Machine Learning, AI, and how to help organizations adopt said technologies. You can follow me on LinkedIn if you want to read more of what I write.

Published 23. Nov 2023