Skip to content

Feat/custom system prompts - #437

Open
astkwcz wants to merge 5 commits into
nextcloud:mainfrom
astkwcz:feat/custom-system-prompts
Open

astkwcz wants to merge 5 commits into
nextcloud:mainfrom
astkwcz:feat/custom-system-prompts

Conversation

@astkwcz

@astkwcz astkwcz commented Sep 25, 2026

Copy link
Copy Markdown

Configurable system prompts for summary and translation tasks

Earlier work:

Related work:
There is already merged functionality for configurable system prompts set by admin #433 (@Abhijeet-035, @lukasdotcom) introduces that, so I think that I should explain myself and my work a little, considering SummaryProvider
I started working on this PR before #433 was merged, so those two PRs overlap. I implemented the prompt per service using ServiceConfig which is why instance-wide setting from #433 is reverted. I reverted it to keep one place in UI instead of two. I am happy to keep global default as fallback if you prefer.

Summary system prompts

There are 3 types of system prompts configuration:

  • user system prompt (Advanced options in Assistant UI)
  • admin system prompt (that can be set in Admin Settings > Assistant)
  • default system prompt (hard-coded in repo: You are a helpful assistant that summarizes text in the same language as the text. You should only return the summary without any additional information.

How it works:

  • user system prompt (if set) overrides admin system prompt (if set) and default system prompt . It also ignores format and complexity options. The idea is that user knows what they want and the can define thiers output format however they wants
  • admin system prompt (if set) overwrites default system prompt and can be overwritten by user system prompt (if set). It appends format and complexity option, so the idea is that prompt should be more general and should not define format and complexity
  • default system prompt will be used only if user system prompt and admin system prompt are not set

Translation system prompt

I introduce that because I had troubles with translation. Sometimes model outputs only translated text and sometimes it outputs orginal text + translation line by line. It was not coherent

UI look

Admin system prompts for summarization and translation

image
  • Textareas are under the section System prompts
  • It is nested inside Text generation so if we toggle that off, System prompts will not be visible

User defined system prompt for summary

image

…n/default

Signed-off-by: Arkadiusz Sitkiewicz <a.sitkiewicz@wbgroup.com>
…dmin/default

Signed-off-by: Arkadiusz Sitkiewicz <a.sitkiewicz@wbgroup.com>
…er/admin

Signed-off-by: Arkadiusz Sitkiewicz <a.sitkiewicz@wbgroup.com>
…pt - admin

Signed-off-by: Arkadiusz Sitkiewicz <a.sitkiewicz@wbgroup.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant