The Obsidian plugin QuickAdd recently released an update that contains a suite of AI features, allowing better integration of the power of OpenAI’s technology into your notes. Using these features I created a series of scripts containing prompts that draft realistic articles, and I’m going to show you how I managed to do this in the following steps. These instructions assume you have a basic understanding of the Quickadd plugin for Obsidian and how it functions.
Write the prompts:
QuickAdd’s AI assistant takes instructions from prompts that you write in individual markdown files in a specific folder in your vault. These are similar to what you would normally prompt the AI with, but you can add the power of QuickAdd’s capture functions.
I use four prompts that replicate the action of a real-life editing team, inspired by an article on Medium by Thomas Smith. One prompt acts as a professional copy writer (into which I input the premise of the article, and a key phrase for SEO), one as an editor for the copy, one as an SEO editor and one that integrates the advice from the editors and alters the article from the first instance.
You write the prompt for each stage and, using the power of the QuickAdd plugin, take the outputs from each stage and use them to inform the outputs of the other stages. This acts as an iterative process on the article, modifying it and improving it to the extent that you wish.
Here is an example first prompt file — one that asks me to give an idea for an output article, and generates the first draft accordingly:
You are a copy writer with over 10 years of experience. You write engaging and informative copy.
Your job is to {{VALUE:Directive}}. Also generate a title for the article and display it above the beginning of the piece.
This is a simplified version of the file that I currently use to input an idea for an article that I want generated. I use QuickAdd syntax to enter the missing information into the prompt — when ran, this will prompt me to enter the ‘Directive’.
Connect them using a QuickAdd macro:
When crafting your macro in QuickAdd, start by choosing the option ‘AI Assistant’ that has been added by the new update. In the options for this command, you can choose to reference the first prompt file, which will be the one that writes the first draft of the article. Change the name of the output variable to whatever you have referenced in your other prompt scripts. Then repeat the process for the other prompts that you have produced.
Your macro should end up containing a chain of AI Assistant commands, guiding your initial prompt from draft to edited and refined article. Add one more command, using the capture function, which will paste the finished article to wherever you want in your vault.
Generating your first article:
When you run the bot, you will be prompted to enter a command for the article that has to be generated, if your starting prompt looks like the example I provided above. You enter your directive, and the AI gets to work. You now don’t have to do anything but wait, as the virtual copy writer and editors get to work. The entire process varies in duration, but I’ve found that it takes around a minute and a half to three minutes, depending upon the complexity of the subject.
Other notes:
QuickAdd gives you an option of which model to use for your prompts, ranging from text-davinci-003 all the way up to gpt-4, which generates the best results. This comes with a monetary cost, but I’ve found that it’s not heavy and of course you can use a cheaper model, such as gpt-3.5-turbo, if cost is a problem for you. I would recommend gpt-4 however, because you get what you pay for when it comes to these models.
It’s up to you how you modify the prompts, this was merely to demonstrate how I’m using the plugin, and suggest a framework for you to do the same. You can extend them, and continue to iterate to improve the quality of the output. I added a sample of my own writing to one of the prompts, to make the output more similar to my own style, but you can suggest almost anything, from how the output should be formatted, to the language that the generated output uses.
It’s important that you check the output before publishing it anywhere, but you merely have to act as an editor, rather than producing the whole article yourself. Of course, it would improve the writing if you added personal anecdotes and examples from your own experience, because this is the ingredient that makes what you produce different to what everybody else produces.
I hope that this article has taught you something that you can use to improve your own work. The advances in AI are bringing greater productivity and output into reach, and I’m excited to see what the the future brings for this plugin as well as AI at large. Thank you for reading.
1 comment