https://github.com/intersystems-ib/workshop-llm
๐ง Hands-on RAG workshop using InterSystems IRIS & LLMs - Build PDF Q&A systems, natural language-to-SQL interfaces, and learn AI agent architecture with local/cloud options
https://github.com/intersystems-ib/workshop-llm
ai-workshop intersystems-iris jupyter-notebooks langchain llm mistral-ai openai pdf-qa python rag text-to-sql transformers vector-database
Last synced: about 2 months ago
JSON representation
๐ง Hands-on RAG workshop using InterSystems IRIS & LLMs - Build PDF Q&A systems, natural language-to-SQL interfaces, and learn AI agent architecture with local/cloud options
- Host: GitHub
- URL: https://github.com/intersystems-ib/workshop-llm
- Owner: intersystems-ib
- License: mit
- Created: 2024-10-07T10:40:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-06T09:54:30.000Z (7 months ago)
- Last Synced: 2025-11-06T11:26:07.489Z (7 months ago)
- Topics: ai-workshop, intersystems-iris, jupyter-notebooks, langchain, llm, mistral-ai, openai, pdf-qa, python, rag, text-to-sql, transformers, vector-database
- Language: Jupyter Notebook
- Homepage:
- Size: 1.85 MB
- Stars: 0
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ง LLM Workshop with InterSystems IRIS
Welcome to the **Retrieval-Augmented Generation (RAG)** workshop! ๐ This hands-on experience will teach you how to build intelligent AI applications that combine the power of Large Language Models with vector databases using InterSystems IRIS.
## ๐ฏ What You'll Learn
In this workshop, you'll become a **RAG wizard** by building three different types of AI applications:
1. **๐ PDF Question-Answering Systems** - Make documents talk! Transform static PDFs into interactive knowledge bases
2. **๐ Natural Language to SQL** - Speak to databases in plain English (or Spanish!) and get intelligent responses
3. **๐ค Complete AI Agent Architecture** - Understand how to build production-ready AI agents
This workshop is developed in Python ๐ (Jupyter Notebook) and **InterSystems IRIS** - because why settle for ordinary databases when you can have one that speaks vector? ๐
## ๐ ๏ธ Prerequisites
Make sure you have these tools ready for battle:
* [Git](https://git-scm.com/downloads) ๐ฆ
* [Docker](https://www.docker.com/products/docker-desktop) ๐ณ (Windows users: enable "Linux containers")
* [Docker Compose](https://docs.docker.com/compose/install/) ๐ผ
* [Visual Studio Code](https://code.visualstudio.com/download) + [InterSystems ObjectScript Extension](https://marketplace.visualstudio.com/items?itemName=daimor.vscode-objectscript) ๐ง
## ๐ Setup & Launch
Time to bring this beast to life! ๐ช
**1. Clone the repository:**
```bash
git clone https://github.com/intersystems-ib/workshop-llm
cd workshop-llm
```
**2. Build the image:**
```bash
docker compose build
```
**3. Launch the containers:**
```bash
docker compose up -d
```
**4. Access your AI playground:**
* ๐๏ธ **InterSystems IRIS Management Portal**: [http://localhost:52774/csp/sys/UtilHome.csp](http://localhost:52774/csp/sys/UtilHome.csp)
- Login: `superuser` / `SYS`
* ๐ **Jupyter Notebook**: [http://localhost:8888](http://localhost:8888)
## ๐งช Workshop Exercises
### ๐ Medicine Leaflet Q&A (PDF RAG Systems)
Transform boring medical documents into an intelligent assistant! Using Spanish medicine leaflets in [./data](./data), you'll build systems that can answer questions like a knowledgeable pharmacist. ๐
**Choose your adventure:**
* **๐ [PDF-RAG-CloudLLM.ipynb](./jupyter/PDF-RAG-CloudLLM.ipynb)** - Cloud-powered RAG using [Mistral AI](https://mistral.ai)
- *Perfect for: Production systems, highest accuracy, API-based*
* **๐ [PDF-RAG-LocalModels.ipynb](./jupyter/PDF-RAG-LocalModels.ipynb)** - Privacy-first with local models
- *Perfect for: Complete privacy, offline operation, no API costs*

### ๐ฉ Holefoods Text-to-SQL Adventure
Meet **Holefoods** - a quirky company that sells food with holes in it! ๐ฉ (Creative, right?)
Build an intelligent SQL assistant that translates natural language into database queries. Ask questions like *"How many donuts did we sell in Europe last month?"* and watch the magic happen! โจ
* **๐ฃ๏ธ [NaturalLanguage-to-SQL.ipynb](./jupyter/NaturalLanguage-to-SQL.ipynb)** - Your multilingual database whisperer
- *Features: Semantic similarity, few-shot learning, IRIS SQL optimization*
## ๐ Inspiration: Full AI Agent Demo
Want to see the full power of AI agents in action? Check out this **complete customer support agent** built with **smolagents** and **InterSystems IRIS**:
๐ **[Customer Support AI Agent Demo](https://github.com/intersystems-ib/customer-support-agent-demo)**
๐ **[Developer Community Article](https://community.intersystems.com/post/build-customer-support-ai-agent-smolagents-intersystems-iris-sql-rag-interoperability)** - Deep dive explanation
This demo showcases:
- ๐ค **Autonomous AI agents** that can reason and take actions
- ๐ **SQL + RAG integration** for comprehensive data access
- ๐ **InterSystems IRIS interoperability** for enterprise-grade systems
- ๐ฏ **Production-ready architecture** you can actually deploy
## ๐ ๏ธ Advanced: Local Development Environment
Ready to build your own AI applications? Set up a local Python environment:
**For Mac/Linux users:**
```bash
cd python
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
```
**For Windows users:**
```bash
cd python
python -m venv .venv
./.venv/Scripts/Activate.ps1
pip3 install -r requirements.txt
```
**Create your API keys file:**
```bash
# Create .env file
echo 'OPENAI_API_KEY="your-openai-key"' > .env
echo 'MISTRAL_API_KEY="your-mistral-key"' >> .env
```
### ๐ Text-to-SQL API Service
Want to productionize your SQL skills? Try our FastAPI service based on the notebook:
```bash
cd python/holefoods_text2sql
fastapi dev main.py
```
๐ **Explore the API**: [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)
### ๐ฌ Streamlit Chatbot Assistant
Experience a beautiful chat interface:
```bash
cd python/assistant
streamlit run chatbot.py
```
๐จ **Chat away**: [http://localhost:8501](http://localhost:8501)
**Challenge:** Can you integrate the medicine leaflet logic into this assistant? ๐ค
## ๐ Learning Resources
Want to dive deeper into the InterSystems universe?
- ๐ **[InterSystems Learning](https://learning.intersystems.com)** - Your gateway to mastery
- ๐๏ธ **[InterSystems IRIS Documentation](https://docs.intersystems.com/iris/)** - The sacred texts
- ๐ฅ **[Developer Community](https://community.intersystems.com/)** - Where the magic happens
## ๐ Ready to Build the Future?
You're now equipped with the knowledge to build:
- ๐ฎ **Intelligent document systems** that understand context
- ๐ฃ๏ธ **Natural language database interfaces** that feel like magic
- ๐ค **Complete AI agents** that can reason and act autonomously
**Go forth and create amazing AI applications!** The only limit is your imagination! ๐โจ
---