Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7b44707
inital commit for yellowhammer jupyter assistant
yue-here Oct 22, 2024
bf94201
minor changes for initial commit
yue-here Oct 24, 2024
d93d90e
minor changes for initial commit
yue-here Oct 24, 2024
4f3128f
pre-commit update
yue-here Oct 24, 2024
82ce847
add error parsing logic to llm chain
yue-here Oct 27, 2024
bdb22c2
pre-commit autoupdate
yue-here Oct 28, 2024
248db88
Merge remote-tracking branch 'upstream/main' into initial-implementation
yue-here Oct 28, 2024
82e1ff8
Merge pull request #1 from yue-here/initial-implementation
yue-here Oct 28, 2024
9635fe6
Remove temporary test files
yue-here Oct 28, 2024
d9d0d08
added langgraph dependency
yue-here Oct 28, 2024
6ccad75
Merge commit containing error-parsing logic into main
yue-here Oct 28, 2024
972e3b4
update architecture to accept multimodal inputs
yue-here Jan 11, 2025
8fcf6d2
pre-commit checks
yue-here Jan 11, 2025
01ecba8
Merge branch 'main' into development
ml-evs Jan 27, 2025
2d895a9
Remove DS_STORE and add to gitignore
ml-evs Jan 27, 2025
8e993ac
Bump uv version and relock
ml-evs Jan 27, 2025
245daf6
add image upload example to yellowhammer demo notebooks
yue-here Jan 29, 2025
ebeb663
Remove duplicated function
ml-evs Feb 18, 2025
7940589
update anthropic model to claude 3.7
yue-here Mar 14, 2025
f4193b8
update prompt to improve sample searching
yue-here Mar 18, 2025
de199a9
pydantic-ai refactor and tool-use PoC
yue-here Mar 28, 2025
71da243
add full text search, query inspector & code writer tools
yue-here Apr 13, 2025
4062b43
add vector search and sample creation tools
yue-here Apr 23, 2025
b0c68a5
update readme and examples
yue-here Apr 29, 2025
e1ebf78
deprecated vector search
yue-here May 8, 2025
b14e597
Update demo notebook and agent tools
yue-here May 8, 2025
ad4613a
implement multimodal inputs
yue-here Oct 14, 2025
fd934fb
implement multimodal inputs
yue-here Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
version: "0.5.x"
enable-cache: true

- name: Install dependencies
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
version: "0.5.x"
enable-cache: true

- name: Install locked versions of dependencies
Expand Down
22 changes: 19 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
__pycache__/
*.py[cod]
*$py.class
**.DS_STORE

# C extensions
*.so
Expand Down Expand Up @@ -160,9 +161,24 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Test notebook
src/yellowhammer/yue_test.ipynb
src/yellowhammer/test.ipynb
examples/Demo_yue.ipynb
examples/Demo_yue2.ipynb
examples/yue_examples

# Test notebook
examples/FA-Mn-H2PO2.raw
src/yellowhammer/yue_test.ipynb
examples/Demo_flagship.ipynb
examples/HL1-5_5-90_30min.xrdml
# examples/IMG_1648.jpg
prompts/deprecated
examples/llm_trace.txt
examples/Demo_anthropic.ipynb
examples/Demo_multimodal.ipynb
examples/Demo_openai.ipynb
examples/Demo_pydantic copy.ipynb
examples/Demo_pydantic.ipynb

# AI generated docs
MULTIMODAL*
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,28 @@

</div>

A continuation of the [LLM hackathon](https://www.eventbrite.com/e/llm-hackathon-for-applications-in-materials-and-chemistry-tickets-868303598437) project, [*yeLLowhaMMer: A Multi-modal Tool-calling Agent for Accelerated Research Data Management*](https://github.com/bocarsly-group/llm-hackathon-2024).
This project is a continuation of [LLM hackathon](https://www.eventbrite.com/e/llm-hackathon-for-applications-in-materials-and-chemistry-tickets-868303598437) project, [*yeLLowhaMMer: A Multi-modal Tool-calling Agent for Accelerated Research Data Management*](https://github.com/bocarsly-group/llm-hackathon-2024).

This repository will explore using the Jupyter AI plugin to provide an agentic interface to [*datalab*](https://github.com/datalab-org/datalab), with the idea of having this as an additional UI that *datalab* users can use to interact with their data, either deployed for their instance, or run locally.
This repo explores the use of a agentic assistant for [*datalab*](https://github.com/datalab-org/datalab) using Jupyter cell magics as an UI, allowing *datalab* users to interact with the agent during their standard data processing and analysis workflow.

## Initial development tasks
See the [example notebook](examples/Demo_pydantic.ipynb) for a demonstration.

- [ ] Reproduce the hackathon project with the Jupyter AI plugin, probably by extending the `%%ai` cell magic to something like `%%yellowhammer` that includes the yellowhammer system prompt, and guides through the registration of a *datalab* API key and any provided LLM API keys.
- [ ] Use yellowhammer to generate API examples for the underlying [*datalab-python-api*](https://github.com/datalab-org/datalab-python-api) package.
## Current status
- [x] Port project from langchain to pydantic-AI
- [x] Create `%%llm` line/cell magic that passes messages to the datalab agent
- [ ] Agent guides user through the registration of a *datalab* API key and any provided LLM API keys.
- [x] Write agentic tools for interactions with *datalab* API.
- [x] Include code-writing tool that can query the underlying API directly with [*datalab-python-api*](https://github.com/datalab-org/datalab-python-api) package.
- [ ] Update datalab API for direct data retrieval from backend
- [ ] Consider deploying this as a JupyterHub that *datalab* instances can link to directly.
- [ ] Integrate the results much more closely into *datalab* itself, i.e., attaching notebooks to the relevant samples, and recording the provenance of AI generated data recording.

## Project structure
- [`src/yellowhammer/llm_pydantic.py`](src/yellowhammer/llm_pydantic.py): Defines the agent and tools.
- [`src/yellowhammer/magics.py`](src/yellowhammer/magics.py): Defines Jupyter magic commands.
- [`prompts`](prompts/): System prompts for each agent
- [`examples/Demo_pydantic.ipynb`](examples/Demo_pydantic.ipynb): Example notebook demonstrating usage

## Installation

This repository uses [`uv`](https://docs.astral.sh/uv/) for the entire packaging workflow.
Expand Down
199 changes: 0 additions & 199 deletions examples/Demo_anthropic.ipynb

This file was deleted.

Loading