An agent has fetch_terms (migration 23, API, a chip field in the agent
editor). The terms of a pull are the union over the enabled agents, none
when one of them has none. They go only to wide reads: a company tagged All
roles, or a reach ask_for drops as too many countries for a one host; a
board's {"terms": false} switches them off. SmartRecruiters q,
SuccessFactors q, Workday searchText, Phenom keywords, Eightfold query and
Oracle keyword declare query="one"; the runner makes one series per term
times the country series, drops the places first over MAX_SERIES, then the
terms. A term read is narrowed: it writes no ats:size, closes nothing and
prunes no per-role state, and the 10% guard holds it to its own
fingerprint. The Companies reach line counts the terms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
101 lines
6.4 KiB
HTML
101 lines
6.4 KiB
HTML
{% extends "settings/_layout.html" %}
|
|
{% block title %}Search agents — roledesk{% endblock %}
|
|
|
|
{# A card per agent: `static/agents.js` fills the list from `/api/agents`,
|
|
newest first. A card shows the agent's prompts, its rules in words, its
|
|
switch and its weights; Edit turns that card into the form below, in place, and New puts
|
|
a blank one on top. The form is a `<template>` because only one card edits
|
|
at a time, so its ids stay unique. #}
|
|
{% block content %}
|
|
<h1>Search agents</h1>
|
|
<p class="lede">A search agent is what the Roles tab ranks by: describe each kind of role you want as a prompt, say where, weigh the terms, and it scores every open role against the prompt each fits best. Several agents rank the same roles differently, each with its own votes and liked companies; Viewing as on Roles picks one, and its votes are that agent's.</p>
|
|
|
|
<div class="agents-head">
|
|
<p id="agents-count" class="count" role="status"></p>
|
|
<button type="button" id="a-new">New agent</button>
|
|
</div>
|
|
<div id="agents-list" class="agent-cards"></div>
|
|
|
|
<template id="agent-form-template">
|
|
<form id="agent-form" class="agent-form" autocomplete="off">
|
|
<h2 id="agent-form-title">New agent</h2>
|
|
<label>Name <input type="text" id="a-name" required placeholder="My search"></label>
|
|
<fieldset class="prompts">
|
|
<legend>What you are looking for</legend>
|
|
<div id="a-prompts" class="prompt-rows"></div>
|
|
<button type="button" id="a-add-prompt" class="secondary">Add prompt</button>
|
|
<span class="hint">A prompt is one kind of role in your own words: the work, the level, the setting. A role is ranked by the prompt it fits best, so three kinds of role are three prompts, not one blended paragraph. Votes and liked companies count for the whole agent.</span>
|
|
</fieldset>
|
|
<fieldset class="where">
|
|
<legend>Where can the role be?</legend>
|
|
<span class="hint">Each line adds places. A role is kept when it fits at least one line, so a line more means more roles, never fewer. With every line empty a role can be anywhere. A role whose location is not known yet ranks until extract reads the posting.</span>
|
|
<div class="where-line">
|
|
<span>Anywhere in</span>
|
|
<div id="a-countries"></div>
|
|
</div>
|
|
<div class="where-line">
|
|
<span>or in the towns</span>
|
|
<div id="a-towns"></div>
|
|
</div>
|
|
<span class="hint">Towns are for places outside the countries above: with Denmark above, Malmö here adds Malmö to all of Denmark. A town inside a country above changes nothing, since the whole country is in already.</span>
|
|
<div class="where-line">
|
|
<label class="inline"><input type="checkbox" id="a-remote"> or remote</label>
|
|
<select id="a-remote-scope" aria-label="Remote from where">
|
|
<option value="europe">within Europe</option>
|
|
<option value="anywhere">anywhere</option>
|
|
</select>
|
|
</div>
|
|
<label class="inline where-rank"><input type="checkbox" id="a-hybrid"> Prefer hybrid<span id="a-hybrid-weight-line">, adding <input type="number" id="a-hybrid-weight" min="0" step="0.05" value="0.05" aria-label="Weight of hybrid"></span></label>
|
|
<span class="hint">This one ranks rather than filters: a hybrid role gains a little.</span>
|
|
<p id="a-where-sum" class="where-sum" role="status"></p>
|
|
</fieldset>
|
|
<fieldset class="terms">
|
|
<legend>What big boards send</legend>
|
|
<div class="where-line">
|
|
<span>Only roles matching</span>
|
|
<div id="a-terms"></div>
|
|
</div>
|
|
<span class="hint">Fetch terms narrow what a big board sends when it is read across Europe: a company tagged All roles, or a host that cannot ask for each country. The board then lists only roles whose text has one of these words, one request per word. Empty means no narrowing, and while any agent that is on has none, no board is narrowed. Boards read for Denmark or Sweden, and boards under 300 roles, are never narrowed. The words decide what is fetched, not how it ranks.</span>
|
|
</fieldset>
|
|
<fieldset class="weights">
|
|
<legend>How much each counts</legend>
|
|
<label>Fit to the text <input type="number" id="a-fit" min="0" step="0.05" value="0.6"></label>
|
|
<label>Newness <input type="number" id="a-recency" min="0" step="0.05" value="0.2"></label>
|
|
<label>Companies you like <input type="number" id="a-affinity" min="0" step="0.05" value="0.2"></label>
|
|
<label>Roles you liked <input type="number" id="a-taste" min="0" step="0.05" value="0.2"></label>
|
|
</fieldset>
|
|
<fieldset class="weights limits">
|
|
<legend>What the model reads</legend>
|
|
<label>Extract the best <input type="number" id="a-extract-top" min="0" step="10" value="500"></label>
|
|
<label>down to a score of <input type="number" id="a-extract-min" min="0" max="1" step="0.05" value="0.55"></label>
|
|
<label>Summarise the best <input type="number" id="a-summarise-top" min="0" step="5" value="30"></label>
|
|
<label>down to a score of <input type="number" id="a-summarise-min" min="0" max="1" step="0.05" value="0.65"></label>
|
|
</fieldset>
|
|
<span class="hint">Every pull scores every open role for free; these bound what the model then reads, per agent. The count is the backstop, the score the real stop. Fit is a level, the same in every run: a new role with the worst fit scores about 0.27, a perfect one about 0.87. An agent with no prompt feeds neither stage.</span>
|
|
<details class="advanced">
|
|
<summary>Advanced</summary>
|
|
<div class="advanced-body">
|
|
<fieldset class="rules">
|
|
<legend>Other rules</legend>
|
|
<div id="a-rules" class="rule-rows"></div>
|
|
<button type="button" id="a-add-rule" class="secondary">Add rule</button>
|
|
<span class="hint">Must: a role must meet it. One of: a role must meet one of these or a Where line. Prefer: a role that meets it gains the weight. Values are separated by commas; salary is a number.</span>
|
|
</fieldset>
|
|
<label>Rules as sent
|
|
<textarea id="a-gates" class="code" rows="6" spellcheck="false" readonly>[]</textarea>
|
|
<span class="hint">Read only: what Save sends as the agent's gates, from Where and Other rules.</span></label>
|
|
</div>
|
|
</details>
|
|
<div class="agent-actions">
|
|
<button type="submit">Save and score</button>
|
|
<button type="button" id="a-cancel" class="secondary">Cancel</button>
|
|
<button type="button" id="a-delete" class="secondary">Delete</button>
|
|
</div>
|
|
</form>
|
|
</template>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{{ asset('agents.js') }}"></script>
|
|
{% endblock %}
|