mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 12:37:55 +01:00
fix(evals): retain explicitly negated global assignment
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
abf45f414e
commit
4b1db675c3
2 files changed
+7
-1
No files matched your search
@@ -172,3 +172,9 @@ it("preserves a negation that directly governs the assignment verb", () => {
|
||||
expect(gradeIntegratorSkills(o).passed).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("preserves an explicitly qualified direct denial of global assignment", () => {
|
||||
const o = authoredSelfUse();
|
||||
o.reply += " Created the reusable skill. I have not explicitly enabled it for all agents.";
|
||||
expect(gradeIntegratorSkills(o).passed).toBe(true);
|
||||
});
|
||||
@@ -104,7 +104,7 @@ function authorSkillAssignmentScoped(o: SkillsObservation, skill: CompanySkillDe
|
||||
}
|
||||
function claimsGlobalSkillAssignment(reply: string): boolean {
|
||||
const claims = /\b(?:enabled|assigned|activated|attached)\s+(?:it|the skill|this skill)?\s*(?:(?:for|to)\s+)?(?:all|every|everyone)\b/gi;
|
||||
return [...reply.matchAll(claims)].some(match => !/\b(?:not|never|didn't|haven't|hasn't)\s+(?:(?:been|ever|yet|automatically)\s+){0,2}$/i.test(reply.slice(0, match.index)));
|
||||
return [...reply.matchAll(claims)].some(match => !/\b(?:not|never|didn't|haven't|hasn't)\s+(?:(?:been|ever|yet|automatically|explicitly)\s+){0,2}$/i.test(reply.slice(0, match.index)));
|
||||
}
|
||||
export function gradeIntegratorSkills(value: unknown) {
|
||||
const c = checks(); const o = skillsObservation(value);
|
||||
|
||||
Reference in new issue
Block a user