Feat: Enhance query intent search and answer format readability
This commit is contained in:
@@ -40,6 +40,17 @@ describe('Second Brain Trace', () => {
|
||||
].join('\n'),
|
||||
'utf8'
|
||||
);
|
||||
fs.mkdirSync(path.join(brainRoot, 'UX'), { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(brainRoot, 'UX', 'Customer Journey Virtual Store.md'),
|
||||
[
|
||||
'# Customer Journey Virtual Store',
|
||||
'',
|
||||
'Customer-facing virtual stores should connect spatial experience to product discovery, product understanding, and purchase conversion.',
|
||||
'Stakeholder approval often depends on requirement fit, business value, and acceptance criteria rather than visual novelty alone.'
|
||||
].join('\n'),
|
||||
'utf8'
|
||||
);
|
||||
fs.mkdirSync(path.join(brainRoot, '00_Raw', 'conversations'), { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(brainRoot, '00_Raw', 'conversations', '2026-05-01.md'),
|
||||
@@ -189,4 +200,19 @@ describe('Second Brain Trace', () => {
|
||||
fs.rmSync(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it('prioritizes UX and business documents for approval and customer-experience questions', () => {
|
||||
const trace = buildSecondBrainTrace(
|
||||
'롯데 이노베이트가 고객 대상 버추얼 웹스토어에서 상품 중심이 아니라 공간 중심 개발 방향을 승인할 가능성이 있을까?',
|
||||
brainRoot,
|
||||
{ force: true }
|
||||
);
|
||||
|
||||
expect(trace.queryIntent).toBe('ux-business');
|
||||
expect(trace.retrievalQuery).toContain('customer journey');
|
||||
expect(trace.retrievalQuery).toContain('approval');
|
||||
expect(trace.retrievedDocuments[0].path).toContain('Customer Journey Virtual Store.md');
|
||||
expect(trace.retrievedDocuments[0].path).not.toContain('API Gateway.md');
|
||||
expect(renderSecondBrainTraceContext(trace)).toContain('Approval likelihood is an inference');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user