{"id":48257528,"url":"https://github.com/codehass/it-support-rag-assistant","last_synced_at":"2026-04-04T21:18:45.939Z","repository":{"id":335523675,"uuid":"1142784349","full_name":"codehass/it-support-rag-assistant","owner":"codehass","description":"Industrial-grade RAG Assistant for IT Support. Built with LangChain \u0026 FastAPI, managed via MLflow, and deployed with Docker/K8s. Features unsupervised query clustering and full CI/CD integration.","archived":false,"fork":false,"pushed_at":"2026-02-11T21:24:55.000Z","size":658,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-12T05:48:52.519Z","etag":null,"topics":["docker","fastapi","kubernetes","mlflow","postgresql","python3"],"latest_commit_sha":null,"homepage":"","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/codehass.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-26T21:14:03.000Z","updated_at":"2026-02-11T21:25:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/codehass/it-support-rag-assistant","commit_stats":null,"previous_names":["codehass/it-support-rag-assistant"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codehass/it-support-rag-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codehass%2Fit-support-rag-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codehass%2Fit-support-rag-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codehass%2Fit-support-rag-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codehass%2Fit-support-rag-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codehass","download_url":"https://codeload.github.com/codehass/it-support-rag-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codehass%2Fit-support-rag-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31414647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker","fastapi","kubernetes","mlflow","postgresql","python3"],"created_at":"2026-04-04T21:18:45.295Z","updated_at":"2026-04-04T21:18:45.924Z","avatar_url":"https://github.com/codehass.png","language":"Jupyter Notebook","readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"public/logo-dark.png\" alt=\"logo\" width=\"140\"  height=\"auto\" /\u003e\n\n  \u003cbr/\u003e\n\u003c/div\u003e\n\n# 📗 Table of Contents\n\n- [📖 About the Project](#about-project)\n  - [🛠 Built With](#built-with)\n    - [Tech Stack](#tech-stack)\n    - [Key Features](#key-features)\n  - [🚀 Live Demo](#live-demo)\n- [💻 Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Setup](#setup)\n  - [Install](#install)\n  - [Configuration](#configuration)\n  - [Usage](#usage)\n  - [API Endpoints](#api-endpoints)\n- [👥 Authors](#authors)\n- [🔭 Future Features](#future-features)\n- [🤝 Contributing](#contributing)\n- [⭐️ Show your support](#support)\n- [📝 License](#license)\n\n# 📖 IT Support RAG Assistant \u003ca name=\"about-project\"\u003e\u003c/a\u003e\n\n**IT Support RAG Assistant** is a powerful API designed to automate IT support queries using Retrieval-Augmented Generation (RAG). It combines the power of Large Language Models (Google Gemini) with a local knowledge base (ChromaDB) to provide accurate, context-aware answers to user questions.\n\nThe system features robust authentication, query history tracking, automatic query clustering using machine learning, and comprehensive experiment tracking with MLflow.\n\n## 🛠 Built With \u003ca name=\"built-with\"\u003e\u003c/a\u003e\n\n### Tech Stack \u003ca name=\"tech-stack\"\u003e\u003c/a\u003e\n\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"https://fastapi.tiangolo.com/\"\u003eFastAPI\u003c/a\u003e - Modern, high-performance web framework for building APIs.\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://www.postgresql.org/\"\u003ePostgreSQL\u003c/a\u003e - Advanced open-source relational database.\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://www.sqlalchemy.org/\"\u003eSQLAlchemy\u003c/a\u003e - The Python SQL Toolkit and Object Relational Mapper.\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://python.langchain.com/\"\u003eLangChain\u003c/a\u003e - Framework for developing applications powered by LLMs.\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://www.trychroma.com/\"\u003eChromaDB\u003c/a\u003e - AI-native open-source vector database.\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://mlflow.org/\"\u003eMLflow\u003c/a\u003e - Open source platform for the machine learning lifecycle.\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://deepmind.google/technologies/gemini/\"\u003eGoogle Gemini\u003c/a\u003e - Generative AI models.\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://huggingface.co/\"\u003eHugging Face\u003c/a\u003e - Platform for ML models (Embeddings).\u003c/li\u003e\n  \u003c/ul\u003e\n\n### Key Features \u003ca name=\"key-features\"\u003e\u003c/a\u003e\n\n- **🔐 Secure Authentication**: User registration and login with JWT-based authentication stored in HTTP-only cookies.\n- **🤖 RAG-Powered QA**: Retrieval-Augmented Generation pipeline to answer support queries using your knowledge base.\n- **📦 Query Clustering**: Automatic clustering of user queries to categorize support topics using a trained ML model.\n- **📊 Experiment Tracking**: Full integration with MLflow to track RAG metrics (latency, number of chunks) and query results.\n- **📜 History Management**: Retrieve past user queries and generated answers.\n- **🐳 Dockerized**: Container-ready application with Dockerfile included.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 🚀 Live Demo \u003ca name=\"live-demo\"\u003e\u003c/a\u003e\n\n- [Live Demo Link](link to deployed project)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 💻 Getting Started \u003ca name=\"getting-started\"\u003e\u003c/a\u003e\n\nTo get a local copy up and running, follow these steps.\n\n### Prerequisites\n\n- [uv](https://docs.astral.sh/uv/) (Recommended for managing dependencies and environments)\n- Python 3.12+ (managed by uv)\n- PostgreSQL\n- Docker (optional)\n\n### Setup\n\nClone this repository to your desired folder:\n\n```sh\ngit clone https://github.com/codehass/it-support-rag-assistant.git\ncd it-support-rag-assistant\n```\n\n### Install\n\nInstall dependencies and create the virtual environment automatically:\n\n```sh\nuv sync\n```\n\n### Configuration\n\nCreate a `.env` file in the root directory and add your environment variables. You can copy `.env.example` as a template:\n\n```sh\ncp .env.example .env\n```\n\n**Required `.env` Variables:**\n\n```env\nUSER_DB=postgres\nPASSWORD=your_password\nDATABASE_HOST=localhost\nPORT=5432\nDATABASE=your_database_name\n\n# HuggingFace \u0026 Google API\nHF_TOKEN=your_huggingface_token_here\nGOOGLE_API_KEY=your_google_api_key_here\n\n# Authentication\nSECRET_KEY=your_secure_secret\nALGORITHM=HS256\nACCESS_TOKEN_EXPIRE_MINUTES=30\n\nFRONTEND_URL=http://localhost:3000\n```\n\n### Usage\n\n1. **Start the Database**: Ensure your PostgreSQL service is running and the database is created.\n\n2. **Run the API**:\n   ```sh\n   uv run fastapi dev app/main.py\n   ```\n   The API will be available at `http://localhost:8000`.\n\n3. **Explore Documentation**:\n   Go to `http://localhost:8000/docs` for the interactive Swagger UI.\n\n4. **Start MLflow UI** (Optional, for tracking):\n   ```sh\n   uv run mlflow ui\n   ```\n   Access MLflow dashboard at `http://localhost:5000`.\n\n### Testing \u0026 Linting\n\n1. **Run Linting** (Ruff):\n   ```sh\n   uv run ruff check .\n   ```\n\n2. **Run Tests** (Pytest):\n   ```sh\n   uv run pytest\n   ```\n\n### API Endpoints\n\n**Authentication**\n- `POST /api/v1/auth/register` - Register a new user\n- `POST /api/v1/auth/login` - Login to get access token (cookie)\n- `POST /api/v1/auth/logout` - Logout user\n- `GET /api/v1/auth/users/me` - Get current user info\n\n**RAG Support**\n- `POST /api/v1/rag/query` - Ask a question to the IT Support Assistant\n- `GET /api/v1/rag/history` - Get your query history\n- `GET /api/v1/rag/health` - Check backend health status\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 👥 Authors \u003ca name=\"authors\"\u003e\u003c/a\u003e\n\n👤 **Hassan El Ouardy**\n\n- GitHub: [@codehass](https://github.com/codehass)\n- Twitter: [@hassanelourdy](https://twitter.com/hassanelourdy)\n- LinkedIn: [@hassanelourdy](https://www.linkedin.com/in/hassanelouardy/)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 🔭 Future Features \u003ca name=\"future-features\"\u003e\u003c/a\u003e\n\n- [ ] **Voice Interface**: Enable voice-to-text for querying.\n- [ ] **Admin Dashboard**: Analytics view for IT support managers.\n- [ ] **Feedback Loop**: User feedback mechanism to improve RAG accuracy.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 🤝 Contributing \u003ca name=\"contributing\"\u003e\u003c/a\u003e\n\nContributions, issues, and feature requests are welcome!\n\nFeel free to check the [issues page](https://github.com/codehass/it-support-rag-assistant/issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ⭐️ Show your support \u003ca name=\"support\"\u003e\u003c/a\u003e\n\nIf this project helps you, give it a ⭐️!\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 📝 License \u003ca name=\"license\"\u003e\u003c/a\u003e\n\nThis project is [MIT](./MIT.md) licensed.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodehass%2Fit-support-rag-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodehass%2Fit-support-rag-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodehass%2Fit-support-rag-assistant/lists"}