Skip to content

Summarize thread emails using AI prompt #47

@HNygard

Description

@HNygard

In this case we want to make a generic summary of ThreadEmails using an AI prompt. The response must be in Norwegian.

Technical details:

  • The AI prompt integration should be an "Extraction", like organizer/src/class/Extraction/Prompts/EmailLatestReplyPrompt.php
  • See commit cdfde93 for an example of the places where we need to add classes/files/code to add a new Prompt + extraction
  • In addition to the extraction using Prompt, the result of the extraction should update ThreadEmail description, status_text and status_type. Maybe other fields to. The code that does this update should be a separate class. We want to do this status update from multiple prompt extractions in the future. It should only update if we don't have a classification of the email (if a human updated it, it should not overwrite).

Prompt test data should be created like

  • data/test-prompts/email-latest-reply/0-basic.txt
  • data/test-prompts/saksnummer/0-basic.txt
  • data/test-prompts/copy-asking-for/3-attached-copy-of-election-stamp.txt

This test data will be run manually by a human to check if the prompt works.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions