-
Notifications
You must be signed in to change notification settings - Fork 1
Description
1) Description
Text-to-SQL RAG Chatbot for mForm is a proposed AI-powered feature designed to enhance mForm — a data collection and management tool for NGOs, CSR initiatives, and philanthropic organizations. This feature will enable users to query their mForm datasets conversationally using natural language. The chatbot will leverage a Text-to-SQL Retrieval-Augmented Generation (RAG) approach, allowing it to understand user intent, translate queries into SQL, retrieve accurate results from the database, and present meaningful insights.
A semantic layer will be included to bridge the gap between technical database schema and user-friendly terminology. This layer will help in mapping human-readable table and column names to their actual technical representations, making the system intuitive and easily configurable for non-technical users.
The goal is to build a production-ready, fully functional solution with a user interface that can be integrated into the existing mForm web application (built on the MEAN stack). The core logic will be developed using Python and NLP techniques.
2) Expected Outcome
- A web-based chatbot interface (Angular/MEAN frontend) embedded within mForm.
- The chatbot accepts user queries in natural language.
- Backend (Python-based) converts natural language into SQL using a RAG pipeline.
- Queries run on mForm datasets and return relevant results.
- A semantic layer for mapping friendly labels to database schema.
- Seamless integration with existing mForm authentication and datasets.
- Modular architecture to support future dataset/schema additions.
3) Acceptance Criteria
- ✅ Chatbot can be embedded/integrated into existing mForm frontend.
- ✅ Accepts natural language input from users and returns relevant responses.
- ✅ Converts input to valid SQL using a RAG-based approach.
- ✅ SQL runs accurately on mForm datasets and retrieves correct results.
- ✅ Supports multiple mForm project schemas via semantic configuration.
- ✅ Results displayed in tabular or summary form inside the chatbot.
- ✅ All APIs and services should be containerized or easily deployable.
- ✅ Clean, well-documented codebase with setup instructions.
- ✅ Test cases for both frontend and backend components.
4) Implementation Details
Frontend:
- Will be developed in Angular and integrated within the existing MEAN stack mForm application.
- A UI component will be created for the chatbot interface, including:
- Chat bubble
- Text input field
- Chat history window
- The frontend will communicate with the Python backend via RESTful APIs to send user queries and display responses.
Backend:
- Will be developed in Python, using either FastAPI or Flask to serve the chatbot backend as a REST API.
- The core logic will include a Text-to-SQL engine built using a Retrieval-Augmented Generation (RAG) approach:
- Natural language input from users will be parsed and matched with relevant schema context (table/column descriptions, examples).
- A large language model (e.g., OpenAI GPT APIs) will be used to generate the final SQL query using the retrieved context.
- LangChain or LlamaIndex may be used to build the RAG pipeline effectively.
- A vector database will store the schema context or documentation for retrieval.
- A semantic layer will be implemented to map human-readable terms to the underlying schema:
- Configuration via YAML or JSON files.
- Easily extendable and adaptable for multiple mForm project schemas.
- The system will be integrated with mForm’s existing datasets, which have been exported into relational database views for SQL-based querying.
Deployment:
- The backend service will be containerized using Docker for consistent development and deployment.
- A deployment script or guide will be provided for local and production environments.
- The chatbot UI will be modular and pluggable into the existing Angular-based mForm frontend.
5) Product Name
6) Organization Name
7) Tech Skills Needed
- Full Stack Developer with experience in MEAN Stack (MongoDB, Express, Angular, Node.js)
- Proficient in Python
- Basic knowledge of AI/ML and NLP, particularly in LLMs and Text-to-SQL
- Experience with REST API design, Docker, and frontend-backend integration
8) Mentor(s)
9) Category
Full Stack Development, MEAN, Python, NLP
📌 This project is an exciting opportunity to work at the intersection of AI, data, and social impact technology. It will directly empower NGOs and philanthropic initiatives to access insights from their data intuitively.