157 lines
12 KiB
HTML
157 lines
12 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 fetch gate in words, its
|
|
switch, its weights, its analytics filter and its summarise size; 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, set the fetch gate (world, location, role exclusion, role fetch), and it measures every open role's closeness to the prompt it is closest to. 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 is closest to, 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>The fetch gate</legend>
|
|
<span class="hint">Hard rules, a yes or no per role, in four parts. A role that fails is never read by a model and never shown. A rule rejects on evidence only: a role whose location is not known yet passes until extract reads it. Two company switches under Sources override parts for every agent: All locations bypasses Location, All roles bypasses Role exclusion and Role fetch.</span>
|
|
<h3>World</h3>
|
|
<div class="where-line">
|
|
<span>Only roles in:</span>
|
|
<select id="a-scope" aria-label="World: only roles in">
|
|
<option value="europe">Europe</option>
|
|
<option value="countries">Chosen countries</option>
|
|
<option value="everywhere">Everywhere</option>
|
|
</select>
|
|
<div id="a-scope-countries"></div>
|
|
</div>
|
|
<span class="hint">The outer countries. Every role must be in them, and no company switch lifts this. All locations falls back to it.</span>
|
|
<h3>Location</h3>
|
|
<span class="hint">A role passes when it matches at least one line: a country, a town or remote, so a line more means more roles. With every line empty a role can be anywhere in the world gate.</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.</span>
|
|
<div class="where-line">
|
|
<span>Remote:</span>
|
|
<select id="a-remote" aria-label="Remote">
|
|
<option value="none">no</option>
|
|
<option value="scope">anywhere within the world gate</option>
|
|
<option value="from">only when open to someone in:</option>
|
|
</select>
|
|
<div id="a-remote-from"></div>
|
|
</div>
|
|
<span class="hint">A remote role passes on top of the lines above. A remote role whose area is not stated yet passes until extract reads the posting.</span>
|
|
<h3>Role exclusion</h3>
|
|
<div class="where-line">
|
|
<span>Leave out titles with</span>
|
|
<div id="a-titles"></div>
|
|
</div>
|
|
<span class="hint">Phrases, separated by a comma or Enter. A phrase matches whole words anywhere in the title, whatever the case: <code>account executive</code> takes "Enterprise Account Executive, UK", and <code>data engineer</code> leaves "Data Engineering Manager" alone. A shorter phrase takes more: <code>sales</code> takes Sales Engineer too. No host can be asked this, so it is applied to every role after the fetch, liked companies included. A role left out keeps its row, and Show gated on Roles lists it with the phrase that took it.</span>
|
|
<h3>Role fetch</h3>
|
|
<div class="where-line">
|
|
<span>Only roles matching</span>
|
|
<div id="a-terms"></div>
|
|
</div>
|
|
<span class="hint">Fetch terms, separated by a comma or Enter: <code>machine learning, data science</code> is two terms, and <code>machine learning</code> is searched as one. A host that takes a query sends only roles with one of the terms anywhere in the ad, but only for boards of 300 or more roles; smaller boards and other hosts are read whole. The terms are ignored after the fetch, since prompt closeness is the finer filter. Empty means no narrowing.</span>
|
|
<p id="a-where-sum" class="where-sum" role="status"></p>
|
|
</fieldset>
|
|
<fieldset class="terms cv">
|
|
<legend>Your CV</legend>
|
|
<span class="hint">Optional. With a CV, the judge stage reads each of this agent's best roles against it and rates skills, experience and career from 0 to 10, which the CV match on Roles is made of. A role is read at most once per change of the CV, the prompts or the texts below. The CV stays in this app and goes only to the model you set up.</span>
|
|
<label>CV
|
|
<textarea id="a-cv-text" rows="10" placeholder="Paste your CV or career summary here"></textarea></label>
|
|
<label>or read it from a file
|
|
<input type="file" id="a-cv-file" accept=".md,.txt,text/plain,text/markdown"></label>
|
|
<span class="hint">A .md or .txt file replaces the text above. Nothing is uploaded: the browser reads it into the box.</span>
|
|
<div class="where-line">
|
|
<span>Languages you speak</span>
|
|
</div>
|
|
<div id="a-cv-languages" class="rule-rows"></div>
|
|
<button type="button" id="a-add-language" class="secondary">Add language</button>
|
|
<button type="button" id="a-suggest-languages" class="secondary">Suggest languages</button>
|
|
<span class="hint">A two-letter code such as <code>en</code> or <code>da</code>, and how well. Roles that ask for a language you lack, or a level above yours, get a warning on Roles; a role that names one of yours as a plus gets a star. With none, no role is flagged. Suggest languages reads them from the CV with one model call and replaces the rows above; nothing is saved until Save.</span>
|
|
<label>What I like
|
|
<textarea id="a-like-text" rows="4" placeholder="Building a team from scratch, close work with the product side, small companies, a say in the roadmap"></textarea></label>
|
|
<label>What I don't like
|
|
<textarea id="a-avoid-text" rows="4" placeholder="Constant on-call, sales targets, large consultancies, open-plan offices"></textarea></label>
|
|
<span class="hint">The work, the workplace, situations; read by the judge for the career rating. Rules that must hold go under the fetch gate or Other rules instead.</span>
|
|
</fieldset>
|
|
<fieldset class="weights limits">
|
|
<legend>Analytics filter</legend>
|
|
<label>Prompt closeness: the best <input type="number" id="a-cut-fit-top" min="0" step="10" value="500"></label>
|
|
<label>each at least <input type="number" id="a-cut-fit-min" min="0" max="1" step="0.05" value="0.6"></label>
|
|
<label>CV closeness: the best <input type="number" id="a-cut-cv-top" min="0" step="10" value="150"></label>
|
|
<label>not already in, each at least <input type="number" id="a-cut-cv-min" min="0" max="1" step="0.05" value="0.6"></label>
|
|
</fieldset>
|
|
<span class="hint">Of the roles that pass the fetch gate, the analytics filter keeps the best N by prompt closeness and, of the rest, the best M by CV closeness. Liked and saved roles always pass, whatever their closeness. The roles that pass, the cut, get fetch text, extract and judge, so it sets what the models read. Closeness is a level from 0 to 1, the same in every run and free to compute; a liked company adds about 0.056 to it and a favourite about 0.111. For a broad agent the count stops a list, for a narrow one the minimum does, so roles that do not fit are not read to fill the count. An agent with no prompt has no prompt list, and one with no CV no CV list.</span>
|
|
<fieldset class="weights">
|
|
<legend>Want feed score</legend>
|
|
<label>Prompt closeness <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>Company like <input type="number" id="a-affinity" min="0" step="0.05" value="0.2"></label>
|
|
<label>Job like <input type="number" id="a-taste" min="0" step="0.05" value="0.2"></label>
|
|
</fieldset>
|
|
<span class="hint">Orders What I'm looking for on Roles: the weighted sum of the four over the sum of the weights. Newness halves every 14 days; job like is a role's closeness to the roles you liked, away from those you passed. Changing the weights re-sorts and reads nothing.</span>
|
|
<fieldset class="weights">
|
|
<legend>CV match weights</legend>
|
|
<label>Skills <input type="number" id="a-cv-skills" min="0" step="5" value="30"></label>
|
|
<label>Experience <input type="number" id="a-cv-experience" min="0" step="5" value="25"></label>
|
|
<label>Career <input type="number" id="a-cv-career" min="0" step="5" value="30"></label>
|
|
</fieldset>
|
|
<span class="hint">The judge rates skills, experience and career from 0 to 10; the CV match, from 0 to 100, is those three weighted by these shares. It orders What fits me on Roles. Changing the weights re-sorts at once and asks the model for nothing; 0 leaves a number out, all three 0 means no CV match.</span>
|
|
<fieldset class="weights limits">
|
|
<legend>After the ranking</legend>
|
|
<label>Summarise the top <input type="number" id="a-summarise-top" min="0" step="5" value="30"> of each feed order</label>
|
|
</fieldset>
|
|
<span class="hint">Summarise writes a short summary and tags for the top N of What I'm looking for and the top N of What fits me, at most twice N roles, and for every role you liked or saved. It is no part of any score.</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 Place line. Not: a role that meets it is left out. 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 the fetch gate 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 %}
|
|
{# chips.css only adds to app.css; base.html has no head block for it. #}
|
|
<link rel="stylesheet" href="{{ asset('chips.css') }}">
|
|
<script src="{{ asset('chips.js') }}"></script>
|
|
<script src="{{ asset('remote.js') }}"></script>
|
|
<script src="{{ asset('agents.js') }}"></script>
|
|
{% endblock %}
|