{"id":24972970,"url":"https://github.com/weaviate-tutorials/odsc-ai-builders-2025","last_synced_at":"2025-10-13T14:05:16.409Z","repository":{"id":273615160,"uuid":"920140803","full_name":"weaviate-tutorials/odsc-ai-builders-2025","owner":"weaviate-tutorials","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-24T11:32:18.000Z","size":3371,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T06:11:21.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weaviate-tutorials.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-21T16:26:21.000Z","updated_at":"2025-01-25T15:20:51.000Z","dependencies_parsed_at":"2025-03-29T06:11:09.849Z","dependency_job_id":"ca1f0443-1987-42ac-91d6-4d6b0451b8aa","html_url":"https://github.com/weaviate-tutorials/odsc-ai-builders-2025","commit_stats":null,"previous_names":["weaviate-tutorials/odsc-ai-builders-2025"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2Fodsc-ai-builders-2025","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2Fodsc-ai-builders-2025/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2Fodsc-ai-builders-2025/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2Fodsc-ai-builders-2025/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaviate-tutorials","download_url":"https://codeload.github.com/weaviate-tutorials/odsc-ai-builders-2025/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249347324,"owners_count":21255148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-03T18:11:01.267Z","updated_at":"2025-10-13T14:05:11.361Z","avatar_url":"https://github.com/weaviate-tutorials.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Database Design Patterns\n\n\u003e [!NOTE]\n\u003e The repository was a part of the ODSC AI Builders' Summit 2025 workshop - \"Database Design Patterns: Single Collection vs Multi-Tenancy\". If you have any questions, please feel free to reach out to the author, or open an issue on this repository.\n\n# Step 1: Preparation \u0026 Setup\n\nClone this repo and navigate into it. This will be your working directory for the workshop.\n\n```shell\ngit clone git@github.com:weaviate-tutorials/odsc-ai-builders-2025.git\ncd odsc-ai-builders-2025\n```\n\n## 1.1 Install Python \u0026 set up a virtual environment\n\n\u003e [!NOTE]\n\u003e If you have a preferred setup (e.g. Conda/Poetry), please feel free to use that. Otherwise, we recommend following these steps.\n\nInstall `Python 3.9` or higher (e.g. from the [Python website](https://python.org/), or `pyenv`).\n\nThen, create \u0026 activate a virtual environment:\n\n```shell\npython -m venv .venv  # Or use `python3` if `python` is Python 2\nsource .venv/bin/activate\n```\n\nCheck that you are using the correct Python:\n\n```shell\nwhich python\n```\n\nThis should point to the Python binary in the `.venv` directory.\n\nInstall the required Python packages:\n\n```shell\npip install -r requirements.txt\n```\n\n\u003e [!TIP]\n\u003e If you have network connectivity issues, the installation may time out part way through. If this happens, just try running the command again. It will re-used cached data, so you will make further\n\n\u003e [!TIP]\n\u003e If you open new terminal or shell window, you will need to activate the virtual environment again. Navigate to the project directory and run `source .venv/bin/activate`.\n\n## 1.2 Choose your embedding \u0026 LLM provider\n\nThe workshop is set up for two different embeddings \u0026 LLM providers options ([Cohere](#121-option-1-cohere) or [Ollama](#122-option-2-ollama)).\n\n### 1.2.1 Option 1: Cohere\n\n\u003e [!NOTE]\n\u003e - Recommended if you want to use an API-based solution\n\u003e     - We will use pre-embedded data for this workshop, so the expense will be for queries only \u0026 minimal\n\u003e     - Still, please set a budget limit in your account for extra safety\n\nYou can use your own Cohere API key in the notebook. You can use a free \"trial\" key, which should be sufficient for this workshop.\n\n### 1.2.2 Option 2: Ollama\n\n\u003e [!NOTE]\n\u003e - Recommended if you have 16+ GB of RAM and a modern computer\n\u003e - We will use pre-embedded data for this workshop, so Ollama will be used for vectorizing queries \u0026 LLM use\n\u003e - No account or API key required\n\nDownload \u0026 install Ollama from the [Ollama website](https://ollama.com/). Make sure Ollama is running, by:\n\n```shell\nollama -v\n```\n\nYou should see something like:\n```shell\n❯ ollama -v\nollama version is 0.5.7\n```\n\nThen, run the following command:\n\n```shell\n\u003e ollama pull nomic-embed-text \u0026\u0026 ollama pull gemma2:2b\n```\n\nThis will download the required models for the workshop.\n\n## 1.3 Install Docker\n\nInstall Docker Desktop: https://www.docker.com/products/docker-desktop/\n\nStart up a Weaviate cluster with the following command:\n\n```shell\ndocker compose up -d\n```\n\nThis will start a single-node Weaviate cluster.\n\nCheck an Weaviate endpoint:\n\n```shell\ncurl http://localhost:8080/v1/meta | jq\n```\n\nYou should see a response - this means Weaviate is running!\n\nYou should be able to see the memory usage of the Weaviate pod by running:\n\n```shell\ngo tool pprof -top http://localhost:6060/debug/pprof/heap\n```\n\n# Step 3: Work with Weaviate\n\n## 3.1 Work through the notebooks\n\nSee: `1_single_collection.ipynb` and `2_multi_tenancy.ipynb` notebooks and work through them during the workshop.\n\n\u003e [!TIP]\n\u003e Hint: The `finished_notebooks` branch contains pre-populated versions of the notebooks!\n\n## 3.2 Run the demo Streamlit app\n\nWe have a Streamlit app that will help you to visualise basic cluster statistics, and to make use of the data. (Remember to navigate to the project directory and activate the virtual environment.) Run it with:\n\n```shell\nstreamlit run app.py\n```\n\nThis will throw an error, but that's OK. We'll fix that along the way.\n\n## Finish up\n\n### Docker\n\nWhen finished with the workshop, you can stop the cluster with:\n\n```shell\ndocker compose -f docker-compose.yml down\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaviate-tutorials%2Fodsc-ai-builders-2025","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaviate-tutorials%2Fodsc-ai-builders-2025","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaviate-tutorials%2Fodsc-ai-builders-2025/lists"}