Give an agent a soft profile of likes and dislikes and take the must-haves off the form (wp-likes)
Add agents.like_text (migration 30) beside avoid_text, now shown as "What I don't like". The judge reads both under <likes> and <dislikes>, its career rubric judges against the prompts, the likes and the dislikes, and FORMAT 3 makes earlier judgements be made again. The form drops the must-haves box and no longer sends must_text, so a stored one is kept and still caps career in code. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
82afa831f2
commit
8c6cbdf002
18 files changed
+144
-75
No files matched your search
+16
-1
@@ -75,7 +75,8 @@ def config(tmp_path: Path) -> Config:
|
||||
|
||||
def hunter(store: Store, name: str = "Data", cv: str = CV, **kwargs: Any) -> Any:
|
||||
return store.save_agent(name, prompts=[Prompt(name="AI lead", text="Head of AI")],
|
||||
cv_text=cv, avoid_text="Pure reporting.",
|
||||
cv_text=cv, like_text="Building teams.",
|
||||
avoid_text="Pure reporting.",
|
||||
must_text="A permanent contract.", **kwargs)
|
||||
|
||||
|
||||
@@ -109,6 +110,10 @@ def test_a_run_writes_the_judgement_and_its_total(
|
||||
[system] = model.systems
|
||||
assert CV in system and "Pure reporting." in system and "A permanent contract." in system
|
||||
assert "- AI lead: Head of AI" in system and "deal-breaker" in system
|
||||
assert '<likes title="what they like: work, workplace, situations">\nBuilding teams.' \
|
||||
in system
|
||||
assert '<dislikes title="what they do not like">\nPure reporting.' in system
|
||||
assert "<avoid" not in system
|
||||
|
||||
|
||||
def test_the_musts_are_numbered_in_the_profile_and_stored_with_their_text(
|
||||
@@ -163,6 +168,16 @@ def test_judgements_made_before_the_format_are_made_again(store: Store) -> None:
|
||||
assert judge.input_key(owner, "text") != hashlib_old_key(owner, "text")
|
||||
|
||||
|
||||
def test_what_the_person_likes_is_part_of_what_a_judgement_read(store: Store) -> None:
|
||||
owner = hunter(store)
|
||||
liked = store.save_agent("Data", prompts=owner.prompts, agent_id=owner.id,
|
||||
like_text="Small teams.")
|
||||
assert judge.input_key(liked, "text") != judge.input_key(owner, "text")
|
||||
assert "Small teams." in judge.system(liked) and "Building teams." not in judge.system(liked)
|
||||
assert "<likes" not in judge.system(
|
||||
store.save_agent("Data", prompts=owner.prompts, agent_id=owner.id, like_text=""))
|
||||
|
||||
|
||||
def hashlib_old_key(agent: Any, text: str) -> str:
|
||||
blob = json.dumps([agent.cv_text, [[p.name, p.text] for p in agent.prompts],
|
||||
agent.avoid_text, agent.must_text, text], ensure_ascii=False)
|
||||
|
||||
Reference in new issue
Block a user