ANAT Build Plan & Architecture

Adaptive Neuro-Assessment Tool (ANAT) – Build Plan

This plan outlines the recommended architecture and directory structure for the ANAT, a complex system blending web application development with Machine Learning Operations (MLOps).

🚀 I. A. Best Platform Suggestion: Unified Cloud Provider (MLOps Focus)

The ANAT requires high security, scalable computing for AI models, and integrated MLOps tools for model governance and retraining (crucial for maintaining **DDP logic** and **SQA standards**). A unified cloud platform is essential.

Recommendation: **Google Cloud Platform (GCP) or Microsoft Azure AI**.

  • **GCP (Vertex AI):** Excellent for end-to-end AI deployment, MLOps, and integrated security (GDPR focus).
  • **Azure (Azure AI/ML):** Strong enterprise-grade security, scalability, and integration with other Microsoft services.

This plan assumes a modern **Microservices Architecture** hosted on a cloud environment.

🔗 I. B. MLOps & CI/CD Infrastructure (CRITICAL)

To support the continuous improvement of the **neuro_llm_model** and ensure system stability, a formal MLOps pipeline is mandatory.

  • **Model Governance:** **MLflow** or **DVC (Data Version Control)** for tracking model versions, parameters, and training data sets.
  • **CI/CD:** **GitHub Actions**, **GitLab CI**, or cloud-native pipelines (e.g., Azure Pipelines, Google Cloud Build) for automated testing, deployment, and model promotion.
  • **Containerization:** **Docker** for packaging all services (Backend, Frontend, ML Service) to ensure environmental consistency from development to production.
II. Recommended Technology Stack
Layer Technology Rationale
**Frontend (UI)** **React.js or Vue.js** + **Tailwind CSS** Scalability, component-based design (fast iteration), and the need for a **low-sensory, accessible** dashboard.
**Backend (API Gateway)** **Python (Django/Flask)** or **Node.js (Express)** Python is non-negotiable for seamless ML integration; Node.js is faster for general API requests.
**ML/AI Core** **Python (PyTorch/TensorFlow)** + **Hugging Face LLM** (Fine-tuned) + **Scikit-learn** (AES) Required for custom LLM training (Strengths-Based Feedback) and Automated Essay Scoring (AES).
**Model Governance** **MLflow** or **DVC (Data Version Control)** Essential for tracking **DDP-aligned model versions** and ensuring **SQA auditability**.
**Database (DB)** **PostgreSQL or MongoDB** (with encryption) Robust, scalable, and GDPR-friendly. PostgreSQL is ideal for structured academic/audit data; MongoDB for flexible rubric storage.
**Originality Check** **Turnitin API or custom NLP service** Integration with established tools for plagiarism and text predictability checks.
III. Directory and File Structure

A modular structure for separation of concerns and easier MLOps integration.

ANAT_PROJECT/
├── **.env** # Environment variables (DB credentials, API keys)
├── **README.md** # Project documentation
├── **ci_cd/** # NEW: MLOps and General CI/CD Pipeline Scripts
│   ├── **build_dockerfiles/**
│   ├── **deploy.sh**
│   ├── **.github/workflows/main.yml**
├── **client/** # FRONTEND: React/Vue Application
│   ├── public/
│   ├── src/
│   │   ├── components/
│   │   │   ├── forms/
│   │   │   ├── layouts/                     # Dashboard structure, Header, Sidebar
│   │   │   ├── assessment/                  # Mark display components, Strengths/Improvement cards
│   │   ├── pages/
│   │   │   ├── UploadPage.jsx
│   │   │   ├── ReviewPage.jsx               # Human Ratification Interface
│   │   │   ├── AuditLog.jsx
│   │   ├── services/                        # API calls to the backend
│   ├── package.json
├── **server/** # BACKEND: Python/Node.js API Gateway
│   ├── config/
│   │   ├── db.js                            # DB connection
│   │   ├── middleware/                      # Authentication (RBAC/MFA)
│   ├── controllers/
│   │   ├── authController.py
│   │   ├── submissionController.py          # Handles file upload and metadata
│   ├── routes/
│   │   ├── auth.js
│   │   ├── submissions.js
│   ├── **ml_client.py** # Communication handler with the ML Service
├── **ml_service/** # MLOPS: Isolated AI Model Container
│   ├── **app.py** # FastAPI/gRPC endpoint for model requests
│   ├── **models/**
│   │   ├── aes_model.pkl                    # Automated Essay Scoring (General)
│   │   ├── **neuro_llm_model/** # Fine-tuned LLM for Strengths-Based Feedback
│   │   ├── plagiarism_client.py
│   ├── **rubrics/** # Digitalized SQA/DDP/EQF rubrics (JSON format)
│   ├── **data/** # Model training data (anonymized)
│   ├── **model_train.py** # Script for retraining the LLM
│   ├── **mlrun_config.yaml** # MLflow/DVC configuration
│   ├── requirements.txt
├── **database/**
│   ├── **schema.sql** # DB schema definition
│   ├── **data_retention_policy.md** # GDPR/Data Retention Policy
└── **docs/**
    ├── **audit_protocol.md** # SQA/EQF Audit Process
    └── **tutor_onboarding.pdf**
IV. Detailed Build Steps (Phase 2 Focus)
  1. **MLOps & Model Governance Setup (CRITICAL FIRST STEP):**
    • Set up **MLflow/DVC** for model and data version control.
    • Implement initial CI/CD pipelines (e.g., in `ci_cd/`) for automated testing and deployment of the Backend/Frontend containers.
    • Create the **Model Training Pipeline** (Trigger: New DDP-aligned papers, or scheduled): **Data Validation -> Model Retraining (LLM/AES) -> Model Evaluation -> Model Registry (MLflow)**.
    • Develop a promotion strategy: **Staging Model** (for Human Ratification testing) to **Production Model**.
  2. **Setup & Security (Backend):**
    • Set up cloud infrastructure (VPC, load balancer, container orchestration).
    • Implement **Role-Based Access Control (RBAC)**: Admin > Tutor/Marker (Read/Write) > Auditor (Read-Only).
    • Implement **Multi-Factor Authentication (MFA)** for all Tutor/Admin accounts.
    • Establish encryption for data **at rest** (DB) and **in transit** (HTTPS/TLS). **GDPR Mandate.**
  3. **Submission & Data Pipeline:**
    • Develop the **Submission Controller** to ingest documents (PDF/DOCX/TXT).
    • Extract and validate metadata: Name, ID, Course, **Level 3-7**, Word Count.
    • **Pseudonymize or Tokenize student IDs** before data is passed to the ML Service.
  4. **ML Core Development (ML Service):**
    • Create the **neuro_llm_model** and fine-tune it using your high-quality, DDP-aligned papers.
    • Develop the **Scoring API** (app.py) which handles the sequential request: **Originality -> AES Scoring -> Strengths-Based Feedback Generation -> First Mark**.
    • Develop the logic to map the **Assessment Type** (Thesis, Reflection, Essay) to the correct **Digital Rubric** (JSON file) for AI evaluation.
  5. **Frontend (UX/UI):**
    • Build the **ReviewPage.jsx** dashboard: Split screen view for 1) Submitted Paper and 2) AI Analysis/Human Input Form.
    • Design the **Human Input Form** to allow the marker to easily review the AI’s Strengths/Improvement statement and input the **Final Mark** and **Final Justification**.
    • Ensure the design follows **low-sensory principles** (clean lines, high contrast, non-distracting elements).
top