-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert notebooks to Markdown when specified in @file
#1033
Labels
enhancement
New feature or request
Comments
Might be a good use for jupytext? |
jupyter-ai/packages/jupyter-ai/jupyter_ai/context_providers/file.py Lines 96 to 105 in 7c3d3a9
However, is still a good idea to translate it to markdown, or at least handle/indicate different cell types correctly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Jupyter Notebooks (
.ipynb
) are serialized to disk as a JSON object. However, this object is not in a natural language format preferable to an LLM and includes various metadata that should not be sent to the LLM. When a notebook is passed to an LLM as a JSON object, this may result in lower-quality responses to questions about notebooks, as the contents of the cells are nested within the JSON object and are surrounded by irrelevant metadata.Proposed Solution
When a notebook is specified in
@file
, the notebook should be converted to a Markdown string before being injected into the prompt sent to the LLM.The text was updated successfully, but these errors were encountered: