feat(talk): support configurable call summary prompts - #19111
Conversation
Signed-off-by: Arkadiusz Sitkiewicz <a.sitkiewicz@wbgroup.com>
Assisted-by: ChatGPT:GPT-5.6 Luna Signed-off-by: Arkadiusz Sitkiewicz <a.sitkiewicz@wbgroup.com>
|
Do you mind sharing your prompts so we can see if it would be even an option to add them to the default code base? |
@nickvergessen of course. This is my prompt for Talk call meeting summary: set it by using (considering changes in this PR): For other AI Tasks, that are triggered by Assistant UI I use: Nextcloud Assistant UI SummarizeThe idea is that I summarize documents, articles, long emails in Assistant UI, hance output format is not strictly restricted. What is more, Assistant UI Summarize does not render markdown, so the output should be only plain text. Nextcloud Assistant UI TranslateThe idea is that you want only to translate. If input contains markdown, preserve it. If it has weird formatting, preserve it. Even thought Nextcloud Assistant UI Translate does not render markdown, if the source (input) contains it, it should be in output. Long story short - only translate it, without changing the wording or tone: after this prompt UI adds (Translate from ... to ...) and the text to translate. ThoughtsThose prompts work for my purposes. I am aware that other users/admins might want to change it somehow to fit their requirements. That's why I propose configurable system prompts for all kind of AI Tasks across various Apps |
nickvergessen
left a comment
There was a problem hiding this comment.
Apart from the Time and Place section that sounds pretty good and we tested it locally on some of our company call recordings.
So maybe we add that as a default value to the config
| return; | ||
| } | ||
|
|
||
| $customSummarizePrompt = $this->serverConfig->getAppValue('spreed', 'call_recording_summary_prompt', ''); |
There was a problem hiding this comment.
| $customSummarizePrompt = $this->serverConfig->getAppValue('spreed', 'call_recording_summary_prompt', ''); | |
| $customSummarizePrompt = $this->appConfig->getAppValueString('call_recording_summary_prompt'); |
And can we should add it to the ConfigLexicon class.
lukasdotcom
left a comment
There was a problem hiding this comment.
I would also instead of using h2 formatting still use markdown as the summary is put into a markdown file anyway for talk.
☑️ Resolves
AI (if applicable)
There is a commit with unit test that was developed using AI assistance.
🛠️ API Checklist
🚧 Tasks
TextToTexttask typeTextToTextSummary(the same behaviour as it was before my changes)TextToTextis supported. There was the same check forTextToTextSummary🏁 Checklist
docs/has been updated or is not requiredAdditional info/background
This PR implements configurable summary instructions for Talk call recording summaries.
The original approach was proposed in nextcloud/integration_openai#425. After discussion with @lukasdotcom , the provider-side approach was rejected in favour of handling Talk specific instructions in Talk, using
text2texttasks type.Configurable summary prompts - why is it needed?
A Talk meeting (or any call meeting) has different structure than document or article. When trying to summarize the meeting, the user might want to have some specific output document. For example sections as:
Configurable summary prompt allows to customize the output freely.
Why did I use
TextToTexttask type instead ofTextToTextSummary?TextToTextSummarytask type implementation in providersintegration_openai, llm2has a chunking/looping mechanism, that chunks prompt based onmax_input_tokensvalue. If there is a case that original prompt will be chunked to more than one chunk, only the first chunk in first loop will have instructions (call_recording_summary_prompt) for a model to summarize. In other casescall_recording_summary_prompt` will be lost or will not affect the ouput because it is not present in a given chunk.What is more, if
TextToTextSummarywere to be used withcall_recording_summary_promptand the input will fit intomax_input_tokenslimit, there one and only chunk could confuse the model, because it will look something like this:Using
TextToTexteliminates issues mentioned above. Summary will work as simple request to LLM with configurable instructions by the admin. No chunking/looping mechanism, one requirements is that the input (call_recording_summary_prompt+transcript) tokens fitmax_input_tokens_per_requestlimit.One the other hand I am aware of the fact that chunking/looping mechanism can be good for models with small context.
How does configurable summary prompt work?
Set summary prompt for talk using
occcommand as below:This implementation uses
text2texttask type, so this is essential that input tokens (in this case summary prompt + transcription) is less or equal toMax input tokens per requestlimit.What is more,
text2texttask type has to be available. For selected provider: InAdministration Settings > Administration > Assistant > Unified task processing > Provider for Task typesenableFree text to text prompt.For nextcloud/integration_openai
Select enabled features > Text processing providers (to generate text, summarize, context write, etc.)turn it ON.I am open to feedback and the implementation adjustment. I would be happy to adapt the approach based on your suggestions.
In my opinion it would be useful to have configurable instructions for all kinds of AI Tasks (Translate, Summarize) across Nextcloud (Assistant UI, Talk and other Apps). I wonder if there is already a boarder vision or plan for handling application-specific instruction for AI Providers? I'm tagging @lukasdotcom here as this discussion originally started in the previous PR.