{"id":26849146,"url":"https://github.com/hiborn4/llm_booking_analytics_-_qa","last_synced_at":"2025-03-30T21:32:29.136Z","repository":{"id":284038198,"uuid":"952462641","full_name":"HiBorn4/LLM_Booking_Analytics_-_QA","owner":"HiBorn4","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-23T19:32:19.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T20:32:18.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/HiBorn4.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}},"created_at":"2025-03-21T10:15:07.000Z","updated_at":"2025-03-23T19:32:23.000Z","dependencies_parsed_at":"2025-03-23T20:42:58.827Z","dependency_job_id":null,"html_url":"https://github.com/HiBorn4/LLM_Booking_Analytics_-_QA","commit_stats":null,"previous_names":["hiborn4/llm_booking_analytics_-_qa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiBorn4%2FLLM_Booking_Analytics_-_QA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiBorn4%2FLLM_Booking_Analytics_-_QA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiBorn4%2FLLM_Booking_Analytics_-_QA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiBorn4%2FLLM_Booking_Analytics_-_QA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HiBorn4","download_url":"https://codeload.github.com/HiBorn4/LLM_Booking_Analytics_-_QA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246385451,"owners_count":20768668,"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","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-03-30T21:32:28.508Z","updated_at":"2025-03-30T21:32:29.119Z","avatar_url":"https://github.com/HiBorn4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hotel Booking Analytics \u0026 Intelligent Q\u0026A System 🏨📊\n\n[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/)\n[![FastAPI](https://img.shields.io/badge/FastAPI-0.68-green.svg)](https://fastapi.tiangolo.com/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## 🌟 Key Features\n\n* **Automated Data Pipeline**\n  * CSV ingestion \u0026 cleaning\n  * Missing value imputation\n  * Date normalization\n  * Data validation\n* **Advanced Analytics**\n  * Revenue trend analysis\n  * Cancellation pattern detection\n  * Geographic distribution mapping\n  * Market segment breakdown\n* **AI-Powered Q\u0026A**\n  * Natural language processing\n  * Context-aware responses\n  * RAG (Retrieval-Augmented Generation) architecture\n  * GPU-accelerated inference\n* **Enterprise-Grade API**\n  * RESTful endpoints\n  * Async request handling\n  * JWT authentication (beta)\n  * Swagger/OpenAPI documentation\n\n## 🛠 Technologies Used\n\n## 📚 Table of Contents\n\n1. [Installation](https://chatgpt.com/c/67dc6f4c-c6dc-8013-8c10-3017622ad359#-installation)\n2. [Data Preparation](https://chatgpt.com/c/67dc6f4c-c6dc-8013-8c10-3017622ad359#-data-preparation)\n3. [Usage](https://chatgpt.com/c/67dc6f4c-c6dc-8013-8c10-3017622ad359#-usage)\n4. [API Documentation](https://chatgpt.com/c/67dc6f4c-c6dc-8013-8c10-3017622ad359#-api-documentation)\n5. [Deployment](https://chatgpt.com/c/67dc6f4c-c6dc-8013-8c10-3017622ad359#-deployment)\n6. [Testing](https://chatgpt.com/c/67dc6f4c-c6dc-8013-8c10-3017622ad359#-testing)\n7. [Troubleshooting](https://chatgpt.com/c/67dc6f4c-c6dc-8013-8c10-3017622ad359#-troubleshooting)\n8. [Contributing](https://chatgpt.com/c/67dc6f4c-c6dc-8013-8c10-3017622ad359#-contributing)\n\n## 💻 Installation\n\n### Prerequisites\n\n* Python 3.10+\n* pip 20.3+\n* 4GB RAM minimum\n* (Optional) NVIDIA GPU with CUDA 11.x\n\n### Setup\n\n```bash\ngit clone https://github.com/HiBorn4/LLM_Booking_Analytics_-_QA.git\ncd LLM_Booking_Analytics_-_QA\n\npython -m venv .venv\nsource .venv/bin/activate  # Linux/MacOS\n# .venv\\Scripts\\activate  # Windows\n\npip install -r requirements.txt\n\necho \"API_KEY=your_secret_key\" \u003e .env\n```\n\n## 📂 Data Preparation\n\n```bash\nmkdir -p dataset\nmv ~/Downloads/hotel_bookings.csv dataset/\npython preprocessing.py\n```\n\nOutput:\n\n* `dataset/hotel_bookings_cleaned.csv`\n* `dataset/preprocessing.log`\n\n## 🚀 Usage\n\n```bash\nuvicorn app.api:app --reload --port 8000\n```\n\nEndpoints:\n\n1. **Swagger UI** : [http://localhost:8000/docs](http://localhost:8000/docs)\n2. **Redoc** : [http://localhost:8000/redoc](http://localhost:8000/redoc)\n\n### Sample Queries\n\n```bash\ncurl http://localhost:8000/analytics?analysis_type=cancellations\n\ncurl -X POST http://localhost:8000/ask \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\": \"Which month had highest revenue in 2022?\"}'\n```\n\n## 📡 API Documentation\n\n### POST /ask\n\n**Request:**\n\n```json\n{\n  \"query\": \"Show hotels with highest cancellation rates\",\n  \"use_gpu\": false\n}\n```\n\n**Response:**\n\n```json\n{\n  \"question\": \"Show hotels with highest cancellation rates\",\n  \"answer\": \"Resort hotels show 42% cancellation rate compared to 28% for City hotels...\",\n  \"confidence\": 0.87,\n  \"context\": [\"Hotel: Resort Hotel, Cancellations: 1423...\", ...]\n}\n```\n\n## 🐳 Deployment\n\n### Docker Setup\n\n```bash\ndocker build -t booking-analytics .\ndocker run -p 8000:8000 booking-analytics\n```\n\n### Kubernetes (Helm Chart)\n\n```bash\nhelm install booking-analytics ./charts \\\n  --set replicaCount=3 \\\n  --set resources.limits.memory=8Gi\n```\n\n## 🧪 Testing\n\n```bash\npytest tests/ --verbose\n```\n\n## 🚨 Troubleshooting\n\n| Issue                | Solution                                                 |\n| -------------------- | -------------------------------------------------------- |\n| CUDA Out of Memory   | Reduce batch size in `rag_hotel_qa`                    |\n| CSV Encoding Errors  | Re-save file as UTF-8                                    |\n| Missing Dependencies | Re-run `pip install -r requirements.txt`               |\n| API Timeouts         | Increase timeout:`uvicorn ... --timeout-keep-alive 30` |\n\n## 🤝 Contributing\n\n```bash\ngit checkout -b feature/new-analytics\ngit commit -m 'Add occupancy rate metrics'\ngit push origin feature/new-analytics\n```\n\nOpen a pull request.\n\n## 📄 License\n\nMIT License - See [LICENSE](https://chatgpt.com/c/LICENSE) for details.\n\n## 📧 Contact\n\nMaintainer: Hi Born\n\nEmail: hiborn4@gmail.com\n\n[Project Board](https://github.com/yourusername/hotel-booking-analytics/projects/1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiborn4%2Fllm_booking_analytics_-_qa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiborn4%2Fllm_booking_analytics_-_qa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiborn4%2Fllm_booking_analytics_-_qa/lists"}