mail icon indicating copy to clipboard operation
mail copied to clipboard

AI email summary uses Markdown, but rendered as plain text

Open rfc2822 opened this issue 9 months ago • 4 comments

Steps to reproduce

We use LocalAI / Mistral as the AI backend for our Nextcloud. The new "summarize email thread" feature is fascinating.

The summary seems to be Markdown with bold formatting and lists (see screenshot). I guess this is common for such AI summaries. It is however displayed as plain text.

Image

Expected behavior

The summary should be shown as formatted text.

Actual behavior

The summary is Markdown, but shown as plain text.

Mail app version

5.0.0

Nextcloud version

30.0.8

Mailserver or service

No response

Operating system

No response

PHP engine version

None

Nextcloud memory caching

No response

Web server

None

Database

None

Additional info

No response

rfc2822 avatar Apr 14 '25 13:04 rfc2822

Thanks @rfc2822 for reaching out 🙏

Pinging @ChristophWurst @hamza221

kesselb avatar Apr 14 '25 17:04 kesselb

Right, we might have to adjust the prompt

ChristophWurst avatar Apr 15 '25 07:04 ChristophWurst

https://github.com/nextcloud/mail/blob/c0a09b20c79a9481544e142dad0a2d655c9bfa61/lib/Service/AiIntegrations/AiIntegrationsService.php#L99

The *** in the prompt is probably making it hallucinate

hamza221 avatar Apr 15 '25 08:04 hamza221

Also cc @sto-j on this topic, our latest llm related contributor

ChristophWurst avatar Apr 17 '25 05:04 ChristophWurst