A demonstration system for retrieving similar support requests, recommending appropriate specialists, and generating draft resolutions from historical cases.
This repository is a sanitized demonstration version of an AI engineering practicum project. It contains application code only; no internal company datasets, credentials, or production infrastructure are included.
- Imports historical support requests from structured XLSX registers.
- Normalizes multiple dated worksheets and upserts request history into PostgreSQL.
- Produces concise request summaries with structured LLM output and retry handling.
- Creates semantic embeddings with
paraphrase-multilingual-MiniLM-L12-v2. - Stores and queries request vectors in a persistent ChromaDB collection.
- Retrieves similar historical cases for a selected request.
- Ranks specialists using relevant resolved cases and current open workload.
- Generates a draft resolution grounded in solutions from retrieved cases.
- Provides a Streamlit interface for browsing, filtering, ingestion, and recommendations.
flowchart TD
A[XLSX registers] --> B[Normalization and LLM summaries]
B --> C[PostgreSQL]
C --> D[Embedding pipeline]
D --> E[ChromaDB]
E --> F[Similar cases]
F --> G[Specialist ranking]
F --> H[Grounded draft resolution]
The specialist recommender aggregates semantically similar cases by assignee. Resolved cases increase an expertise score, unresolved cases reduce it, and current open requests are used as a workload signal. If suitable specialists with no open tasks exist, the system prioritizes them before applying the expertise ranking.
Draft resolutions are generated only from retrieved cases that contain an existing solution. The prompt instructs the model to rely on those examples instead of introducing unsupported facts, and the UI displays the source request IDs.
Python, Streamlit, PostgreSQL, SQLAlchemy, ChromaDB, Sentence Transformers, OpenAI API, Pandas, and Docker Compose.
git clone https://github.com/Gregory-mcbit/Galaxy-practice.git
cd Galaxy-practice
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtCreate a .env file:
DATABASE_URL=postgresql+psycopg2://app:app@localhost:5432/support
OPENAI_API_KEY=your_openai_api_key
OPENAI_SUMMARY_MODEL=gpt-5-mini
OPENAI_SOLUTION_MODEL=gpt-5-miniThe model variables are optional and can be changed to compatible OpenAI models.
docker compose up -d
python -m app.init_dbstreamlit run ui_interface.pyUse the upload section to ingest a compatible XLSX register and rebuild the vector index. The importer expects worksheets whose names begin with Реестр обращений and columns matching the schema used in app/ingest/ingest.py.
The public repository intentionally excludes real support records and personally identifiable information. To run the demo, provide a compatible anonymized or synthetic dataset.