e2c888e keep user-defined study mode prompt and default study mode prompt separate to allow behavior that is consistent with how task prompts are handled.
When Study Mode is active, a system prompt is injected that instructs the LLM to act like a tutor/instructor, who walks the user through the thought process of discovering the solution to their problem instead of offering up a straight answer.
See this example:
Added
Study Mode config parameters
Env variable to set the default system prompt for Study Mode
Settings tab to enable Study Mode globally and set a custom prompt
Button in message input to activate/deactivate Study Mode
TODO: User- and group-level permission for Study Mode (similar to Code Interpreter)
Additional Information
If Study Mode is active, the Study Mode system prompt is used as the chat-level system prompt and takes precedence over the user settings system prompt as normal.
If the chat-level system prompt is changed in the Chat Controls, Study Mode is deactivated.
The implementation of Study Mode is modeled after the implementation of Code Interpreter (regarding the button behavior) and the task model prompts (regarding defining the default prompt and setting a admin-defined one)
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/17457
**Author:** [@Simon-Stone](https://github.com/Simon-Stone)
**Created:** 9/15/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `study-mode`
---
### 📝 Commits (9)
- [`171021c`](https://github.com/open-webui/open-webui/commit/171021cfa4276f63fd9fd7f31fa0c904fb13c24c) Merge pull request #17327 from open-webui/dev
- [`f8e15b0`](https://github.com/open-webui/open-webui/commit/f8e15b05420c1ab3903b77f00fa64d3ebcc3331d) add config params for study mode
- [`14cf3fd`](https://github.com/open-webui/open-webui/commit/14cf3fdc7368e9a2b2ce6987e6d07fb15550c557) add study mode backend config
- [`aead299`](https://github.com/open-webui/open-webui/commit/aead2998fce070b81344575f3c20b8dac7192197) add study mode button to frontend
- [`280030c`](https://github.com/open-webui/open-webui/commit/280030c38158737ac37fc62edd71ddd45d3c1b03) add study mode config
- [`f4c4b26`](https://github.com/open-webui/open-webui/commit/f4c4b26032e3787aefcc4fa24fe5d5dce2556de4) add update and getter function for study prompt config
- [`fc949a4`](https://github.com/open-webui/open-webui/commit/fc949a4823b93400b5650ea19e15c0b784c1e957) add study mode button
- [`c88224f`](https://github.com/open-webui/open-webui/commit/c88224f6ecd47534811af4e39066cf1619e39ea3) add study mode config options to Settings
- [`e2c888e`](https://github.com/open-webui/open-webui/commit/e2c888e497c493b2df964ef0c2fb7cc02de1b712) keep user-defined study mode prompt and default study mode prompt separate to allow behavior that is consistent with how task prompts are handled.
### 📊 Changes
**11 files changed** (+457 additions, -30 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/config.py` (+89 -28)
📝 `backend/open_webui/main.py` (+16 -0)
➕ `backend/open_webui/routers/study_mode.py` (+48 -0)
📝 `src/lib/apis/index.ts` (+62 -0)
📝 `src/lib/components/admin/Settings.svelte` (+37 -0)
➕ `src/lib/components/admin/Settings/StudyMode.svelte` (+96 -0)
📝 `src/lib/components/chat/Chat.svelte` (+49 -1)
📝 `src/lib/components/chat/MessageInput.svelte` (+37 -1)
📝 `src/lib/components/chat/Placeholder.svelte` (+2 -0)
➕ `src/lib/components/icons/GraduationCap.svelte` (+20 -0)
📝 `src/lib/stores/index.ts` (+1 -0)
</details>
### 📄 Description
# Study Mode
# Changelog Entry
### Description
This PR introduces Study Mode, which is inspired by [OpenAI's Study Mode](https://openai.com/index/chatgpt-study-mode/) and [Anthropic's Learning Mode](https://www.anthropic.com/news/introducing-claude-for-education).
Discussion in #17424
When Study Mode is active, a system prompt is injected that instructs the LLM to act like a tutor/instructor, who walks the user through the thought process of discovering the solution to their problem instead of offering up a straight answer.
See this example:
<img width="1577" height="1442" alt="screenshot of study mode" src="https://github.com/user-attachments/assets/49065375-16b5-421c-a1d0-a85327344984" />
### Added
- Study Mode config parameters
- Env variable to set the default system prompt for Study Mode
- Settings tab to enable Study Mode globally and set a custom prompt
- Button in message input to activate/deactivate Study Mode
- TODO: User- and group-level permission for Study Mode (similar to Code Interpreter)
---
### Additional Information
- If Study Mode is active, the Study Mode system prompt is used as the chat-level system prompt and takes precedence over the user settings system prompt as normal.
- If the chat-level system prompt is changed in the Chat Controls, Study Mode is deactivated.
- The implementation of Study Mode is modeled after the implementation of Code Interpreter (regarding the button behavior) and the task model prompts (regarding defining the default prompt and setting a admin-defined one)
### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/17457
Author: @Simon-Stone
Created: 9/15/2025
Status: ❌ Closed
Base:
dev← Head:study-mode📝 Commits (9)
171021cMerge pull request #17327 from open-webui/devf8e15b0add config params for study mode14cf3fdadd study mode backend configaead299add study mode button to frontend280030cadd study mode configf4c4b26add update and getter function for study prompt configfc949a4add study mode buttonc88224fadd study mode config options to Settingse2c888ekeep user-defined study mode prompt and default study mode prompt separate to allow behavior that is consistent with how task prompts are handled.📊 Changes
11 files changed (+457 additions, -30 deletions)
View changed files
📝
backend/open_webui/config.py(+89 -28)📝
backend/open_webui/main.py(+16 -0)➕
backend/open_webui/routers/study_mode.py(+48 -0)📝
src/lib/apis/index.ts(+62 -0)📝
src/lib/components/admin/Settings.svelte(+37 -0)➕
src/lib/components/admin/Settings/StudyMode.svelte(+96 -0)📝
src/lib/components/chat/Chat.svelte(+49 -1)📝
src/lib/components/chat/MessageInput.svelte(+37 -1)📝
src/lib/components/chat/Placeholder.svelte(+2 -0)➕
src/lib/components/icons/GraduationCap.svelte(+20 -0)📝
src/lib/stores/index.ts(+1 -0)📄 Description
Study Mode
Changelog Entry
Description
This PR introduces Study Mode, which is inspired by OpenAI's Study Mode and Anthropic's Learning Mode.
Discussion in #17424
When Study Mode is active, a system prompt is injected that instructs the LLM to act like a tutor/instructor, who walks the user through the thought process of discovering the solution to their problem instead of offering up a straight answer.
See this example:
Added
Additional Information
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.