Skip to content

Commit a0f4af6

Browse files
author
福晋
committed
chore: remove reference data from the eval process
1 parent 92eacbc commit a0f4af6

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

eval/utils/eval-utils.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ export function buildQuery(testCase: TestCase, options: { includeData?: boolean
3838
const library = detectLibrary(codeString);
3939
const { includeData = true } = options;
4040

41-
let query = description;
41+
// Strip inline "参考数据" from description for retrieval.
42+
// Dataset descriptions embed reference JSON inline in two formats:
43+
// "…高亮交互。\n参考数据:\n[{sets:…}]" (newline-separated)
44+
// "…高亮交互。参考数据:[{sets:…}]" (inline after period)
45+
const cleanDescription = description.split(/[:]/)[0].trim();
46+
47+
let query = includeData ? description : cleanDescription;
4248
if (includeData) {
4349
const refData = extractDataFromCode(codeString);
4450
if (refData.length > 0 && !description.includes('参考数据')) {

0 commit comments

Comments
 (0)