{"id":27772321,"url":"https://github.com/shakil1819/interactive-estimation-system-using-llm-based-rag-approach","last_synced_at":"2026-04-16T10:35:22.955Z","repository":{"id":290013999,"uuid":"972124621","full_name":"shakil1819/Interactive-Estimation-System-Using-LLM-based-RAG-Approach","owner":"shakil1819","description":"This AI agent streamlines the initial customer interaction and information gathering process for service-based businesses, starting with a prototype focused on the roofing industry. It acts as an intelligent virtual assistant that guides potential customers through a natural language conversation to collect all necessary project details required fo","archived":false,"fork":false,"pushed_at":"2025-04-26T10:28:23.000Z","size":506,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T04:06:13.920Z","etag":null,"topics":["agentic-ai","deployment","docker","docker-compose","full-stack","langchain-python","langgraph-python","llm","pre-commit-hooks","rag"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shakil1819.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2025-04-24T15:14:47.000Z","updated_at":"2025-04-25T19:44:01.000Z","dependencies_parsed_at":"2025-04-26T10:42:47.210Z","dependency_job_id":null,"html_url":"https://github.com/shakil1819/Interactive-Estimation-System-Using-LLM-based-RAG-Approach","commit_stats":null,"previous_names":["shakil1819/interactive-estimation-system-using-llm-based-rag-approach"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shakil1819/Interactive-Estimation-System-Using-LLM-based-RAG-Approach","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakil1819%2FInteractive-Estimation-System-Using-LLM-based-RAG-Approach","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakil1819%2FInteractive-Estimation-System-Using-LLM-based-RAG-Approach/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakil1819%2FInteractive-Estimation-System-Using-LLM-based-RAG-Approach/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakil1819%2FInteractive-Estimation-System-Using-LLM-based-RAG-Approach/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shakil1819","download_url":"https://codeload.github.com/shakil1819/Interactive-Estimation-System-Using-LLM-based-RAG-Approach/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakil1819%2FInteractive-Estimation-System-Using-LLM-based-RAG-Approach/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259919455,"owners_count":22932071,"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":["agentic-ai","deployment","docker","docker-compose","full-stack","langchain-python","langgraph-python","llm","pre-commit-hooks","rag"],"created_at":"2025-04-29T23:58:41.510Z","updated_at":"2026-04-16T10:35:22.904Z","avatar_url":"https://github.com/shakil1819.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Interactive Estimation System (Prototype)\n\nA prototype interactive estimation system using FastAPI, Langgraph, and Streamlit. This system guides users through a conversational flow to gather information for a service (e.g., roofing) and provides a structured estimate.\n\n![Version](https://img.shields.io/badge/version-0.1.0-blue)\n![Python](https://img.shields.io/badge/python-3.11%2B-blue)\n![License](https://img.shields.io/badge/license-MIT-green)\n![alt text](frontend/image/image-2.png)\n## 📋 Features\n\n- **Conversational Flow**: Natural language conversation to gather project requirements\n- **Image Upload Support**: Users can upload images related to their projects\n- **Smart Information Extraction**: Uses AI to extract relevant information from user messages\n- **Dynamic Questioning**: Adapts questions based on missing information\n- **Configurable Estimation Logic**: Estimation calculations based on a flexible configuration\n- **Real-time Feedback**: Updates the estimate as more information is provided\n\n## 🚀 Quick Start\n\n### Using Scripts\n\n**Windows**:\n```powershell\n# Run the PowerShell script\n.\\run.ps1\n```\n\n**macOS/Linux**:\n```bash\n# Make the script executable\nchmod +x run.sh\n\n# Run the script\n./run.sh\n```\n\n### Manual Setup\n\n1. Clone the repository and navigate to the project directory\n2. Create and activate a virtual environment\n3. Install dependencies: `pip install -e .`\n4. Set up your environment variables (copy `.env.example` to `.env` and add your OpenAI API key)\n5. Run the application: `python run.py`\n\n### Using Docker\n\n```bash\ndocker-compose up\n```\n\n## 📚 Documentation\n\n- [Installation Guide](INSTALL.md) - Detailed setup instructions\n- [User Guide](USER_GUIDE.md) - How to use the system\n- [Architecture](ARCHITECTURE.md) - System design and components\n\n## 🏗️ Project Architecture\n\nThe system is built using a modern stack:\n\n- **Backend**: FastAPI, Pydantic, Langchain, Langgraph, Uvicorn\n- **Frontend**: Streamlit\n- **State Management**: In-memory dictionary (for prototype simplicity)\n- **Language Model**: OpenAI GPT-4o (via Langchain)\n\n### Component Overview\n\n1. **Input Handler** (FastAPI \u0026 Streamlit):\n   - Accept text input and image uploads from users\n   - Manages session state and communication between frontend and backend\n\n2. **Conversation Manager** (FastAPI \u0026 Langgraph):\n   - Maintains conversation state for each user session\n   - Uses Langgraph to define and manage the conversation flow\n   - Extracts information from user inputs\n   - Generates appropriate responses and questions\n\n3. **Estimation Logic** (Python):\n   - Calculates estimates based on the provided configuration\n   - Supports various parameters (materials, regions, timelines, etc.)\n   - Generates a structured output with cost breakdown\n\n### Directory Structure\n\n```\ninteractive-estimation-system/\n├── backend/                   # FastAPI backend\n│   ├── app/                   # Application code\n│   │   ├── __init__.py        \n│   │   ├── main.py            # FastAPI app, endpoints\n│   │   ├── models.py          # Pydantic models\n│   │   ├── graph.py           # Langgraph definition\n│   │   ├── estimator.py       # Estimation calculation logic\n│   │   ├── config.py          # Load estimation config, API keys\n│   │   └── utils.py           # Helper functions\n│   └── requirements.txt       # Backend dependencies\n├── frontend/                  # Streamlit frontend\n│   ├── app.py                 # Streamlit application\n│   └── requirements.txt       # Frontend dependencies\n├── docker-compose.yml         # Docker Compose configuration\n├── Dockerfile                 # Docker build instructions\n├── setup.py                   # Package installation\n├── run.py                     # Script to run both servers\n├── run.ps1                    # PowerShell script for Windows\n├── run.sh                     # Bash script for Unix/Linux\n├── .env.example               # Example environment variables\n├── .gitignore                 # Git ignore file\n├── ARCHITECTURE.md            # System architecture details\n├── INSTALL.md                 # Installation instructions\n├── USER_GUIDE.md              # User documentation\n└── README.md                  # Project documentation\n```\n\n## 💻 Development\n\n### Running Tests\n\n```bash\n# Install test dependencies\npip install -e \".[test]\"\n\n# Run tests\npytest\n```\n\n### Adding New Services\n\nTo add new service types:\n\n1. Update the `config.json` file with the new service configuration\n2. Add appropriate question templates in `utils.py`\n3. Update the information extraction schema in `graph.py` if needed\n\n## 🚧 Limitations \u0026 Future Enhancements\n\nThis prototype has several limitations that could be addressed in future versions:\n\n- **State Management**: Currently uses in-memory storage, which is not persistent\n- **Error Handling**: Basic error handling implemented\n- **Service Types**: Currently focused on roofing; could be expanded\n\nPotential enhancements:\n\n- **Persistent Storage**: Add a database for session storage\n- **Real Image Analysis**: Integrate computer vision to extract information from images\n- **Multiple Service Types**: Expand to support various service types\n- **User Authentication**: Add user accounts and authentication\n- **Enhanced UI**: More interactive and responsive frontend\n\n## 🛠️ Known Issues \u0026 Solutions\n\nA few notable issues have been fixed in this version:\n\n1. **Recursion Limit Error**: Fixed by using `ainvoke()` instead of `invoke()` with a higher recursion limit.\n\n2. **Infinite Recursion Loop**: The graph was transitioning back to `input_processor` without waiting for new user input. \n   Fixed by modifying the graph to end after generating a response.\n\n3. **Langgraph Return Type**: Fixed the issue where Langgraph returns `AddableValuesDict` instead of a `GraphState` object.\n   This is now properly converted using `GraphState(**result)`.\n\n4. **Pydantic Warnings**: Added filters to suppress PydanticSchemaJson warnings.\n\n## 📝 License\n\n[MIT License](LICENSE)\n\n## 👥 Contributors\n\n- [Shakil Mosharrof](https://github.com/shakil1819)\n- Github Copilot\n- Windsurf IDE\n\n## 🙏 Acknowledgments\n\n- OpenAI for the GPT models\n- Langchain and Langgraph for the conversation flow management\n- FastAPI and Streamlit for the application framework\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakil1819%2Finteractive-estimation-system-using-llm-based-rag-approach","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshakil1819%2Finteractive-estimation-system-using-llm-based-rag-approach","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakil1819%2Finteractive-estimation-system-using-llm-based-rag-approach/lists"}