Skip to content

Automatically provide notebook context in magic commands #331

@JasonWeill

Description

@JasonWeill

Problem

When a user asks a question, only the prompt provided, plus any other data provided by the user, gets sent to the model. For example, the user can select data and send it to the chat UI's language model with their message. In addition, the /ask command augments a question using data from previous /learn commands. Data from the workbook itself is not included.

Proposed Solution

If the user so desires, augment users' prompts with contextual data from the current notebook. For example, if a user asks, "What is in column 2 of the dataframe?", and the preceding cell contains a Pandas dataframe, augment the prompt with information about the dataframe.

Additional context

As with all Jupyter AI features that send data to a large language model, users should explicitly opt in to having additional context from their notebook sent to language models with their prompts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestscope:magicsIssues concerning the magic commands

    Type

    No type

    Projects

    Status

    3.x backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions