8.0 KiB
8.0 KiB
Architecture
The target design of roledesk's ranking: how a role gets from a board to the Roles feed for one search agent, and the key decisions behind it. What gets built is tested against this document. The way from today's code to here is in plan-ranking-flow.md while that plan is open; the detailed reasoning is in decisions.md.
Terms
- Fetch gate: the agent's hard rules, a yes or no per role, in three parts: region, place and role.
- Analysis score: what decides the cut, the roles that get fetch text and the model pass.
- Final score: the order of the feed.
- Fetch text: the second HTTP read of a role's own page, without a model.
- Extract, judge, summarise: the model calls (Haiku).
- Affinity: an agent's setting for a company: hidden, neutral, liked or favourite.
- All countries, All roles: company switches, the same for every agent, that bypass the place and the role part of the fetch gate.
Flow
1 Fetch ─ all relevant roles, limited by the fetch gate:
region · place · role, with All countries and All roles as overrides
company boards: whole under 300 roles, else filtered at the host where it can
search providers: their own saved query
│
▼
2 Analysis score, no tokens ─ fit to the prompts, closeness to the CV, affinity → the cut
│
▼
3 Fetch text ─ the role's own page, for cut roles without text
│
▼
4 Model pass ─ extract the cut → fetch gate and cut again → judge the cut
│
▼
5 Feed ─ every role that passes the fetch gate, in two orders;
filters and saved filters narrow it
│
▼
6 After the ranking ─ summarise the top of the feed
1 Fetch
The aim is to fetch every relevant role while keeping out the thousands that are not, before anything is known about them in detail. The fetch gate does that.
1.1 Fetch gate
- Region: the required countries, Europe. Every role must be in them, and no override lifts this.
- Place: the Where lines. A role passes when it matches at least one line: a country, a town or remote. With every line empty, a role can be anywhere in the region.
- Role: the fetch terms, words a big board's host must match before it sends a role, and the titles to leave out, phrases that reject a role by its title.
Overrides:
- A company set to All countries bypasses the place part. Its roles are fetched and kept from the whole region.
- A company set to All roles bypasses the role part: no fetch terms and no titles to leave out. It is for small companies worth a speculative approach, whatever the role.
- A search provider is read by its own saved query, which replaces the fetch terms.
- A hidden company never passes.
The gate rejects on evidence only. A role with an unknown location passes until extract has read it.
1.2 Reading a board
- A company board with fewer than 300 roles is read whole.
- A company board with 300 or more roles is asked for the fetch gate at the host: the region and place, and the fetch terms, each where the host can filter on it. A host that cannot filter on a part sends the board whole for that part.
- Whatever the host did, the gate is applied to every role that arrives.
- A read narrowed by fetch terms is not the whole board, so it closes no role. Roles on such boards close by age. This is accepted because ranking relies on recency, not on closing.
2 Analysis score and the cut
- Free and local: each role is embedded once. Fit is its level against the best of the agent's prompts. CV closeness is its level against the closest part of the CV. Both are calibrated levels from 0 to 1, the same in every run.
- Affinity is a bonus on both levels, in the same proportion as in the final score: a liked company about 0.05 above neutral, a favourite about 0.1. It is a nudge, not a pass.
- The cut holds the roles that pass the fetch gate and are:
- among the best N by fit, each at least X (500 and 0.6 to start), or
- among the best M by CV closeness that the first list leaves out, each at least Y (150 and 0.6 to start), or
- liked or saved, whatever their levels.
- Newness and taste are not part of the analysis score. A role is read once and pulls run every few hours, and votes come after the read.
- The two lists are not merged into one number. They answer different questions (what I want, what I am), and a merged number lets the stronger side crowd the other out.
- For a broad agent the count stops each list; for a narrow agent the minimum stops it, so roles that do not fit are not read just to fill the count.
- The cut takes only roles that pass the fetch gate. Measured on 2026-10-04 for agent 2, without the Where lines only 118 of the 500 best by fit were roles the agent could take.
3 Fetch text
- Fetch text reads the role's own page for every role in the cut that came without text. The role is embedded again and its levels recomputed.
4 Model pass
- One depth: the cut is the only selection, and extract and judge both read all of it.
- Extract reads the cut first. It fills location, remote area, seniority, languages and deadline.
- The fetch gate and the cut are then applied again with what extract filled. A role can drop out, such as one that turns out to be outside the agent's places, or enter, such as one that turns out to be remote. A role that enters is extracted on the next pull.
- Judge reads the cut as recomputed. It reads each role against the agent's CV, languages, likes and dislikes, and gives skills, experience and career from 0 to 100, one to three strengths and gaps, and a verdict on each must-have. The CV match is the three numbers under the agent's weights (30/25/30 to start). Changing the weights asks the model for nothing.
- Extract and judge are two calls. Extract needs no CV, and its location and remote answers must reach the fetch gate before judge reads anything.
- Each role is extracted once. A judgement is redone only when its input changes. A change to the CV, a prompt, or the like or dislike text re-judges the whole cut (about an hour for 650 roles); a changed posting re-judges that role only.
5 Feed
- The feed shows every role that passes the agent's fetch gate, loaded as you scroll, in every order, newest first included. No order shows a role the fetch gate rejects.
- What I'm looking for orders by the final score:
(0.6 fit + 0.2 newness + 0.2 affinity + 0.2 taste) / sum of the weights. Newness halves every 14 days. Taste is the role's closeness to the roles the agent liked, away from those it passed. The weights are set per agent. - What fits me orders the judged roles by CV match, then the rest by CV closeness.
- Everything else (seniority, location, remote or hybrid, pay) is a filter, not a score term. Filters only narrow what the fetch gate passed.
- The Roles page says that the feed is already filtered by the agent's fetch gate, location included.
- Saved filters, per agent: the current filter settings are saved under a name, loaded with one click, and deleted. There is no editing; a change is a new saved filter.
- The company view says what is filtered: which parts of the fetch gate apply to this company, for example "every role in Europe, not filtered by country" for an All countries company. Looking up a company never silently hides roles elsewhere.
6 After the ranking
- Summarise is not part of any score. It runs after the final score, on the top of the feed by the final score (50 to start, its own setting), and on every role liked or saved.
Settings
Per agent, on the form:
- name and prompts
- the fetch gate: region (required countries), place (Where lines), role (fetch terms, titles to leave out)
- CV, languages, likes and dislikes
- the cut: count and minimum by fit, count and minimum by CV closeness
- the final score weights, and the CV match weights
- summarise size
Per agent, per company: affinity (hidden, neutral, liked, favourite). Per company, for every agent: All countries and All roles.