When creating automations in DEVONthink, the processes are defined in simple, unvarying step-by-step instructions. The Pro and Server editions have an additional specialized smart action called Chat – Continue if that uses external AI to determine if a process should continue.
Available in smart rules and batch processing, this action can assess some input, optionally including a document. You define a question to a chat model that can be answered either positively or negatively. If the answer is positive, subsequent actions are executed; if the answer is negative, they are not. You can also use placeholders in your query by clicking the three-dot icon on the right side of the input field.
You can ask straightforward fact-checking questions, for example, Is this document an invoice? Or ask more qualitative, reasoning-based questions like, Does this document present important information in a way a layperson can easily understand? As a practical example, you could construct a prompt to check if a document is from a list of known vendors: Is this a receipt from one of these vendors: Apple, Guitar Center, Target, … As subsequent actions, you define what should happen if the answer is positive.
Two important things to remember:
- Phrase your prompt to elicit a binary “yes/no”, “true/false” answer. A prompt like
Is this document about astronomy or astronauts?is not an appropriate inquiry. However, addingReply ONLY with yes or nocan help focus things. - A smart rule or batch process continues only when the action returns a positive result. If the smart action returns a negative result, the smart rule or batch process will not continue. Imagine parsing RSS articles: if you prompt with
Is this article about AI?then use a subsequent action withIs this article about macOS?, the article must first be positively detected as being about AI in order to assess if it’s also about macOS.
Remember AI isn’t infallible (as you’ve surely noticed before) and its qualitative assessment may be “more yes than no” but not definitively “yes”. For these types of prompts, you can also include a phrase like Answer no if you aren't confident.
