Give repair its own profile, reading what was said before and what fixed it before
Conf writing is granted to this profile alone and it is not offered as a button — making it selectable would put a write one click from any question. Its prompt leads on what it does not decide, because the resolver picks the key and the probe picks the value.
This commit is contained in:
@@ -446,6 +446,55 @@ if ($profile === 'chat') {
|
||||
. "knowledge freely — Linux, scripting, hardware, whatever comes up. The restriction "
|
||||
. "is only about the specifics of THIS installation.\n\n";
|
||||
|
||||
} elseif ($profile === 'repair') {
|
||||
// The only profile that can change a setting, so the prompt's job is mostly to stop it
|
||||
// believing that it decides anything. It does not: the resolver picks the key, the probe
|
||||
// picks the value, and the operator picks whether to write. What the model contributes is
|
||||
// the explanation and the conversation — the parts where being wrong costs a sentence.
|
||||
//
|
||||
// Prior context first, because the failure this profile is most prone to is confidently
|
||||
// re-deriving something already settled: proposing a fix that was tried and did not work,
|
||||
// or reading a term the operator has already corrected once.
|
||||
require_once dirname(__DIR__) . '/include/ai_repair.php';
|
||||
$priorContext = vv_ai_repair_context();
|
||||
if ($priorContext !== '') $attached['prior'] = 'phrasebook + closed findings';
|
||||
|
||||
$system = "You are helping the operator of a Varaverk server deal with a finding — something "
|
||||
. "on this machine that is misconfigured or is reporting a problem.\n\n"
|
||||
|
||||
. "WHAT YOU DO NOT DECIDE\n"
|
||||
. "You do not choose which setting is involved: that was resolved from the conf "
|
||||
. "before you were asked. You do not choose what value to write: a probe either got "
|
||||
. "an answer from a candidate or it did not, and only a value that answered can be "
|
||||
. "written. You do not decide whether to apply anything — the operator does.\n\n"
|
||||
. "So never say you have changed, set, fixed or updated anything. If a change was "
|
||||
. "applied you will have been told so; otherwise it has not happened yet.\n\n"
|
||||
|
||||
. "TOGGLES ARE NEVER YOURS TO FLIP\n"
|
||||
. "Whether something should be switched on is a decision about what the operator "
|
||||
. "wants, not a fact you can discover. Offer it, explain the consequence, and wait.\n\n"
|
||||
|
||||
. "WHEN THE VALUE CANNOT BE WORKED OUT HERE\n"
|
||||
. "Some things cannot be derived from this machine at all — an API key most of all. "
|
||||
. "Say so plainly and walk the operator through getting it, step by step, naming the "
|
||||
. "screen and the field. Then ask them to paste it. That is a normal outcome and not "
|
||||
. "a failure; pretending to have found it is the failure.\n\n"
|
||||
|
||||
. "HOW TO ANSWER\n"
|
||||
. "Lead with what is wrong and what it stops working. Quote the evidence on the "
|
||||
. "finding. Then give the operator their choices in plain terms: apply the proposed "
|
||||
. "value, acknowledge it as intended, or leave it. Keep it short — they are reading "
|
||||
. "this to make one decision.\n\n"
|
||||
. "Say plainly when you do not know. A wrong cause sends someone to fix the wrong "
|
||||
. "thing, which is worse than saying the finding does not explain itself.\n\n"
|
||||
|
||||
. ($priorContext !== ''
|
||||
? "WHAT HAS ALREADY HAPPENED HERE\n"
|
||||
. "Use this before reasoning from scratch. If a term below was corrected, use the "
|
||||
. "corrected meaning without being told again. If a similar finding was closed "
|
||||
. "before, say what ended it last time.\n\n" . $priorContext . "\n\n"
|
||||
: "");
|
||||
|
||||
} elseif ($profile === 'troubleshoot') {
|
||||
// Different inputs and a different refusal rule from the assistant, which is what earns it a
|
||||
// profile of its own. The assistant's contract is "answer only from the passages, refuse if
|
||||
|
||||
Reference in New Issue
Block a user