|
When starting new chat, Jan prepends some text to the context for the loaded model, doesn't it? If so, where to find it? I guess this prepended text is called "system prompt" and for cloud models users can not control it, but when people execute |
Replies: 2 comments 1 reply
|
Jan does prepend system-level context, but there are two different paths in the current app. Normal chatThe base prompt is the selected Assistant's At send time,
That combined string is then passed as the Cowork / agent modeCowork intentionally replaces the normal chat prompt. The native agent path has another builder in Local llama.cpp vs cloud modelsRunning llama.cpp locally does not imply “no system prompt.” Jan still sends the system-role content described above. llama.cpp then formats the role/message sequence using the model's chat template (normally metadata from the GGUF, unless model settings override the prompt template). For a cloud provider, Jan also sends its system field through that provider adapter. The provider may apply additional server-side policy/instructions that are not part of this open-source repository and are not generally inspectable from Jan. So the practical answer is:
If this maps the prompt layers you were looking for, please mark it as the accepted answer. |
|
Thanks — glad it helped. For this answer I did not rely on a running Jan setup; I traced the current My workflow was roughly:
I generally use an evidence-first repository-analysis setup: start from the actual entry point, follow the call chain, verify behavior against tests/comments, and explicitly separate confirmed behavior from provider-side details that the public repository cannot prove. I have not settled on a personal Jan configuration yet, so I do not want to pretend I have a polished one to share. Once I test this workflow end to end in Jan, a small |
Jan does prepend system-level context, but there are two different paths in the current app.
Normal chat
The base prompt is the selected Assistant's
instructions. The built-in Jan assistant is defined inuseAssistant.ts, and you can inspect/edit an Assistant's instructions in the Assistant configuration UI rather than looking in the llama.cpp model files.At send time,
CustomChatTransport.buildSystemPrompt()combines:systemMessage);That combined string is then passed as the
systemfield tostreamText()in the same file. So there is not necessarily one static prompt file contain…