Merge branch 'wp5-agents-ui'
This commit is contained in:
commit
43f0210b88
3 files changed
+434
-31
No files matched your search
@@ -2,13 +2,13 @@
|
||||
{% block title %}Search agents — roledesk{% endblock %}
|
||||
|
||||
{# A card per agent: `static/agents.js` fills the list from `/api/agents`,
|
||||
newest first. A card shows what the agent looks for, its switch and its
|
||||
weights; Edit turns that card into the form below, in place, and New puts
|
||||
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 the role, weigh the terms, and it scores every open role. 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>
|
||||
<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>
|
||||
@@ -20,9 +20,37 @@
|
||||
<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>
|
||||
<label>What you are looking for
|
||||
<textarea id="a-intent" rows="7" placeholder="Senior backend engineer. Python and Go services, PostgreSQL, APIs on Kubernetes. Wants ownership of production systems in a product company."></textarea>
|
||||
<span class="hint">A paragraph of your CV, or the role in your own words: the work, the stack, the level.</span></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</legend>
|
||||
<div class="where-line">
|
||||
<span>Only roles in</span>
|
||||
<div id="a-in"></div>
|
||||
<button type="button" id="a-europe" class="secondary">Europe</button>
|
||||
</div>
|
||||
<div class="where-line">
|
||||
<span>and one of: in</span>
|
||||
<div id="a-any-country"></div>
|
||||
</div>
|
||||
<label class="inline"><input type="checkbox" id="a-remote"> or remote</label>
|
||||
<div class="where-line">
|
||||
<span>or in</span>
|
||||
<div id="a-places"></div>
|
||||
</div>
|
||||
<label class="inline"><input type="checkbox" id="a-hybrid"> Prefer hybrid, adding <input type="number" id="a-hybrid-weight" min="0" step="0.05" value="0.05" aria-label="Weight of hybrid"></label>
|
||||
<span class="hint">Countries are ISO codes such as DK or SE, added with Enter or a comma; EU is a role open anywhere in Europe. Places are towns, matched as part of the location, so Lund matches "Lund, Sweden". An empty line is no rule. A rule only rejects a role whose column is filled; an empty one ranks until extract reads the posting.</span>
|
||||
</fieldset>
|
||||
<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 and of the "one of" line above. Prefer: a role that meets it gains the weight. Values are separated by commas; salary is a number.</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>
|
||||
@@ -37,12 +65,12 @@
|
||||
<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 without an intent feeds neither stage.</span>
|
||||
<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>
|
||||
<label>Gates
|
||||
<textarea id="a-gates" class="code" rows="6" spellcheck="false">[]</textarea>
|
||||
<span class="hint">Rules a role must meet (require), must meet one of (any), or that lift it (prefer), as JSON: <code>[{"field": "country", "values": ["DK"], "mode": "any"}, {"field": "remote", "values": ["remote"], "mode": "any"}, {"field": "seniority", "values": ["senior", "staff"], "mode": "prefer", "weight": 0.05}]</code> is "in Denmark, or remote". Fields: place, country, remote, seniority, function, salary_min, currency, permit, languages, company. EU is a role in Europe that names no single country. A rule only rejects a role whose column is filled; an empty one ranks until extract reads the posting.</span></label>
|
||||
<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 above.</span></label>
|
||||
</details>
|
||||
<div class="agent-actions">
|
||||
<button type="submit">Save and score</button>
|
||||
|
||||
Reference in new issue
Block a user