A job can mention every tool in a profile and still be a poor application target. A required credential, a seniority mismatch, or a location constraint can matter more than a long list of shared keywords.
That distinction shapes Job Applier, my local Job Agent project. The model contributes a judgment. Code determines how that judgment can affect the queue.
Separate fit from attainability
Fit asks how closely a role matches someone's background and interests. Attainability asks whether the stated requirements make it a realistic target for that person. These are useful separate signals, even though neither is an objective prediction of a hiring decision.
The project combines a fit score with points assigned to an attainability band. The weight is configurable. At the default 60% attainability weight, a role with fit 75 and attainability points 80 receives a blended score of 78. A role with fit 90 and attainability points 15 receives 45 before later adjustments.
blended = (1 - weight) * fit + weight * attainability_points
# Example: 0.4 * 75 + 0.6 * 80 = 78
These are ranking signals, not percentages of success. Their usefulness depends on an accurate profile and a faithful reading of the posting. When attainability is unknown, the implementation skips the blend instead of inventing a middle value.
The order of operations is part of the design
Imagine a role gets capped because it belongs to the wrong role family. If a later blending step raises that score, the earlier constraint no longer means what it says.
The implementation applies the attainability blend and bounded secondary adjustments first. It then enforces hard role, seniority, location, and internship mismatch caps. A favorable model judgment cannot raise a score after those final caps have been applied.
# A simplified illustration; the real policy has additional checks.
def rank_role(fit, attainability_points, weight, hard_cap=None):
score = (1 - weight) * fit + weight * attainability_points
if hard_cap is not None:
score = min(score, hard_cap)
return round(score)
The interactive example lets you change the weight and watch the ordering change. One fictional posting has a missing required credential and stays capped at 35. That number belongs to the simplified demo; production caps are configurable.
Run the Python job-scoring example
A small fixture makes the order of operations easier to inspect. The download below uses the same four fictional roles as the browser demo, plus one role with unknown attainability. It runs locally without a model, account, installation, or network connection.

Standard library only. Includes the source, synthetic fixture, expected JSON output, and a license.
Download the Python job-scoring example ↗Inspect the complete scoring source ↗Extract the ZIP and run:
python score_jobs.py
With 40% fit and 60% attainability, the result is:
| Role | Fit | Attainability | Final score |
|---|---|---|---|
| Support | 70 | 90 | 82 |
| Data | 75 | 80 | 78 |
| Unknown | 75 | Unknown | 75 |
| Automation | 88 | 28 | 52 |
| Security | 95 | 88 | 35, capped |
The security role blends to 90.8, then stays at 35 because of the fixture's missing required credential. The unknown row keeps its fit score and reports attainability_known: false; it does not silently invent an attainability estimate. Its position is a reminder to review the missing information.
The script also prints a fit-only ranking. Automation moves to the top at 88, while the security cap still holds at 35. Changing the weight changes a preference; it does not remove a known requirement.
Compare the complete expected JSON output
{
"default_weight": [
{
"id": "support",
"blended": 82.0,
"score": 82,
"attainability_known": true,
"cap_applied": false
},
{
"id": "data",
"blended": 78.0,
"score": 78,
"attainability_known": true,
"cap_applied": false
},
{
"id": "unknown",
"blended": 75.0,
"score": 75,
"attainability_known": false,
"cap_applied": false
},
{
"id": "automation",
"blended": 52.0,
"score": 52,
"attainability_known": true,
"cap_applied": false
},
{
"id": "security",
"blended": 90.8,
"score": 35,
"attainability_known": true,
"cap_applied": true
}
],
"fit_only": [
{
"id": "automation",
"blended": 88.0,
"score": 88,
"attainability_known": true,
"cap_applied": false
},
{
"id": "data",
"blended": 75.0,
"score": 75,
"attainability_known": true,
"cap_applied": false
},
{
"id": "unknown",
"blended": 75.0,
"score": 75,
"attainability_known": false,
"cap_applied": false
},
{
"id": "support",
"blended": 70.0,
"score": 70,
"attainability_known": true,
"cap_applied": false
},
{
"id": "security",
"blended": 95.0,
"score": 35,
"attainability_known": true,
"cap_applied": true
}
]
}
Check the failure cases before trusting the order
- Cap reversal: try applying the cap before blending. The security row can rise above the intended limit. The example applies it last.
- Missing information: replace a role's attainability with
None. The returned flag must still identify the missing input, and a known cap must still apply. - Invalid inputs: negative scores, scores above 100, non-finite numbers, and weights outside 0–1 raise
ValueError. They do not enter the queue as ordinary results. - Ties and rounding: equal scores use the fixture ID as a stable tie-breaker. Decimal half-up rounding makes the teaching example's nonnegative rounding rule explicit.
This fixture demonstrates arithmetic and policy boundaries. It does not evaluate model accuracy, reproduce the full production scoring policy, or measure hiring outcomes. For the problem that comes before ranking, see the Python and SQLite job-listing deduplication example. When discovery covers several APIs, the partial-source failure example explains how to keep an incomplete result visible.
Some decisions belong before the model call
Known deterministic filters run before scoring. Those include configured title exclusions, location constraints, salary rules, and remote preferences. Rejecting a known mismatch early avoids spending inference time on a result the system already knows it should exclude.
Discovery also needs deduplication. The same posting can arrive from a search service and an employer's applicant tracking system. The project checks URLs, title and company, source identity, and ATS posting identifiers so those sightings can point to one job.
Keep the reasons, not just the number
A score without a reason makes the queue difficult to debug. The project persists classifications and discard reasons, and stamps scores with the scoring version. A policy change can invalidate outdated work instead of quietly mixing results from different rules.
SQLite provides the local state store. Its transaction model is useful background for treating related updates as one unit of work. Persisting state also makes a dashboard more useful than a transient list: saved jobs, application stages, and notes can survive between runs.
A useful queue still needs judgment
A model can misread a requirement. A posting can omit pay or describe seniority ambiguously. Treating missing information as a definite mismatch would introduce another kind of error, so uncertainty needs to remain visible.
The current application flow prepares a tailored Markdown resume and opens the posting for human review. It does not submit an application. Tracking an application as applied is a separate user action.
The next useful question is whether the ordering helps someone choose better applications. More rows, faster inference, and cleaner scores do not answer that by themselves. The queue needs review against real decisions, with the reasons still attached.
BACK TO THE NOTEBOOK