A few days ago I saw this announcement, and realized it's time to connect Joplin to the grid. So say hello to...
Jarvis (Joplin Assistant Running a Very Intelligent System) is an AI note-taking assistant based on OpenAI's GPT-3. You can ask it to generate text, or edit existing text based on free text instructions. You will need an OpenAI account for Jarvis to work (at the moment, new users get 18$ credit upon registering, which is equivalent to 900,000 tokens, or more than 600,000 generated words).
This plugin sends your queries to OpenAI (and only to it).
This plugin uses your OpenAI API key in order to do so (and uses it for this sole purpose).
You may incur charges (if you are a paying user) from OpenAI by using this plugin.
Therefore, always check your usage statistics on OpenAI periodically.
It is also recommended to rotate your API key occasionally.
The developer is not affiliated with OpenAI in any way.
Install Jarvis from Joplin's plugin marketplace, or download it from github.
This is a nice piece on how to use AI to generate ideas which I find relevant. Although Jarvis does not yet have interactive features the likes of ChatGPT, many of the techniques in the article (and others) can be of use while writing notes and brainstorming in Joplin.
Thanks for the feedback, I completely agree with you regarding the width of the prompt window. I struggled with this for a bit before the first release with no luck, but in the latest update v0.1.3 this should be fixed.
it's been a couple of months, and since the first release of this plugin AI chatbots have taken over our lives (mine too). however, I still find the good old GPT-3 useful, as it responds with similar quality, and has higher availbality / cheaper price (I was barely able to burn 3$ after 3 months of use). Jarvis didn't stay idle all this time, and has evolved steadily up to this release.
chat with Jarvis
new command: Chat with Jarvis (Cmd+Shift+C). this is the homemade equivalent of ChatGPT within a Joplin note. each time you run the command Jarvis will append its response to the note at the current cursor position (given the previous content that both of you created). or it will try to extend its own response if you didn't add anything. therefore, this essentially serves as a general-purpose autocomplete command. repeat the command a few times to replace the response with a new one until Jarvis gets it just right.
new: predefined and customizable prompt templates (check the settings). quickly select a combination of an instruction, a format for the response, a character that Jarvis will play, and perhaps add a nudge towards thinking more analytically than usual. this utilizes some of the techniques from this recommended tutorial, and draws inspiration from @sw-yx's very cool reverse prompting project. the new prompts are a work in progress. help me improve them, and add new useful templates to the database.
new: select whether to show or hide the input prompt in the response.
improved: lost queries display error messages with info from OpenAI.
new: auto-retry sending the query to OpenAI (adjusted if needed) when pressing the OK button in the error dialog.
Jarvis is now connected to the web (if you choose to).
added: new model set as default
the gpt-3.5-turbo model is the one behind ChatGPT. its reponses a lot cheaper and are much faster (at least they used to be in the first few days). check the settings to see that you have it selected. this is great timing, because for the next new feature Jarvis needs to make many queries. personally, the switch was not as smooth as I anticipated, and it took me a couple of days to adjust my prompts in order to get good responses from the model. in the end, though, I'm mosty happy with the new results.
added: new command "Research with Jarvis"
"Research with Jarvis" generates automatic academic literature reviews. just write what you're interested in as free text, and optionally adjust the search parameters (high max_tokens is recommended). wait 2-3 minutes for all the output to appear in the note (depending on internet traffic). Jarvis will update the content as it finds new information on the web (using Semantic Scholar, Crossref, Elsevier, Springer & Wikipedia databases). in the end you will get a report with the following sections: title, prompt, research questions, queries, references, review and follow-up questions. this is not Bing AI or the cool Elicit project, but even a small DIY tool can do quite a lot with the help of a large language model. I'll write more about how it's done in the future.
sources of information: Jarvis currently supports 2 search engines (and Wikipedia), and uses various paper/abstract repositories. as a general rule, you're likely to get better results when operating from a university campus or IP address, because institutions usually have access to more papers. the 2 search engines have complementary features, and I recommend trying both.
Semantic Scholar: (default) search is usually faster, more flexible (likely to find something related to any prompt), and it requires no API key. however, it has a tendency to prefer obscure, uncited papers.
Scopus: search is slower, and stricter, but tends to find higher impact papers. it requires registering for a free API key
Jarvis is a Joplin assistant first and foremost, but this feature was also ported to a VSCode extension.
contributions: thanks to @ryanfreckleton for fixing a prompt typo.