The prediction endpoint runs a machine-learning model against a candidate’s profile and a specific vacancy to produce a numeric match score. The model compares education level, years of experience, and twelve skill aptitudes to determine how closely the candidate fits the role. When a candidate has a complete profile, the vacancy listing also uses these scores to sort the most relevant positions to the top.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Esteban-Mendez-j/Proyecto-Docker/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Evaluate candidate–vacancy match
The numeric ID of the vacancy to evaluate against the authenticated candidate.
jwtToken cookie. The candidate’s ID is extracted from the JWT; the endpoint is intended for users with the CANDIDATO role.
Response body
Raw output from the Weka classifier.
"0.0" indicates the model predicts no match; "1.0" indicates a predicted match.Percentage of the vacancy’s required aptitudes that the candidate also holds (0–100). Calculated as
(matchedAptitudes / totalVacancyAptitudes) * 100. Returns 0 when the vacancy lists no aptitudes.Number of aptitudes that the candidate and vacancy share.
Total number of aptitudes required by the vacancy.
| Code | Meaning |
|---|---|
200 | Prediction completed successfully. |
500 | An error occurred (missing candidate/vacancy, model failure). The mensaje field contains the exception message. |
curl example
How the model works
The prediction pipeline runs in three stages: profile comparison, feature assembly, and classification.1. Profile comparison
PrediccionService.comparacion() compares the candidate’s aptitude list against the vacancy’s aptitude list across twelve fixed skills:
| Aptitude | Feature name |
|---|---|
| Critical thinking | PensamientoCritico |
| Creativity | Creatividad |
| Attention to detail | AtencionDetalle |
| Continuous learning | AprendizajeContinuo |
| Professional ethics | EticaProfesional |
| Autonomy | Autonomia |
| Responsibility | Responsabilidad |
| Leadership | Liderazgo |
| Adaptability | Adaptabilidad |
| Problem solving | ResolucionProblemas |
| Effective communication | ComunicacionAfectiva |
| Teamwork | TrabajoEquipo |
1 if both the candidate and the vacancy include that aptitude, otherwise 0. CantidadAptitudes holds the total number of matches.
2. Feature assembly
The service builds a WekaInstance with these attributes, in order:
| Index | Attribute | Type | Values |
|---|---|---|---|
| 0 | NivelEducativo | Nominal | Postgrado, Técnico, Bachiller, Doctorado |
| 1 | class | Nominal (target) | 0, 1 |
| 2 | AñosExperiencia | Numeric | Integer from candidato.experiencia |
| 3–14 | Twelve aptitude features | Nominal | 0 or 1 |
| 15 | CantidadAptitudes | Numeric | 0–12 |
3. Classification
WekaWrapper is an auto-generated classifier wrapping a Weka J48 decision tree (trained with Weka 3.8.6, minimum 20 instances per leaf). The tree uses CantidadAptitudes as its primary split, then branches on individual aptitude flags, education level, and years of experience to assign a binary class (0 = no match, 1 = match).
The raw double returned by classifyInstance is converted to a string ("0.0" or "1.0") and returned in resultadoPrediccion.
Profile completeness requirement
The ML-powered vacancy sorting is only active when a candidate’s profile is complete. A profile is considered complete when all three of the following fields are non-empty:
nivelEducativo (education level), aptitudes (at least one aptitude), and experiencia (years of experience as a parseable integer).Candidates who have not filled in these fields will still see the vacancy list, but results will not be sorted by prediction score./api/prediccion/evaluar/{nvacantes} endpoint successfully. If any of them are missing or blank, PrediccionService.predecirDesdeComparacion will fail when it attempts to parse candidato.experiencia or read candidato.nivelEducativo.
Match score update on application
When a candidate submits or updates a job application,PrediccionService.actualizarAfinidad() iterates over all of the candidate’s existing Postulado records and re-runs the prediction for each vacancy. The resulting porcentajePrediccion is persisted on the Postulado entity so that application lists can be ranked by fit.