Skip to content

Fixes Colab issue and updates aieng-rag-utils module #10

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 0 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,3 @@ jobs:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: dist/

- name: Create GitHub Release
id: create_release
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
with:
artifacts: "dist/*"
generateReleaseNotes: true
5 changes: 4 additions & 1 deletion aieng-rag-utils/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "aieng-rag-utils"
version = "0.1.0a1"
version = "1.0.0"
description = "Helper modules for AI Engineering RAG Bootcamp reference implementations"
authors = [{name = "Vector AI Engineering", email = "[email protected]"}]
requires-python = ">=3.10"
Expand All @@ -19,11 +19,14 @@ dependencies = [
"llama-index-core>=0.12.37",
"llama-index-llms-huggingface>=0.5.0",
"llama-index-llms-openai-like>=0.1.3",
"llama-index-readers-json>=0.3.0",
"llama-index-readers-s3>=0.4.0",
"llama-index-retrievers-bm25>=0.5.2",
"llama-index-vector-stores-faiss>=0.1.2",
"llama-index-vector-stores-weaviate>=1.3.1",
"langchain-openai>=0.3.8",
"ragas>=0.2.15",
"rapidfuzz>=3.13.0",
"torch==2.1.2",
"weaviate-client==4.9.3",
]
Expand Down
8 changes: 5 additions & 3 deletions implementations/cloud_search/s3_search_llamaindex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "214d4de8-3a05-43dd-8a44-82c22570a553",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/uv-migration/implementations/cloud_search/s3_search_llamaindex.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/cloud_search/s3_search_llamaindex.ipynb)\n",
"\n",
"# Amazon AWS S3 Search with LlamaIndex"
]
Expand Down Expand Up @@ -59,7 +59,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -694,7 +696,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "3d86f6cd",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/document_search/document_search_langchain.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/document_search/document_search_langchain.ipynb)\n",
"\n",
"# Document Search with LangChain"
]
Expand Down Expand Up @@ -53,7 +53,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu langchain langchain-community langchain-huggingface langchain-openai # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu langchain langchain-community langchain-huggingface langchain-openai aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -527,7 +529,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "3d86f6cd",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/document_search/document_search_langchain_cohere.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/document_search/document_search_langchain_cohere.ipynb)\n",
"\n",
"# Document Search with LangChain using Cohere"
]
Expand Down Expand Up @@ -53,7 +53,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu langchain langchain-community langchain-huggingface langchain-cohere # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu langchain langchain-community langchain-huggingface langchain-cohere aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -524,7 +526,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "3d86f6cd",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/document_search/document_search_llamaindex.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/document_search/document_search_llamaindex.ipynb)\n",
"\n",
"# Document Search with LlamaIndex"
]
Expand Down Expand Up @@ -53,7 +53,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -579,7 +581,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "3d86f6cd",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/document_search/document_search_llamaindex_cohere.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/document_search/document_search_llamaindex_cohere.ipynb)\n",
"\n",
"# Document Search with LlamaIndex using Cohere"
]
Expand Down Expand Up @@ -53,7 +53,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-cohere llama-index-vector-stores-faiss # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-cohere llama-index-vector-stores-faiss aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -575,7 +577,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
8 changes: 5 additions & 3 deletions implementations/pubmed_qa/pubmed_qa_llamaindex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "2e979eb9-3fe0-49c2-b814-f4025ed81934",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/pubmed_qa/pubmed_qa_llamaindex.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/pubmed_qa/pubmed_qa_llamaindex.ipynb)\n",
"\n",
"# PubMed QA using LlamaIndex\n",
"\n",
Expand Down Expand Up @@ -54,7 +54,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu langchain llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu langchain llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -1360,7 +1362,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
8 changes: 5 additions & 3 deletions implementations/rag_evaluation/rag_evaluation_basic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "8f35cfba",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/rag_evaluation/rag_evaluation_basic.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/rag_evaluation/rag_evaluation_basic.ipynb)\n",
"\n",
"# RAG Evaluation Basic Demo"
]
Expand Down Expand Up @@ -59,7 +59,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu datasets langchain langchain-openai langchain-huggingface ragas # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu datasets langchain langchain-openai langchain-huggingface ragas aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -460,7 +462,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "4168e6b6",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/rag_evaluation/rag_evaluation_testset_generation.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/rag_evaluation/rag_evaluation_testset_generation.ipynb)\n",
"\n",
"# RAG Evaluation Test Set Generation\n",
"\n",
Expand Down Expand Up @@ -53,7 +53,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu datasets langchain langchain-community langchain-openai langchain-huggingface ragas==0.1.22 # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu datasets langchain langchain-community langchain-openai langchain-huggingface ragas==0.1.22 aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -1221,7 +1223,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
10 changes: 6 additions & 4 deletions implementations/sql_search/sql_search_langchain.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "3d86f6cd",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/sql_search/sql_search_langchain.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/sql_search/sql_search_langchain.ipynb)\n",
"\n",
"# SQL Search (structured data) with LangChain"
]
Expand Down Expand Up @@ -48,7 +48,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "eb9b534f",
"metadata": {},
"outputs": [],
Expand All @@ -58,7 +58,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu langchain langchain-community langchain-experimental langchain-openai kaggle # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu langchain langchain-community langchain-experimental langchain-openai kaggle aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -757,7 +759,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
6 changes: 4 additions & 2 deletions implementations/web_search/web_search_langchain.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "3d86f6cd",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/web_search/web_search_langchain.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/web_search/web_search_langchain.ipynb)\n",
"\n",
"# Web Search with Langchain"
]
Expand Down Expand Up @@ -53,7 +53,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu langchain langchain-community langchain-huggingface langchain-openai # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu langchain langchain-community langchain-huggingface langchain-openai aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune\n"
]
},
{
Expand Down
8 changes: 5 additions & 3 deletions implementations/web_search/web_search_llamaindex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "3d86f6cd",
"metadata": {},
"source": [
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/web_search/web_search_llamaindex.ipynb)\n",
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/web_search/web_search_llamaindex.ipynb)\n",
"\n",
"# Web Search with LlamaIndex"
]
Expand Down Expand Up @@ -54,7 +54,9 @@
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
" # This is a Google Colab environment\n",
" # Install required dependencies\n",
" !pip3 install faiss-cpu langchain llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss # aieng-rag-utils"
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu langchain llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss aieng-rag-utils\n",
" # Uninstall conflicting dependencies in the Colab environment\n",
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
]
},
{
Expand Down Expand Up @@ -597,7 +599,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "rag-bootcamp",
"language": "python",
"name": "python3"
},
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ dependencies = [
"llama-index-llms-cohere>=0.1.7",
"llama-index-llms-huggingface>=0.5.0",
"llama-index-llms-openai-like>=0.1.3",
"llama-index-readers-json>=0.3.0",
"llama-index-retrievers-bm25>=0.5.2",
"llama-index-vector-stores-faiss>=0.1.2",
"llama-index-vector-stores-weaviate>=1.3.1",
"nltk==3.9.1",
Expand All @@ -38,7 +36,6 @@ dependencies = [
"pandas==2.2.1",
"pypdf>=5.5.0",
"ragas>=0.2.15",
"rapidfuzz>=3.13.0",
"requests==2.32.3",
"safetensors>=0.4.2",
"sentence-transformers==3.3.1",
Expand Down