{"id":30194161,"url":"https://github.com/pacificcommunity/nerd-rag-local-workshop","last_synced_at":"2026-02-08T21:02:30.766Z","repository":{"id":292932868,"uuid":"982418253","full_name":"PacificCommunity/nerd-rag-local-workshop","owner":"PacificCommunity","description":"Materials for a Nerd Lazy Morning workshop on deploying a RAG locally","archived":false,"fork":false,"pushed_at":"2025-05-25T21:34:56.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-25T22:29:03.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PacificCommunity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-05-12T21:17:50.000Z","updated_at":"2025-05-25T21:35:00.000Z","dependencies_parsed_at":"2025-05-12T22:30:43.115Z","dependency_job_id":"2ea3202c-6f40-4144-b5b4-9ff8032b9c43","html_url":"https://github.com/PacificCommunity/nerd-rag-local-workshop","commit_stats":null,"previous_names":["pacificcommunity/nerd-rag-local-workshop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PacificCommunity/nerd-rag-local-workshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fnerd-rag-local-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fnerd-rag-local-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fnerd-rag-local-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fnerd-rag-local-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PacificCommunity","download_url":"https://codeload.github.com/PacificCommunity/nerd-rag-local-workshop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fnerd-rag-local-workshop/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270171091,"owners_count":24539368,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-13T02:51:36.691Z","updated_at":"2026-02-08T21:02:25.733Z","avatar_url":"https://github.com/PacificCommunity.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"DRAFT WP\n\n# A RAG of one's own\n\nMaterial for a _Nerd Lazy Morning_ workshop in which we'll build and deploy a local operated RAG.\n\n## Introduction\n\nThere's a bazillion tutorials online. And many are great, and I've based this notes on many of those. Without any prentese that this take is unique, my approach is: build a fully _local_ system with Ollama and ChromaDB (or in memory solution for small scale models); spend some time on demystifying jargon and math behind it; do it in two different languages, as the ideas and tools are pretty universal nowadays (and I love an opportunity to showcase Julia).\n\n## Party plan\n\nThe two hour plan is:\n\n1) let's do a first quick run in Julia, using RAGTools.jl to solve a real-world problem (research of relevant indicators in a SDMX .Stat based dashboard). This will introduce the ingredients we need (corpus of text, embedding, retrieval, generation). (\u003c 30 minutes, no coding required)\n2) spend a couple of minutes to explain what the stuff is: what's a vector? what's a similarity? what does _retrieval_ do? what does _generate!_ do? (\u003c 30 minutes, scary maths will be tamed)\n3) go through a couple of examples in python, using LangChain, with increasing complexity (or, closer to a production ready solution). (\u003c 1 hour, live-coding, hands-on)\n4) (maybe) if we got time, we might even wrap it up as a server endpoint (flas? LangsServe?) and/or talk about LangSmith to monitor control.\n\n## Setup\n\nYou might need an admin password for your laptop! Keep it hand, or ask IT to help with that!\n\nA bunch of things are needed for running it all. And it would be amazing if people could run them before coming to the workshop, so we don' need to spend too much time on environment setup. THAT SAID, envinroment setup IS the hardest part, probably, and it's where all the magic goes on.\n\nWhat do you need if you want to code along me:\n- a code editor (I use VS Code)\n- a terminal (linux, mac, and Windows come with different choices, they should all do the trick)\n- Ollama\n- ChromeDB\n- (optional) Julia with dependencies\n- Python with dependencies\n\nIf you just want to watch me/your workshop buddy to code, you don't need anything.\n\n### Ollama\n\nFor Windows\n- Download and install from official website: https://ollama.com/download\n  - when done, you should have a little llama living in your application bar, can you find it?\n  - if so, open a terminal and let's start to collect some models\n  - run `ollama pull qwen3:0.6b`  \n  - run `ollama pull nomic-embed-text`  \n  - run `ollama pull snowflake-arctic-embed2`\n- to run an AI model in the terminal (we won't need this, but it's a way to check everything is installed):\n  - in a terminal, run `ollama run qwen3:0.6b`\n  - chat!\n  - when you are happy, run `/bye` to quit\n  \nIn Linux/macOS. You might be more experience than me in your system setup, so take the following as unrequested suggestions.\nIf you are using a package manager, you should be able to install ollama without further ado.\nIf you try to pull a model and you get an error message, it might be the case that the ollama daemon is not working.\n- try running `ollama serve` and pull a model again. did it work?\n- if not, you might need to start the ollama service, try runing `systemctl start ollama`(type them and press enter)\n- to install AI models in your computer so they will be available for us, you need to \"pull\" them:\n  - open another terminal WITHOUT closing the one where you are running `ollama serve`\n  - in this terminal, run `ollama pull qwen3:0.6b`  \n  - run `ollama pull nomic-embed-text`  \n  - run `ollama pull snowflake-arctic-embed2`\n- to run an AI model in the terminal (we won't need this, but it's a way to check everything is installed):\n  - open another terminal WITHOUT closing the one where you are running `ollama serve`\n  - in this terminal, run `ollama run qwen3:0.6b`\n  - chat!\n  - when you are happy, run `/bye`\n\n## ChromeDB\n\nIt will be taken care for you by Python\n\n## Julia\n\nFor Windows/Linux/macOS:\n- use `juliaup`.\n  - in Windows use this link: https://www.microsoft.com/store/apps/9NJNWW8PVKMN\n  - in Linux/macOS use either this command `curl -fsSL https://install.julialang.org | sh` or your favourite package manager (by the way, I `paru -S juliaup`)\n\nWhen JuliaUp installs, it will bring with it a fully functional Julia installation.\n\n### Julia dependency\n\nAs long as you follow the code written here, all the dependency are taken care off by the code (the magic is done by those two files ending in `.toml` and the first three rows of each the two Julia scripts).\n\n## Python\n\nIF you never installed python, and this is your first rodeo, read the following. If you have already shed many a tear in the valley of Python versions management, in the hope of finding a light at the end of the valley of package sorrows, I don't have any word of wisdom, but my shoulder is yours to cry on (we use Python 3.13 but I don't see why we should not be back compatible with whatever Python 3.*, and we have a requirements.txt file).\n\nFor Windows:\n- click on https://www.python.org/ftp/python/3.13.3/python-3.13.3-amd64.exe\n- go ahead, download the file\n- double click on what you downloaded and follow instructions\n  - remember to tick `Add python.exe to PATH`\n\n### Python dependencies\n\nAll the requirements are contained in the file called `requirements.txt`\n\nIf you know how to handle the situation, you don't need to read.\n\nIf you don't:\nYou _should_ be able to install everything following these steps:\n- in the folder where `requirements.txt` \n  - run `pip install -r requirements.txt`\n\n### Trouble shooting\n\nIf in windows you encounter the error \"microsoft visual c++ 14.0 or greater is required pip install\" this video shows how to fix it:\nhttps://www.youtube.com/watch?v=QyY_vJeXEFc (ht to Samantha)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacificcommunity%2Fnerd-rag-local-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacificcommunity%2Fnerd-rag-local-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacificcommunity%2Fnerd-rag-local-workshop/lists"}