Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 6.1.11

### Changed

- Updated `@tangle-network/agent-eval` to `0.135.2` so knowledge improvement uses the corrected paired promotion decisions without installing an older Eval copy.
- Updated the installation example to pin the matching Knowledge and Eval releases.

## 6.1.10

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Supply application callbacks for those decisions, or use `@tangle-network/agent-
## Install

```bash
pnpm add @tangle-network/agent-knowledge@6.1.10 @tangle-network/agent-eval@0.135.1
pnpm add @tangle-network/agent-knowledge@6.1.11 @tangle-network/agent-eval@0.135.2
```

Requires Node.js 20.19 or later.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tangle-network/agent-knowledge",
"version": "6.1.10",
"version": "6.1.11",
"description": "Build, search, evaluate, and improve source-backed knowledge bases.",
"homepage": "https://github.com/tangle-network/agent-knowledge#readme",
"repository": {
Expand Down Expand Up @@ -75,7 +75,7 @@
"verify:official-optimizers": "node scripts/verify-official-optimizers.mjs"
},
"dependencies": {
"@tangle-network/agent-eval": "0.135.1",
"@tangle-network/agent-eval": "0.135.2",
"@tangle-network/agent-interface": "0.36.0",
"proper-lockfile": "4.1.2",
"zod": "^4.4.3"
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 26 additions & 23 deletions tests/memory/improvement.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,9 @@ describe('agent memory improvement', () => {
expect(result.winnerSurface).toBe('{"visibility":"team"}')
expect(result.finalEvaluation.pairs).toHaveLength(6)
expect(result.finalEvaluation.pairs.map((pair) => pair.sequenceId)).toEqual(FINAL_SEQUENCE_IDS)
expect(result.decision).toMatchObject({
status: 'promote',
baselineScore: 0.25,
winnerScore: 1,
lift: 0.75,
})
expect(result.decision).toMatchObject({ status: 'promote', winnerScore: 1 })
expect(result.decision.baselineScore).toBeCloseTo(61 / 96)
expect(result.decision.lift).toBeCloseTo(35 / 96)
expect(result.activation.status).toBe('activated')
expect(activeConfig).toEqual({ visibility: 'team' })
expect(activationIds).toEqual([result.activation.id])
Expand Down Expand Up @@ -486,7 +483,22 @@ function selectingMethod<TConfig extends JsonValue>(
function improvementSequence(
id: string,
split: 'train' | 'validation' | 'test',
sameAgentProbeCount = 0,
): AgentMemorySequence {
const launchDateProbe = (suffix: string) => ({
id: `launch-date-${suffix}`,
query: `${id} launch date`,
requiredFacts: [{ id: `current-${suffix}`, anyOf: [`${id} launch date is Friday`] }],
forbiddenFacts: [
{
id: `stale-${suffix}`,
anyOf: [`${id} launch date is Thursday`],
obsolete: true,
},
],
expectedEventIds: [`${id}-event`],
expectedActorIds: ['researcher'],
})
return {
id,
family: 'first-party',
Expand All @@ -503,31 +515,22 @@ function improvementSequence(
metadata: { eventId: `${id}-event`, actorId: 'researcher' },
},
],
probes: Array.from({ length: sameAgentProbeCount }, (_, index) =>
launchDateProbe(`research-${index + 1}`),
),
},
{
id: 'delivery',
scope: { agentId: 'builder', teamId: 'team-1' },
probes: [
{
id: 'launch-date',
query: `${id} launch date`,
requiredFacts: [{ id: 'current', anyOf: [`${id} launch date is Friday`] }],
forbiddenFacts: [
{
id: 'stale',
anyOf: [`${id} launch date is Thursday`],
obsolete: true,
},
],
expectedEventIds: [`${id}-event`],
expectedActorIds: ['researcher'],
},
],
probes: [launchDateProbe('delivery')],
},
],
}
}

function finalImprovementSequences(): AgentMemorySequence[] {
return FINAL_SEQUENCE_IDS.map((id) => improvementSequence(id, 'test'))
const sameAgentProbeCounts = [0, 1, 2, 3, 1, 2]
return FINAL_SEQUENCE_IDS.map((id, index) =>
improvementSequence(id, 'test', sameAgentProbeCounts[index]),
)
}