Real world use of external AI in DEVONthink

User @kronyc on the Mac Power Users forum wrote a good-sized post on how he is using external AI inside DEVONthink to handle several processes. He doesn’t go super deep but it’s worth a read. Check it out at…

PS: He spends most of his time on the MPU forums and said to check with him on that post over there if you have questions.

16 Likes

Just FYI, I’m a she / her. :wink:

2 Likes

That’s the problem with gambling, the odds are never 100% :stuck_out_tongue:
Apologies for the wrong guess! :slight_smile:

And welcome to our neighborhood!

1 Like

No worries! I suspect the odds are greater than 50% that someone posting on a tech forum is a he/him …

1 Like

@krocnyc - very useful stuff, thanks!

@BLUEFROG suggested that I share my email prompts, which I’m more than happy to do. There are two: one provides a clean transcript of an email chain; the other provides a detailed summary.

A note: I had Claude help me refine the prompts so that I can get exactly what I need. I’ve found that working with the bot itself to refine and enhance a prompt really pays off. If you’re interested in using these prompts yourself, you might want to ask your bot of choice how to make them better suit your particular needs. And, if you’re working with long, complex email chains with a number of participants, you should ask the bot how best to “chunk” the task so that you don’t run up against token limits or context window issues; there are a number of ways to do that, and one might be better suited to your needs than another.

And, here’s a hint about working with email in DTP that I added to the conversation over at the MPU Forum:

An addendum about archiving email in DEVONthink: with the pro version of DT4, it’s now possible to import email attachments as separate documents, which makes locating and working with them a lot more straightforward, even if you’re not using AI. Details here.

This new feature has made tidying up much, much easier. It makes it a snap to find important documents that came in as email attachments, rename them as needed, tuck copies away where they belong, and task the robot with summarizing them, extracting useful information, or whatever.

Here’s the transcript prompt:

Convert this email thread into a clean chronological transcript. For each message, write:

“On [date], [Name] wrote:”

Then include the message content with all email headers, reply markers (>), signatures, disclaimers, and quoted previous messages removed. Only include the new content each person contributed.

Preserve the natural flow of conversation while removing technical email artifacts.

Here’s the summary prompt:

You are analyzing an email thread. Provide a summary with the following sections:

Date Range: Note the dates of the first and last emails in this chain.

Participants: List each person who sent an email in this thread with their email address and role or organizational affiliation. If role is unknown, note as “role unclear”. Format as bullets.

People Mentioned: List any individuals referenced in the emails who weren’t direct participants, along with their roles or context for why they were mentioned. If role is unknown, note as “role unclear”. Format as bullets.

Context: In 1-2 sentences, state what this email chain is about and the main purpose of the exchange.

Key Points: List the main topics discussed, decisions made, and any disagreements or alternatives considered. Format as bullets.

Action Items: Extract any tasks, commitments, or next steps mentioned, noting who is responsible if specified. Format as bullets.

Outcome: State the current status - is this resolved, ongoing, or awaiting response?

Documents Referenced: List any documents, agreements, contracts, or other materials mentioned in the emails (e.g., “Q3 Budget Report,” “NDA with Acme Corp”). Format as bullets.

Attachments: List the filenames of any documents attached to emails in this chain. Format as bullets.

Contact Information: Extract any phone numbers, addresses, or other contact details shared in the emails. Format as bullets.

Keywords: Provide 5-10 keywords or short phrases that would be useful for searching this thread in an archive.

Ignore email signatures, disclaimers, and quoted text from earlier in the chain unless it’s essential context.

If you have any questions, just ask!

7 Likes

@krocnyc, this is super useful for newbies as me browsing examples on how to write prompts - even if the contexts are different. tx!

2 Likes

et al:
And this is an excellent example of very clear and specific prompting. Many examples, including some of our contrived ones, are simple queries shown to illustrate basic ideas of “how to talk to external AI”. But in this real-world use case, @krocnyc is sculpting the results to a much finer degree.

If you don’t need specific information, in specific formatting and structures, shorter prompts are fine. But if you need such things, you will need to iterate your prompts to achieve such goals.

A note: I had Claude help me refine the prompts so that I can get exactly what I need. I’ve found that working with the bot itself to refine and enhance a prompt really pays off. If you’re interested in using these prompts yourself, you might want to ask your bot of choice how to make them better suit your particular needs.

This is also an important concept and something we covered in the Getting Started > AI in Practice > Get To Know Your AI section of the built-in Help and manual.

1 Like

Here’s another example of a detailed prompt that I use both in DEVONthink and with the Obsidian Web Clipper. I use it to generate focussed summaries of long-form magazine and journal articles I’ve included in my research and learning repositories.

Provide a comprehensive summary of the selected article. Identify and explain the main thesis and supporting arguments in 2-3 paragraphs. Create 2-5 focused sections with clear headers that address the most important aspects of the content. Use descriptive headers that capture the essence of each point. Keep each section substantial but concise. Focus on the intellectual framework and connections between ideas rather than just listing facts. Add a list of keywords I can use to tag the contents.

I’ve started adding this text to the prompt for articles that reference a substantial number of people, works of art, other texts, etc.

Add a list of persons, books, films, musical compositions, or works of art mentioned in the article.

If the article is about a topic that I’m not wholly conversant with, I might add the following to the prompt (and use with caution):

Address the wider significance, impact, or applications of the ideas presented. List 4-6 related works, authors, concepts, or research directions that would deepen my understanding of the topic.

These summaries aren’t a substitute for reading and digesting the article yourself or writing your own précis, but they’re useful as a quick refresher, especially if your own notes aren’t exactly tip-top.

This Anthropic YouTube video on effective prompting techniques is really helpful if you’re new to crafting prompts.

4 Likes