Home Applications workshop-llm

workshop-llm

InterSystems does not provide technical support for this project. Please contact its developer for the technical assistance.
4
1 reviews
0
Awards
301
Views
0
IPM installs
0
0
Details
Releases (1)
Reviews (1)
Issues
Python application to demo RAG application using IRIS vector DB

What's new in this version

Initial Release

๐Ÿง  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:

๐Ÿš€ Setup & Launch

Time to bring this beast to life! ๐Ÿ’ช

1. Clone the repository:

git clone https://github.com/intersystems-ib/workshop-llm
cd workshop-llm

2. Build the image:

docker compose build

3. Launch the containers:

docker compose up -d

4. Access your AI playground:

๐Ÿงช Workshop Exercises

๐Ÿ’Š Medicine Leaflet Q&A (PDF RAG Systems)

Transform boring medical documents into an intelligent assistant! Using Spanish medicine leaflets in https://github.com/intersystems-ib/workshop-llm/blob/main/./data, youโ€™ll build systems that can answer questions like a knowledgeable pharmacist. ๐Ÿ’Š

Choose your adventure:

Jupyter Interface

๐Ÿฉ 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 - 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

๐Ÿ“– Developer Community Article - 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:

cd python
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt

For Windows users:

cd python
python -m venv .venv
./.venv/Scripts/Activate.ps1
pip3 install -r requirements.txt

Create your API keys file:

# 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:

cd python/holefoods_text2sql
fastapi dev main.py

๐ŸŒ Explore the API: http://127.0.0.1:8000/docs

๐Ÿ’ฌ Streamlit Chatbot Assistant

Experience a beautiful chat interface:

cd python/assistant
streamlit run chatbot.py

๐ŸŽจ Chat away: http://localhost:8501

Challenge: Can you integrate the medicine leaflet logic into this assistant? ๐Ÿค”

๐ŸŽ“ Learning Resources

Want to dive deeper into the InterSystems universe?

๐ŸŽ‰ 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! ๐Ÿš€โœจ


Made with
Version
1.0.008 Oct, 2024
Ideas portal
Category
Technology Example
Works with
InterSystems IRIS
First published
08 Oct, 2024
Last edited
08 Oct, 2024
Last checked by moderator
31 Jan, 2025Works