So one of the great features of AI is the ability to summarize and format multiple pages and output the results in a format (html, markdown). A task I am trying to accomplish would be to summarize a number of feeds for today and output it to a location as markdown.
I am having some problems running this but here is what I have so far.
- Create a smart rule to execute manually (attached)
- promp is “please summarize all the information in a bulleted format and include a DEVONthink link to the document and output the inforrmation in a markdown format.”
This is where I am stuck. It would be great if the Chat Query would create a markdown file in a directory and the output from the query goes there. Currently I see it wourking per flle as I am running Ollama and see the queries happening.
I also exported a bunch of files to my AI and my RAG pipeline and had the following output as an example. Both MD and Rendered version (using harropad for this).
Just what I am using on AI:
- Ollama (latest version)
- Model: gemma-2-9b-it-q5-k-l:latest
2 Likes
No, that will not work nor is the Chat Query action intended to behave that way. When you use the Chat assistant, either via the Chat popover or Chat inspector, you’re working in the context of the application and your databases directly. The smart action is sending a query externally and expecting a response. That’s what it’s getting, nothing more. So you need to then do something with the response in subsequent actions. Does that distinction make sense?
Are you hoping for something like this, generated with RSS entries from our site…
What is your prompt?
Also, a rule or match process will run all your actions on each document. You’re not building up a variable to be used at the end. So you need to create your chain of actions in such a way that each document can be processed by all the steps.
1 Like
One summary for each item or only one summary for all items? In the second case the easiest solution is probably a script using the command summarize contents of
Ok so not possible without a script.
Ultimately generating a new document via AI works great, I use it all the time in Obsidian.
Something you might want to consider.
Yes, see my markdown image, exactly that… but hopefully to add a DEVONthink URL to the item.
You could select several news in feeds and check the output on your own via Tools > Summarize Documents via Chat > as Markdown. The output depends on Settings > AI > Summarization.
If that’s indeed what you’re looking for, then the summarize contents of
AppleScript command would produce identical results and could be used in smart rules.
This works pretty well. the only enhancement would be to allow for various prompts to come from a selector that could be defined.
As an example the prompt that is default is great for general pages. The prompt for security blogs would be different identifyingThe actors, pulling out the CVE numbers, and other Pertenant things would be great if a user would not have to go to preferences, and copy and save the default prompt and then put in the particular prompt.
I can show you a number of such examples and the way prompting is done in them.
In this case the only option is to use the get chat response for message
command and to control this on your own in a script.
I can do a lot of things via Scripts but I was recommending how to improve the software. In this example I was just saying that in the future a prompt feature that is specific can really help take your product to a whole different direction. As an example I just wrote a prompt for security blog that and here is the output
And here is the custom prompt, you can really help your users define their output of the summarization via the ability to pull in prompts from text files instead of copying and pasting them in.
Here is the prompt:
"Make a summary of %@ in bullet format with a header on each of the bullets in bold. The first bullet with the header “Threat Actor” would contain any group, actor, country that perpetrated the attack. The second bullet with the header “CVE” would contain all the CVE’s mentioned in the article. The third bullet with the header “Malware” would contain any malware that was mentioned in the article. The fourth bullet with the header of “Vulnerability” would summarize the vulnerability. The fifth bullet with the header of “Impact” would provide any impact to the explotation of the vulnerablity. The sixth bullet with the header of “Techniques” would specify and techniques or methods the threat actor used in purpetrating the attack. The seventh bullet with the header “Mitigation” would provide ways of mitigating the vulnerability only if mentioned in the article. The eight bullet with the header “Summary” would summarize the whole article in a short paragraph. All of these bullets would expain the complex concepts in simple terms and provide examples in everyday life of how the subject can be applied. If there is no mention of any of the bullet points specified in the article, still use the header but do not put in any follow up text. "
Having been working with AI for both personal and professional use for a long time there are a lot of things that can be achieved via prompting, and ultimately this will help your customers.
1 Like
Per my previous reply, this is a batch process configuration illustrating how the Chat - Query smart action works in conjunction with placeholders, passing its response to another action to use that reply. With feed articles selected…
Prompt for a reply
Set a variable for the next action via the Query Response
placeholder
Use the variable in a script that identifies and updates the content of a specific document
Every selected document would be processed by the actions, hence the updating of the content.
Syntax note
If you look at the prompt, note the placeholder is sent as a code block by enclosing them in backticks (per @cgrunenberg’s recommendation). So, it’s `Name` using the placeholder.
2 Likes
This is already possible via the example I just gave you. The only thing unaccounted for is the %@
in your summary.
2 Likes
That is great, I think that your users would appreciate you including this in the product.
1 Like
It is included in the product as I just showed with two examples. Can you clarify what you’re referring to?
I see that it is included but it requires someone to visit the forum, find the information, or be able to actually write an applescript (a very simple one, but not everyone is a programmer). Since I am a Product Manager, I always think about productizing something that is good. You have it in the product, but by default someone can not easily create this unless they know exactly what they want to do, or how to chain it all together.
What I am saying is try to productize this within the product, this can be done in documentation, or inside the product by creating templates, etc.
I am going to use what you described here (with some modifications), but ultimately I think other customers might like to use something like this, and I am just recommending that you create a way for them to use it easier.
2 Likes
Thank you for the clarification. Document summarization is often done in an impromptu manner, not necessarily in an automated fashion. For those people, the AI > Summarization setup and the Edit > Summarize via Chat or Tools > Summarize Documents via Chat commands are readily available for use.
And we do discuss smart rule and batch processing in the Help and manual, e.g., in the Automation chapter.
Here’s something you could mess with, if you’d like…
BlueKnight - Security Prompt.dtBatchProcess.zip (2.7 KB)
1 Like