Improving memory tool instructions and eval testing (#18091)

This commit is contained in:
Alisa
2026-02-05 10:07:47 -08:00
committed by GitHub
parent 4a6e3eb646
commit 5b9ea35b63
12 changed files with 538 additions and 321 deletions
+11 -7
View File
@@ -6,7 +6,12 @@
import { WEB_SEARCH_TOOL_NAME } from '../packages/core/src/tools/tool-names.js';
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { TestRig, printDebugInfo, validateModelOutput } from './test-helper.js';
import {
TestRig,
printDebugInfo,
assertModelHasOutput,
checkModelOutputContent,
} from './test-helper.js';
describe('web search tool', () => {
let rig: TestRig;
@@ -68,12 +73,11 @@ describe('web search tool', () => {
`Expected to find a call to ${WEB_SEARCH_TOOL_NAME}`,
).toBeTruthy();
// Validate model output - will throw if no output, warn if missing expected content
const hasExpectedContent = validateModelOutput(
result,
['weather', 'london'],
'Google web search test',
);
assertModelHasOutput(result);
const hasExpectedContent = checkModelOutputContent(result, {
expectedContent: ['weather', 'london'],
testName: 'Google web search test',
});
// If content was missing, log the search queries used
if (!hasExpectedContent) {