An addition to T.A.E.S: Automatically evaluate theoretical answers using SOTA LLM and RAG technology.
- Automated Answer Evaluation: Uses state-of-the-art LLMs to evaluate student answers
- Multi-LLM Support: Compatible with GPT, Claude, Gemini, and local models via Ollama
- Multiple Interface Modes: Choose from Main (full-featured), Minimal (basic), or Simple (user-friendly) interfaces
- Question Bank Management: Upload and parse question papers from PDF/DOCX files
- Batch Processing: Evaluate up to 100 answer sheets simultaneously
- Smart Answer Detection: Automatically detects and maps answer numbers
- Detailed Feedback: Provides specific remarks only when marks are deducted
- Flexible Mark Distribution: Choose between paper-based or uniform marking
- Configurable Criteria: Set total marks and per-question marks
- Detailed Analytics: View student performance and grade distributions
- Comprehensive Reports: Track individual student progress and remarks
- Main Interface: Full-featured interface with all capabilities including batch processing and analytics
- Simple Interface: Streamlined, user-friendly interface perfect for general use
- Minimal Interface: Basic interface for quick evaluation tasks
- PostgreSQL Integration: Robust database with proper relationships
- Student Management: Track student information and evaluation history
- Vector Storage: Built-in vector store for advanced RAG capabilities
- Evaluation History: Complete audit trail of all evaluations
- Python 3.10 or higher
- PostgreSQL database (or Docker for easy setup)
- API keys for chosen LLM providers
- Clone the repository
git clone https://github.com/deepratna-awale/TAES2.git
cd TAES2- Choose your setup method
Option A: Docker Setup (Recommended)
# Start the application with Docker
docker-compose up -d
# View logs
docker-compose logs -f app
# Access the application at http://localhost:7860Option B: Manual Setup
# Run the setup script
chmod +x setup.sh
./setup.sh
# Or use the convenient startup script
chmod +x start.sh
./start.sh help- Configure environment variables Copy and edit the environment file:
cp .env.example .env
# Edit .env with your API keys and configurationKey environment variables:
# Interface Mode (main, minimal, simple)
TAES_INTERFACE_MODE=simple
# Server Configuration
TAES_SERVER_NAME=0.0.0.0
TAES_SERVER_PORT=7860
TAES_DEBUG=true
# Database Configuration
DATABASE_URL=postgresql://username:password@localhost:5432/taes2_db
# LLM Configuration
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
# Default LLM Settings
DEFAULT_MODEL=gpt-3.5-turbo
DEFAULT_TEMPERATURE=0.3
DEFAULT_MAX_TOKENS=2000- Start the application
With startup script:
# Start with simple interface (recommended for first-time users)
./start.sh start simple
# Start with main interface (full features)
./start.sh start main
# Start with minimal interface (basic features)
./start.sh start minimal
# Run tests
./start.sh test
# Start with Docker
./start.sh dockerOr directly with Python:
# Set interface mode and start
export TAES_INTERFACE_MODE=simple
python app.py
# Or pass interface mode as argument
python app.py simple- Access the application
- Main Application: http://localhost:7860
- Database Admin (if using Docker): http://localhost:8080
TAES 2 offers three interface modes to suit different user needs:
- Complete question bank management with CRUD operations
- Batch processing for up to 100 answer sheets
- Advanced analytics and results dashboard
- Comprehensive student management
- Best for: Educational institutions, power users
- Streamlined design with grouped controls
- Enhanced score visualization with color coding
- Quick statistics and expandable detailed results
- Better error handling and user feedback
- Best for: Teachers, general users
- Clean, distraction-free interface
- Essential evaluation features only
- Quick file upload and evaluation
- Compact results display
- Best for: Quick evaluations, simple tasks
- Choose Your Interface Mode
Set the interface mode in your
.envfile or use the startup script:
# Using environment variable
export TAES_INTERFACE_MODE=simple
# Using startup script
./start.sh start simple- Configure Marking Criterion (Main Interface Only)
- Set total marks for the evaluation
- Choose mark distribution method:
- In Paper: Marks are specified in the question paper
- Uniform Distribution: Equal marks for all questions
- Upload Question Bank
- Upload your question paper (PDF/DOCX format)
- The system will automatically parse questions and sub-questions
- Review the extracted questions and save the question bank
- Evaluate Answer Sheets
- Select a question bank
- Upload a student's answer sheet
- Get instant evaluation results with detailed feedback
- Upload up to 100 answer sheets
- Process them in configurable batch sizes
- View comprehensive results and analytics
- View Results & Analytics
- Search for specific students
- View evaluation history
- Analyze performance trends
- Export results for further analysis
The included start.sh script provides convenient commands for managing the application:
# Start the application with different interfaces
./start.sh start main # Full-featured interface
./start.sh start simple # User-friendly interface
./start.sh start minimal # Basic interface
# Docker operations
./start.sh docker # Start with existing Docker images
./start.sh docker-build # Rebuild and start with Docker
./start.sh clean # Clean up Docker containers and volumes
# Testing and validation
./start.sh test # Run application tests
./start.sh help # Show all available commands-
ASGI Application Errors
- Solution: Use Python directly instead of uvicorn for Gradio 3.26.0
- The app now uses Gradio's built-in server for better compatibility
-
Database Connection Issues
- Check your
DATABASE_URLin.env - Ensure PostgreSQL is running
- For Docker:
docker-compose logs database
- Check your
-
Missing Dependencies
- Run:
pip install -r requirements.txt - Or use the startup script:
./start.sh test
- Run:
-
Interface Not Loading
- Check the console for error messages
- Verify all environment variables are set
- Try a different interface mode:
export TAES_INTERFACE_MODE=minimal
Check the following locations for detailed error information:
- Application logs:
logs/directory - Docker logs:
docker-compose logs app - Database logs:
docker-compose logs database
TAES 2 includes a comprehensive database management utility:
# Check database connection
python db_manage.py check
# Initialize database tables
python db_manage.py init
# Create sample data for testing
python db_manage.py sample
# View database statistics
python db_manage.py stats
# Create database backup
python db_manage.py backup
# Reset database (WARNING: Deletes all data)
python db_manage.py resetFor detailed database setup instructions, see DATABASE_SETUP.md.
All environment variables are documented in .env.example. Key variables include:
TAES_INTERFACE_MODE: Choose interface mode (main, minimal, simple)TAES_SERVER_NAME: Server host (default: 0.0.0.0)TAES_SERVER_PORT: Server port (default: 7860)TAES_DEBUG: Enable debug mode (true/false)TAES_SHARE_GRADIO: Create public Gradio link (true/false)
DATABASE_URL: PostgreSQL connection string
OPENAI_API_KEY: OpenAI API keyANTHROPIC_API_KEY: Anthropic API keyGEMINI_API_KEY: Google Gemini API keyOLLAMA_BASE_URL: Ollama server URLDEFAULT_MODEL: Default LLM model to useDEFAULT_TEMPERATURE: Default temperature settingDEFAULT_MAX_TOKENS: Default maximum tokens
- OpenAI: GPT-3.5, GPT-4, GPT-4 Turbo
- Anthropic: Claude 3 Sonnet, Claude 3 Haiku
- Google: Gemini Pro
- Ollama: Llama 2, Mistral, and other supported models
TAES2/
├── app.py # Main application entry point
├── start.sh # Convenient startup script
├── test_app.py # Application test suite
├── requirements.txt # Python dependencies
├── docker-compose.yml # Docker configuration
├── DockerFile.taes # Application Docker image
├── DockerFile.database # Database Docker image
├── .env.example # Environment variables template
├── src/
│ ├── config/
│ │ └── settings.py # Application configuration
│ ├── database/
│ │ ├── models.py # SQLAlchemy models
│ │ └── init_db.py # Database initialization
│ ├── llm/
│ │ └── manager.py # LLM integration manager
│ ├── parsing/
│ │ └── document_parser.py # Document parsing utilities
│ ├── evaluation/
│ │ └── engine.py # Main evaluation engine
│ ├── ui/
│ │ ├── main_interface.py # Full-featured Gradio interface
│ │ ├── simple_interface.py # User-friendly interface
│ │ ├── minimal_interface.py # Basic interface
│ │ └── __init__.py # UI package exports
│ ├── schemas/
│ │ └── models.py # Pydantic schemas
│ └── utils/
│ ├── helpers.py # Utility functions
│ ├── logging_config.py # Logging configuration
│ └── test_data.py # Test data generation
├── logs/ # Application logs
├── uploads/ # Uploaded files
├── data/ # Data storage
└── postgres_data/ # Docker PostgreSQL data
- Question Papers: PDF, DOCX, TXT
- Answer Sheets: PDF, DOCX
The application includes a complete Docker setup with PostgreSQL database:
# Start all services
docker-compose up -d
# View application logs
docker-compose logs -f app
# View database logs
docker-compose logs -f database
# Stop all services
docker-compose down
# Stop and remove volumes (WARNING: Deletes data)
docker-compose down --volumes- app: Main TAES 2 application (port 7860)
- database: PostgreSQL database (port 5432)
- pgadmin: Database administration interface (port 8080) - optional
Access points:
- Application: http://localhost:7860
- Database Admin: http://localhost:8080 ([email protected] / admin123)
- students: Student information and contact details
- question_banks: Question papers and marking schemes
- evaluations: Evaluation results and detailed feedback
- vector_store: Vector embeddings for RAG functionality
The system uses LiteLLM for unified LLM integration, allowing easy switching between different providers without code changes.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Check the documentation
- Review the logs in the
logs/directory
T.A.E.S: https://www.researchgate.net/publication/370215129_Monograph_on_Theoretical_Answer_Evaluation_System