The Predictions API powers the core recommendation engine. You can ask the system to infer the next term to plan, retrain the underlying ensemble models against the latest enrollment data, and generate a full ranked list of course offering recommendations for a target semester. Every recommendation run is persisted so you can retrieve and compare results over time.Documentation Index
Fetch the complete documentation index at: https://cors-lau.vercel.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
The ML models are campus-specific. The system trains and stores separate models for Beirut and Byblos campuses. Pass
target_campus in every bulk prediction request to select the correct model.GET /predict/next-term
Auto-detects the next semester to plan by inspecting the most recent offering record in the database. For example, if data ends at Spring 2025, this endpoint returnsFall 2025.
Responses
The calendar year of the next recommended planning term.
Either
"Fall" or "Spring".POST /predict/train
Retrains both campus-specific ensemble models from scratch using all course offering records currently in the database. Call this endpoint after uploading new historical data to ensure recommendations reflect the latest enrollment patterns. No request body is required.Responses
The response is a training result object. The most useful field issamples_trained.
Total number of training samples used across both campus models.
POST /predict/bulk
Generates a full ranked list of course offering recommendations for a given campus and semester. Each course in the catalog is scored by the ML model; the response includes confidence scores, demand estimates, and a binary offer recommendation for every course.Request body
A human-readable label for this prediction run, used to identify it in the run history. Example:
"Prediction_2025_Fall_Beirut".The calendar year of the semester you are planning for.
The semester to plan. Accepted values:
"Fall", "Spring".The campus to generate recommendations for. Accepted values:
"Beirut", "Byblos".Expected number of new freshman students enrolling this term. Used to estimate demand for gateway courses.
Expected number of new sophomore students. Used to estimate demand for sophomore gateway courses.
Expected number of new graduate students. Used to estimate demand for master’s-level courses.
When
true, the system ignores the ML binary recommendation and instead selects courses by filling fixed per-prefix/per-type slot quotas ranked by offer score. Configure the quota sizes in the slots object.Slot quotas used when
use_quotas is true. Each field specifies the maximum number of courses to select for that prefix/type combination.Responses
The response is aPredictionRunResponse object. The entries array contains one record per course in the catalog.
Auto-assigned numeric ID for this prediction run.
The label you supplied in the request.
The planning year.
The planning semester.
Internal model version string used when generating this run.
ISO 8601 timestamp of when the run was saved.
Array of per-course prediction results.
GET /predict/runs
Returns all saved prediction runs ordered by most recent first. Use this endpoint to browse run history and retrieve run IDs for downstream operations.Query parameters
Optional filter. When provided, only runs for the specified campus are returned. Example:
?campus=Beirut.Responses
Returns an array ofPredictionRunResponse objects (same schema as the POST /predict/bulk response, each including its entries array).