Obsidian’s Open AI GPT-3 Text Generator

David R Oliver
OS TechBlog
Published in
6 min readOct 11, 2022

--

Obsidian stands out from the astonishing array of Personal Knowledge Management (PKM) tools on the market because the platform has many high-quality plug-ins. Obsidian has fast become the technology equivalent of the Swiss Army knife!

Obsidian has a plug-in that harnesses the power of Artificial Intelligence. This plug-in provides the ability to assist writing by generating sentences on any given topic with very little input from the Author.

In 2020 an article was written for the Guardian Newspaper using an Artificial Intelligence Service called GTP-3 by an organisation called Open AI. Open AI is a capped-profit research organisation that specialises in conducting research into artificial intelligence/machine learning.

GTP-3 is the third generation of a language prediction model, which is a subset of Deep Learning called Natural Language Processing or (NLP). What made GTP-3 stand out from its predecessors was the amount of data it had been trained on; more data and more connections all meant better results.

Services like Jasper.ai use Open AI’s GTP-3 Service by providing a user-friendly interface as the interface to the GTP-3 Service provided by Open AI is an API.

Noureddine Haouari has written the Text Generator Plug-in for Obsidian that utilises the same GTP-3 Service from Open AI without the need to learn to program. The Plug-in is straightforward to set up and then use; Noureddine Haouari has made a short film on how to get started.

To save time, I will reiterate the key steps here.

Firstly, create an account with Open AI to gain access to the GTP-3 Service. Visit https://openai.com/api and select ‘Sign Up’ and then follow the instructions onscreen. A personal account will entitle you to $18 of free processing for the first few months.

Secondly, install the Community Plug called ‘Text Generator’ and enable it, then select ‘Options’. The Plugin has an interesting array of options. I will explain what each means after we have started using the Service and created a few examples so you can understand some of the Service’s capabilities before we begin to tweak them.

To authenticate against the GTP-3 Service, you will need to create a unique key. It is as straightforward as pressing the button ‘+ Create new secret key’, selecting ‘copy’, and then pasting the contents back into the Text Generator plug-in’s api_key option. This URL will take you straight to the page where you can make the secret key https://beta.openai.com/account/api-keys

Now you are ready to use the GTP-3 Service to assist your writing using Obsidian. Here are some examples to give an idea of how the Service works and how you can use it.

For example, I wrote a short sentence on a page in Obsidian, it can be anywhere.

Tell me about London

highlight this text then select the ‘Generate Text! button on the Obsidians sidebar.

Screenshot of Obsidian.md taken by the Author — Tell me about London

If you have enabled the ‘showStatusBar’ option, it will indicate that it is ‘processing …’ from the Status Bar.

This should take a few seconds, then you will see what the GTP-3 Service has made of your request.

Screenshot of Obsidian.md taken by the Author — what OpenAI’s GTP-3 Service knows about London

This is just a simple demonstration, OpenAI GTP-3 capabilities can reach much further than simple Q&A. Another example of the power of this service is it can happily translate text into other languages.

Screenshot of Obsidian.md taken by the Author — demonstrating GTP-3 ability to translate.

Highlighting the text featured in the above image return the following four results, which aren’t too shabby; however, I couldn’t tell you if the Japanese or Ancient Greek text is correct.

Text Generator Plug-in Options

Before I continue with some more examples, I would like to discuss the different Plug-in options.

engine

Engine is an interesting option as it allows you to select which GTP-3 engine you wish to use.

The option text-davinci-002 is the latest GTP-3 engine at the time of writing (October 2022) and has processed more data therefore, you will receive better results and will have more abilities such as the ability to complete missing text. The catch is newer engines take more processing time and, therefore will cost more to run.

temperature

The deep learning GPT-3 temperature parameter is a parameter that controls the amount of randomness in the model. A high temperature (0.9) will cause the model to generate more randomness, which produces more interesting outputs, and the risk of the odd swear word, great for writing fiction. In comparison, the lowest temperature (0.0) will cause the model to generate the same output repeatedly, and the likelihood of seeing a swear word is much less, so better if you are using this for a customer-facing chatbot.

frequency_penalty

The frequency penalty works by lowering the chances of a word being selected again. It is there to reduce the chances of repetition, again the range is factions between 0 and 1.

Limitations

GTP-3 is an amazing advancement, there is no doubt about that; the human-like responses are very impressive, but there are limitations that you should be aware of, and they are,

  • As such, the model itself has no knowledge, it is just good at predicting the next word(s) in the sequence. It is not designed to store or retrieve facts.
  • You cannot download or retrain the model you just have access to it.
  • It is good mostly for English language tasks.
  • Longer outputs from the model tend to degrade.
  • The outputs can be biased and even abusive, which is something that Open AI is continually working on.
  • There are known contaminants, so it isn’t perfect.

Examples

I’ve just touched the surface of what GTP-3 can achieve far more examples just look at the Examples — OpenAI API site.

There are so many applications but here are a couple of examples to give you some more ideas. GTP-3 can help you write code and is the service behind GitHub Copilot · AI pair programmer. GTP-3 can also help with learning a new language because it is the intelligence behind Duolingo.

GTP3Demo site is trying to track the apps that are using GTP-3 which is now over three hundred. However, I don’t think Obsidian has yet made it to their list.

Summary

GTP-3 is an amazing innovation, and the Text Generator Plug-in unlocks this functionality, which is of clear benefit to Obsidian users with writer’s block, or who have research to do and need a little help with their grammar. There are limitations and a few parameters to tweak to optimise the output.

So, the big question is can GTP-3 replace the job of humans? Humans are better at creativity rather than memory, and GTP-3 is another tool that helps us with both. So yes, GTP-3 can take over work that a human can do, but technology, especially in recent years, has allowed humans to do more rather than less. I still think those days of leisure for all humans because we will have a robot workforce are still as far away as ever.

For the here and now, I would like to thank Noureddine Haouari for creating a lovely Plug-in that brings the benefits of Open AIs GTP-3 to Obsidian.

--

--

David R Oliver
OS TechBlog

INTJ | Visual-Spatial Thinker | Knowledge & Solution Architect | Cat Dad | Aviation Geek