ChatCapitalHumain
2025Multi-agent data analytics and visualization platform for educational survey data.
About
ChatCapitalHumain is a multi-agent analytics platform that provides natural language access to 15 years of Acadian student survey data (2004–2019) from seven schools across Atlantic Canada. Survey responses to 52 questions — spanning socio-demographic information, post-secondary education, job market engagement, and employment search — were migrated from legacy Excel files into a centralized PostgreSQL database, stored as aggregated counts broken down by school, year, questionnaire, and gender.
The system implements two agent architectures. A single-agent mode uses a LangChain ReAct agent with direct SQL toolkit access and MemorySaver-backed multi-turn memory. The primary mode is a LangGraph StateGraph with five nodes: an analyze_request node screens whether the query is answerable given the aggregated data model (no individual-level responses exist); a check_schema_formulate_instructions node identifies the exact question IDs and response options from the schema needed to satisfy the request; a human_feedback node interrupts execution via LangGraph's interrupt_before mechanism so an analyst can validate or correct the proposed query interpretation; a run_query node dispatches a ReAct SQL agent to execute the validated query; and a finalize_query node formats the results and generates interactive Plotly charts rendered through Streamlit. Claude Sonnet (via OpenRouter) is the default generator; Gemini Flash handles schema analysis for speed.
A FAISS index pre-populated with answerable example questions (Cohere embeddings) is exposed in the sidebar to guide users toward formable queries. Conversation logs are persisted in MongoDB, and LangSmith provides full tracing of multi-agent runs. Deployment is containerized with Docker and automated via GitHub Actions CI/CD. The platform was validated with research personnel and adopted to streamline survey data analysis at chatcapitalhumain.ca.