How conanwinner/schedule_project works
Project Type and Purpose
• The project’s objective of combining natural language models with an evolutionary algorithm points to a hybrid architecture with both AI-driven logic and conventional web API/backend components.
Main Components
a. Backend Application Layer (located in the "app" directory):
• API Layer: Represented by the files in app/api (list_all_api.py, schedule_api.py, search_api.py). These endpoints handle incoming requests.
• Configuration/Infrastructure: The app/config folder (database_configuration.py and embedding_model.py) that sets up the database connections and embedding models necessary for LLM usage.
• Business Logic/Services: The app/service folder (e.g., constraints_service.py) which encapsulate the core logic for scheduling constraints.
• Domain Models: The app/model folder (e.g., Class_Info.py) which defines the data structures.
• Constants: The app/constant directory, holding various constant definitions that are referenced across components.
• Entry Points: Files such as app/main.py and app/demo.py represent application startup and demonstration workflows.
b. Data Management and Processing:
• Data Scripts: Under the "data" folder, which includes batch translation (gemini_batch_translate.py) and several Excel input files alongside prompt.json for configuration.
• Database Embedding: The "database/embedding" folder, which likely deals with storing and retrieving embedding data related to timetable generation.
c. Frontend Component:
• The "frontend" directory suggests that there is a UI layer (even if simple) that interacts with the backend, providing the user interface for timetable generation and preferences input.
d. Validation and Testing:
• The "validation" folder contains data creation, validation scripts, and utilities. This illustrates that rigorous data validation is part of ensuring that generated timetables meet all constraints.
• The "app/mock" folder houses documentation and mock schedules/searches. These are useful for testing or documentation purposes.
Relationships and Interactions
• The user interacts with a web interface (frontend) that sends requests to the backend API endpoints.
• The API endpoints then delegate calls to the service layer where scheduling constraints are processed using NSGA-II and LLM techniques.
• The configuration settings determine connections to the database (and possibly external embedding services) needed by both the LLM and RAG modules.
• The data layer (scripts and Excel files) provides input data and complements validation scripts to ensure data integrity.
• Client (frontend browser) → API requests to the backend.
• Backend API → Service/Business logic processing.
• Service layer → Database/embedding and Data Validation services.
• Additionally, note dependency flows where the AI modules (LLM, RAG) feed into scheduling decisions.
Architectural Patterns and Key Technologies
• Separation of Concerns (layered architecture): Clearly distinct modules for API handling, business services, configuration, and domain models.
• Possibly an MVC or microservices-inspired design inside the 'app' directory.
• Key Technologies: Python (backbone of the app), LLM (VIT5), NSGA-II for optimization, and potentially RAG for augmented generation.
• The presence of extensive configuration and constant directories indicates careful adherence to maintainability and extensibility principles.