I have explored all sorts of AI software to help with academic research. My goal is not for AI to write content for me but rather to help me locate the best sources. Lots of AI apps have issues with hallucinating false information. And when they do not hallucinate there are issues of finding pertinent information and how to format/archive that information in a useful way.
The example here demonstrates a workflow for medicine but it would be applicable for any academic discipline. The automation with Devonthink is applicable for many other use cases too.
The tools:
- Consensus is a “RAG AI” academic search application. That means it queries with AI but its output is restricted to specific content from the web (Retrieval Augmented Generatoin) - thus its rate of hallucination, while not zero, is extremely low. While everything needs to be verified, I find it more accurate for most searches than PubMed
- Consensus can be used not only as a web app but also as a “Custom GPT” if you have paid for an OpenAI GPT Plus subscription - this looks like ChatGPT but it is RAG based so it has the same extremely low rate of hallucination
- If you subscribe to ChatGPT plus you also have the ability to create your own custom GPT which helps limit hallucination and/or helps you integrate with any apps on the web that have an API or webhook support:
- Creating a custom GPT is not hard at all - it is based on prompts, not coding. And there is even a custom GPT which is amazing at writing schemas for creating your own custom GPT. I was able to create a custom GPT for this project in under 30 minutes.
This is the schema for my “Save to Devonthink” Custom GPT created with the GPT Action Schema Creator:
{
"openapi": "3.0.0",
"info": {
"title": "Send Chat as HTML to Devonthink",
"version": "1.0.0",
"description": "This action captures specified chat content and sends it as raw HTML to the specified webhook URL: https://hook.us1.make.com/xxxxxxxxxx, along with a suggested file title. The response from the webhook is then relayed back to the GPT. This is triggered by the GPT request 'Save to Devonthink'."
},
"servers": [
{
"url": "https://hook.us1.make.com/xxxxxxxxx",
"description": "Webhook server to receive chat content in HTML format for Devonthink"
}
],
"paths": {
"/": {
"get": {
"summary": "Send HTML content and title to Devonthink webhook",
"operationId": "SendChatAsHTMLtoDevonthink",
"parameters": [
{
"name": "htmlContent",
"in": "query",
"required": true,
"description": "Raw HTML content of the chat to be sent",
"schema": {
"type": "string"
}
},
{
"name": "suggestedTitle",
"in": "query",
"required": true,
"description": "Suggested title for the resulting HTML file",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns the response from the webhook",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"400": {
"description": "Shows the actual raw failure message"
}
}
}
}
}
}
- Make.com is a web automation site competing with Zapier - in many ways it is easier to use and more capable as well as less expensive than Zapier. I was able to create a Make.com scenario to integrate my custom GPT with Dropbox in under 30 minutes.
This is the blueprint that can be imported to re-create the scenario in make.com:
blueprint.json.zip (1.9 KB)
- Devonthink integrates with Dropbox through indexing. So if I can automate saving to a specific Dropbox folder I have actually automated integrating with Devonthink
So how does this all come together?
I can do a query on the Consensus custom GPT. Then if I prefix my next query with @ it lets me route the query to my custom “Save to Devonthink” GPT. The results are then saved to the designated group in Devonthink based on the instructions I give in the GPT.
Net result:
And this is the output saved to my Devonthink database:
PRP for Elbow Pain - PubMed Articles Summary-1.html.zip (2.9 KB)
This is probably the most useful automation/workflow I have ever created - it is profoundly helpful to me in working on academic literature queries and is equally applicable to many other use cases as well.
ChatGPT costs $20/month. Make.com has a free tier but you are likely to want the $9/month tier. The practical utility from that is pretty notable for anyone who uses the web to search for accurate information with citations to the source.