itslikethisnow/hsba-rag-chat
0
HSBA AI Data Assistant
An intelligent RAG-powered chatbot for analyzing High School Student Assessment (HSBA) data. This application provides conversational access to comprehensive educational assessment data through natural language queries.
Features
- Task-Specific Analysis: Select any HSBA task for focused data analysis
- Comprehensive Data Processing: Analyzes demographics, performance patterns, time statistics, and factor scores
- Natural Language Queries: Ask questions in plain English about student data
- Educational Insights: Get expert-level analysis of assessment patterns and trends
- Secure Data Handling: Connects to private HSBA backend API for data access
How It Works
- Data Integration: Connects to the HSBA backend API to fetch comprehensive task documents
- Document Processing: Uses Haystack to chunk and embed educational data for retrieval
- Intelligent Retrieval: Finds relevant data sections based on user questions
- Expert Analysis: Uses large language models to provide educational insights
Usage
For Hugging Face Spaces Deployment
- Environment Variables Required:
HF_TOKEN: Hugging Face API token for model accessBACKEND_URL: URL of the HSBA backend API (defaults to itslikethisnow-hsba-backend-api.hf.space)
- Getting Started:
- Select a task from the dropdown
- Click "Generate Analysis Document" to load data
- Start asking questions about student performance
Example Questions
- "What are the key demographic patterns in this task?"
- "How did different grade levels perform?"
- "Are there any concerning performance gaps by gender or race?"
- "What were the most common response patterns?"
- "What insights can you provide about student engagement?"
- "How does completion time vary by demographic groups?"
Architecture
- Frontend: Gradio interface for user interaction
- RAG Engine: Haystack pipeline for document retrieval and generation
- Embeddings: SentenceTransformers for semantic search
- LLM: Meta-Llama-3.1-8B-Instruct for response generation
- Data Source: Private HSBA backend API
Security & Privacy
- All educational data remains within secure research environments
- Private backend API requires authentication
- No sensitive student data is stored in this public interface
- Data processing follows educational research privacy guidelines
Technical Details
Dependencies
- Gradio 4.0+ for web interface
- Haystack 2.0+ for RAG pipeline
- SentenceTransformers for embeddings
- Hugging Face Transformers for LLM access
Data Processing Pipeline
- Fetch comprehensive task documents from HSBA API
- Clean and split documents into semantic chunks
- Generate embeddings for similarity search
- Store in in-memory vector database
- Retrieve relevant chunks for user queries
- Generate contextual responses with educational insights
Integration with HSBA Dashboard
This RAG assistant integrates with the main HSBA Data Dashboard:
- Accessible through the "AI Chat" tab in the dashboard
- Seamless task selection and data synchronization
- Consistent authentication and security model
- Complementary to existing statistical analysis tools
Development
To run locally:
- Set environment variables (
HF_TOKEN,BACKEND_URL) - Install requirements:
pip install -r requirements.txt - Run:
python app.py
Support
This tool is designed for educational researchers and assessment professionals working with HSBA data. For technical support or feature requests, please contact the development team.
