positron icon indicating copy to clipboard operation
positron copied to clipboard

Assistant: Provide an extensibility point for amending the system prompt

Open jmcphers opened this issue 7 months ago • 1 comments

Assistant's system prompt is currently pretty generic, since it needs to be relatively terse and work equally well in every Positron project.

As an extensibility mechanism, we could expose a way to amend this prompt that extensions could use. Each extension could register a hook to be invoked when a user submits a prompt. The hook, when invoked, can examine the project (and possibly the user's question and other context?) and optionally inject a short amount of text to be included in the system prompt.

This could be used by the Quarto extension to add information relevant to the Quarto environment and documents in the project, by the R extension to amend base R/Tidyverse coding preferences inferred from the project (and perhaps additional context gleaned from installed R packages), etc.

jmcphers avatar May 15 '25 20:05 jmcphers

Great! Quarto's system prompt could end up being longer, but I think usefully so. I think we should use Shiny Assistant's system prompt as a guiding example.

cscheid avatar May 16 '25 12:05 cscheid