Skip to content

Commit b569e0b

Browse files
Merge pull request #50 from neo4j-product-examples/talent-workshop-addotions
Talent workshop additions
2 parents 0bee157 + d69f83a commit b569e0b

29 files changed

+4587
-599
lines changed

.github/scripts/aura.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def wait_for_status(self, instance_id, status=None, time_out=300):
8181
start = time.time()
8282
current_status = self.status(instance_id)
8383
while current_status != status and time.time() - start <= time_out:
84-
time.sleep(20)
84+
time.sleep(5)
8585
current_status = self.status(instance_id)
8686
logger.info("Waiting: {} {}".format(instance_id, current_status))
8787
return current_status

.github/workflows/run-notebooks.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,33 @@ jobs:
4141
env:
4242
ENV_FILE: ws.env
4343

44-
- name: Run data loading notebook
44+
- name: Copy env file to each workshop subdir
4545
run: |
46-
jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1200 --execute data-load.ipynb
47-
rm data-load.nbconvert.ipynb
46+
cp ws.env customers-and-products/ws.env
47+
cp ws.env talent/ws.env
48+
env:
49+
ENV_FILE: ws.env
50+
51+
- name: Run customer and products data loading notebook
52+
run: |
53+
jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1200 --execute customers-and-products/data-load.ipynb
54+
rm customers-and-products/data-load.nbconvert.ipynb
4855
env:
4956
ENV_FILE: ws.env
5057

51-
- name: Run and save workshop notebook
58+
- name: Run and save customer and products workshop notebook
5259
run: |
5360
export AUTOMATED_RUN=true
54-
jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1200 --execute genai-workshop.ipynb
55-
mv genai-workshop.nbconvert.ipynb genai-workshop-w-outputs.ipynb
61+
jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1200 --execute customers-and-products/genai-workshop.ipynb
62+
mv customers-and-products/genai-workshop.nbconvert.ipynb customers-and-products/genai-workshop-w-outputs.ipynb
5663
env:
5764
ENV_FILE: ws.env
5865

59-
- name: Run example-app-only notebook
66+
- name: Run customer and products example-app-only notebook
6067
run: |
6168
export AUTOMATED_RUN=true
62-
jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1200 --execute genai-example-app-only.ipynb
63-
rm genai-example-app-only.nbconvert.ipynb
69+
jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1200 --execute customers-and-products/genai-example-app-only.ipynb
70+
rm customers-and-products/genai-example-app-only.nbconvert.ipynb
6471
env:
6572
ENV_FILE: ws.env
6673

@@ -79,6 +86,6 @@ jobs:
7986
run: |
8087
git config --global user.name 'GitHub Action'
8188
git config --global user.email '[email protected]'
82-
git add genai-workshop-w-outputs.ipynb
89+
git add customers-and-products/genai-workshop-w-outputs.ipynb
8390
git commit -m "Auto-commit: Run notebook and update notebook with output file"
8491
git push

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ embedding_model/
22
.idea/
33
__pycache__/
44
scratch/
5-
data/
6-
*.csv
75
*.env
86
.DS_Store
7+
.ipynb_checkpoints/

README.md

Lines changed: 7 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,16 @@
1-
# Neo4j GenAI Workshop
1+
# GraphRAG Workshops
22

3-
Please see [`genai-workshop.ipynb`](genai-workshop.ipynb) which serves as the self-contained workshop.
3+
This repository contains two GraphRAG workshops: **Customers and Products** and **Talent**. Each workshop provides notebooks, data, and resources for hands-on exercises.
44

5-
The other companion notebooks contain code for staging data, building the Neo4j Graph, and providing easy access to demos:
6-
1. [`data-prep.ipynb`](data-prep.ipynb) stages the workshop data, sampling and formatting data sourced from the [H&M Personalized Fashion Recommendations Dataset](https://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/data).
7-
2. [`data-load.ipynb`](data-load.ipynb) loads the staged data into Neo4j, performs text embedding, and creates a vector index.
8-
3. [`genai-workshop-w-outputs.ipynb`](genai-workshop-w-outputs.ipynb) is a reference notebook for following along and checking outputs. It is simply `genai-workshop.ipynb`with cell outputs intact.
9-
4. [`genai-example-app-only.ipynb`](genai-example-app-only.ipynb) is a copy of `genai-workshop.ipynb` that contains only the final section: the demo LLM GraphRAG app for content generation. It assumes you have already run [`genai-workshop.ipynb`](genai-workshop.ipynb) and exists only for instructor demo purposes.
5+
## Workshops
106

117

12-
## Changelog
8+
1. **[Talent](talent)**
9+
Combine both structured and unstructured data about employees and their technical skills into a knowledge graph. Perform graph pattern matching, vector search, and graph analytics to find similar skill sets and cohorts/clusters. Use the knowledge graph to power a GraphRAG talent agent that can search and respond to inquiries about people, their skills, and their similarities.
1310

14-
### v4 (Sep 2nd, 2024 - Present)
1511

16-
------------
17-
- Transition from using Neo4j Sandbox to AuraDS
12+
2. **[Customers & Products](customers-and-products)**
13+
Uses real-world customer and product data from a fashion, style, and beauty retailer. Learn how to use a knowledge graph to ground an LLM with GraphRAG, enabling AI to build tailored marketing content personalized to each customer based on their interests and shared purchase histories. Learn about retrieval strategies leveraging vector search, graph pattern matching, and graph machine learning.
1814

1915

20-
- Split out data loading
21-
- Split out data load into a separate notebook
22-
- Live workshops now begin with the dataset pre-loaded to cut down on time and spend more of the course walking through GraphRAG. the data-load.ipynb is kept for reference and replication.
23-
- Remove `neo4j_tools` Python package. the functions/utilities are now included in data-load.ipynb
2416

25-
26-
- Updated Workshop Slides
27-
28-
29-
- Added more query exploration & improved explainer queries
30-
- Add Browser-based graph exploration in beginning of workshop
31-
- Include database tips & more Cypher queries in multiple steps
32-
- Update explainer markdown and code cells for graph patterns and GDS for clarity
33-
- Various other minor adjustments to markdown and code to improve course quality
34-
35-
36-
- Added `genai-workshop-w-outputs.ipynb` and GitHub Actions Workflow
37-
- `genai-workshp.ipynb` is now maintained with cleared outputs for better workshop experience and easier PR review
38-
- A GitHub actions workflow automatically tests data loading, workshop, and example-only notebooks and auto-commits `genai-workshop-w-outputs.ipynb` file for each PR.
39-
40-
### [v3 (June 25th, 2024 - Sep 1st, 2024)](https://github.com/neo4j-product-examples/genai-workshop/releases/tag/v3.0)
41-
42-
------------
43-
- improve LLM response quality and cleaned up code for LLM chains and vector stores
44-
- parameterizing customer id so don't need to recreate chains & stores for each customer
45-
- updated prompts to better account for seasonality and use all retrieved data
46-
- update to use gpt-4o
47-
48-
49-
- Improve text embedding speed and reduce code by transitioning to native `genai.vector` Cypher functions
50-
51-
52-
- Updated slides
53-
54-
55-
- Various other minor adjustments to markdown and code to improve course quality
56-
57-
### [v2 (Feb 20th, 2024 - June 24th, 2024)](https://github.com/neo4j-product-examples/genai-workshop/releases/tag/v2.0)
58-
59-
------------
60-
61-
- (fix) Add `langchain_community` to the libraries that are pip installed in the notebooks
62-
63-
64-
- Simplify and Shorten Course
65-
- Shortened GDS section to just three cells to run
66-
- Condensed Vector Search Section
67-
- Condensed Loading to Single Notebook Cell
68-
- Switched Recommendation Retriever to a Simple KG Query
69-
- Adding `neo4j_tools` Package to hold convenience functions for loading data and reduce code footprint in main workshop notebook
70-
- Updated to GPT-4 throughout
71-
- General Notebook Cleaning - Removed duplicate load statements, updating to newest llm packages, etc.
72-
73-
74-
- Provide Better Explainers & Examples
75-
- Add A Chain for Printing Final Prompt to LLM with retrieval data to better explain process.
76-
- Added Differentiated Names for Customer Examples in Demo App.
77-
78-
79-
- Added Additional Resources
80-
- Added workshop slides
81-
- Added "demo only" notebook
82-
83-
84-
### [v1 (Nov 13th, 2023 - Feb 19th, 2024)](https://github.com/neo4j-product-examples/genai-workshop/releases/tag/v1.0)
85-
86-
------------
87-
88-
- Initial 5-part course with
89-
- Building the knowledge graph
90-
- Vector search & text embedding
91-
- Graph patterns to improve semantic search
92-
- knowledge graph inference & ML
93-
- Building the LLM chain and demo app for generating content
94-
95-
96-
## Contributing
97-
Contributions are welcome! To contribute please:
98-
1. Make a PR with a descriptive name
99-
2. If you are updating [`genai-workshop.ipynb`](genai-workshop.ipynb) please ensure to clear all outputs before committing.
100-
3. Do not alter the [`genai-workshop-w-outputs.ipynb`](genai-workshop-w-outputs.ipynb) file. This file is autogenerated upon creating/updating PRs.

customers-and-products/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Customer & Products GraphRAG Workshop
2+
3+
Please see [`genai-workshop.ipynb`](genai-workshop.ipynb) which serves as the self-contained workshop.
4+
5+
The other companion notebooks contain code for staging data, building the Neo4j Graph, and providing easy access to demos:
6+
1. [`data-prep.ipynb`](data-prep.ipynb) stages the workshop data, sampling and formatting data sourced from the [H&M Personalized Fashion Recommendations Dataset](https://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/data).
7+
2. [`data-load.ipynb`](data-load.ipynb) loads the staged data into Neo4j, performs text embedding, and creates a vector index.
8+
3. [`genai-workshop-w-outputs.ipynb`](genai-workshop-w-outputs.ipynb) is a reference notebook for following along and checking outputs. It is simply `genai-workshop.ipynb`with cell outputs intact.
9+
4. [`genai-example-app-only.ipynb`](genai-example-app-only.ipynb) is a copy of `genai-workshop.ipynb` that contains only the final section: the demo LLM GraphRAG app for content generation. It assumes you have already run [`genai-workshop.ipynb`](genai-workshop.ipynb) and exists only for instructor demo purposes.
10+
11+
12+
## Changelog
13+
14+
### v4 (Sep 2nd, 2024 - Present)
15+
16+
------------
17+
- Transition from using Neo4j Sandbox to AuraDS
18+
19+
20+
- Split out data loading
21+
- Split out data load into a separate notebook
22+
- Live workshops now begin with the dataset pre-loaded to cut down on time and spend more of the course walking through GraphRAG. the data-load.ipynb is kept for reference and replication.
23+
- Remove `neo4j_tools` Python package. the functions/utilities are now included in data-load.ipynb
24+
25+
26+
- Updated Workshop Slides
27+
28+
29+
- Added more query exploration & improved explainer queries
30+
- Add Browser-based graph exploration in beginning of workshop
31+
- Include database tips & more Cypher queries in multiple steps
32+
- Update explainer markdown and code cells for graph patterns and GDS for clarity
33+
- Various other minor adjustments to markdown and code to improve course quality
34+
35+
36+
- Added `genai-workshop-w-outputs.ipynb` and GitHub Actions Workflow
37+
- `genai-workshp.ipynb` is now maintained with cleared outputs for better workshop experience and easier PR review
38+
- A GitHub actions workflow automatically tests data loading, workshop, and example-only notebooks and auto-commits `genai-workshop-w-outputs.ipynb` file for each PR.
39+
40+
### [v3 (June 25th, 2024 - Sep 1st, 2024)](https://github.com/neo4j-product-examples/genai-workshop/releases/tag/v3.0)
41+
42+
------------
43+
- improve LLM response quality and cleaned up code for LLM chains and vector stores
44+
- parameterizing customer id so don't need to recreate chains & stores for each customer
45+
- updated prompts to better account for seasonality and use all retrieved data
46+
- update to use gpt-4o
47+
48+
49+
- Improve text embedding speed and reduce code by transitioning to native `genai.vector` Cypher functions
50+
51+
52+
- Updated slides
53+
54+
55+
- Various other minor adjustments to markdown and code to improve course quality
56+
57+
### [v2 (Feb 20th, 2024 - June 24th, 2024)](https://github.com/neo4j-product-examples/genai-workshop/releases/tag/v2.0)
58+
59+
------------
60+
61+
- (fix) Add `langchain_community` to the libraries that are pip installed in the notebooks
62+
63+
64+
- Simplify and Shorten Course
65+
- Shortened GDS section to just three cells to run
66+
- Condensed Vector Search Section
67+
- Condensed Loading to Single Notebook Cell
68+
- Switched Recommendation Retriever to a Simple KG Query
69+
- Adding `neo4j_tools` Package to hold convenience functions for loading data and reduce code footprint in main workshop notebook
70+
- Updated to GPT-4 throughout
71+
- General Notebook Cleaning - Removed duplicate load statements, updating to newest llm packages, etc.
72+
73+
74+
- Provide Better Explainers & Examples
75+
- Add A Chain for Printing Final Prompt to LLM with retrieval data to better explain process.
76+
- Added Differentiated Names for Customer Examples in Demo App.
77+
78+
79+
- Added Additional Resources
80+
- Added workshop slides
81+
- Added "demo only" notebook
82+
83+
84+
### [v1 (Nov 13th, 2023 - Feb 19th, 2024)](https://github.com/neo4j-product-examples/genai-workshop/releases/tag/v1.0)
85+
86+
------------
87+
88+
- Initial 5-part course with
89+
- Building the knowledge graph
90+
- Vector search & text embedding
91+
- Graph patterns to improve semantic search
92+
- knowledge graph inference & ML
93+
- Building the LLM chain and demo app for generating content
94+
95+
96+
## Contributing
97+
Contributions are welcome! To contribute please:
98+
1. Make a PR with a descriptive name
99+
2. If you are updating [`genai-workshop.ipynb`](genai-workshop.ipynb) please ensure to clear all outputs before committing.
100+
3. Do not alter the [`genai-workshop-w-outputs.ipynb`](genai-workshop-w-outputs.ipynb) file. This file is autogenerated upon creating/updating PRs.

data-load.ipynb renamed to customers-and-products/data-load.ipynb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"metadata": {},
77
"source": [
88
"# Neo4j Generative AI - Data Loading\n",
9-
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neo4j-product-examples/genai-workshop/blob/main/data-load.ipynb)\n",
9+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neo4j-product-examples/genai-workshop/blob/main/customers-and-products/data-load.ipynb)\n",
1010
"\n",
1111
"This workshop will teach you how to use Neo4j for Graph-Powered Retrieval-Augmented Generation (GraphRAG) to enhance GenAI and improve response quality for real-world applications.\n",
1212
"\n",
@@ -18,7 +18,7 @@
1818
"- Building the knowledge graph and\n",
1919
"- generating text embeddings from scratch\n",
2020
"\n",
21-
"[genai-workshop.ipynb](https://github.com/neo4j-product-examples/genai-workshop/blob/main/genai-workshop.ipynb) contains the rest of the workshop including\n",
21+
"[genai-workshop.ipynb](https://github.com/neo4j-product-examples/genai-workshop/blob/main/customers-and-products/genai-workshop.ipynb) contains the rest of the workshop including\n",
2222
" - Vector search\n",
2323
" - Graph patterns to improve semantic search\n",
2424
" - Augmenting semantic search with graph data science\n",
@@ -236,7 +236,7 @@
236236
"This workshop will leverage the [H&M Personalized Fashion Recommendations Dataset](https://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/data), a sample of real customer purchase data that includes rich information around products including names, types, descriptions, department sections, etc.\n",
237237
"\n",
238238
"*Bonus!*\n",
239-
"The data we use is a sampled and preformatted version of the Kaggle data. If you are interested in what we did, you can find the details [here](https://github.com/neo4j-product-examples/genai-workshop/blob/main/data-prep.ipynb)"
239+
"The data we use is a sampled and preformatted version of the Kaggle data. If you are interested in what we did, you can find the details [here](https://github.com/neo4j-product-examples/genai-workshop/blob/main/customers-and-products/data-prep.ipynb)"
240240
]
241241
},
242242
{
@@ -540,8 +540,16 @@
540540
"metadata": {},
541541
"source": [
542542
"## Next Steps\n",
543-
"Analyze the graph, try out a vector search, and learn how to enhance search with graphs and graph data science in [genai-workshop.ipynb](https://github.com/neo4j-product-examples/genai-workshop/blob/main/genai-workshop.ipynb)\n"
543+
"Analyze the graph, try out a vector search, and learn how to enhance search with graphs and graph data science in [genai-workshop.ipynb](https://github.com/neo4j-product-examples/genai-workshop/blob/main/customers-and-products/genai-workshop.ipynb)\n"
544544
]
545+
},
546+
{
547+
"metadata": {},
548+
"cell_type": "code",
549+
"outputs": [],
550+
"execution_count": null,
551+
"source": "",
552+
"id": "fceb214524a7764a"
545553
}
546554
],
547555
"metadata": {
File renamed without changes.

genai-example-app-only.ipynb renamed to customers-and-products/genai-example-app-only.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"source": [
1010
"# Neo4j Generative AI Workshop Example Application\n",
11-
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neo4j-product-examples/genai-workshop/blob/main/genai-example-app-only.ipynb)\n",
11+
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neo4j-product-examples/genai-workshop/blob/main/customers-and-products/genai-example-app-only.ipynb)\n",
1212
"\n",
1313
"__This notebook is a copy of `genai-workshop.ipynb` that contains only the final section: the example application for the LLM content generator. This notebook assumes you have already run `genai-workshop.ipynb`.__\n",
1414
"\n",
@@ -33,7 +33,7 @@
3333
},
3434
"source": [
3535
"### Some Logistics\n",
36-
"1. Make a copy of this notebook in Colab by [clicking here](https://colab.research.google.com/github/neo4j-product-examples/genai-workshop/blob/main/genai-workshop.ipynb).\n",
36+
"1. Make a copy of this notebook in Colab by [clicking here](https://colab.research.google.com/github/neo4j-product-examples/genai-workshop/blob/main/customers-and-products/genai-workshop.ipynb).\n",
3737
"2. Run the pip install below to get the necessary dependencies. this can take a while. Then run the following cell to import relevant libraries\n"
3838
]
3939
},

0 commit comments

Comments
 (0)