1.9 KiB
1.9 KiB
Development Log: Query Intent Search Tuning
Purpose
Improve Second Brain search relevance and answer framing for questions about customer evaluation, approval likelihood, UX, business value, and requirement fit.
User Feedback
The answer became safer, but Second Brain still retrieved architecture documents for a question that was really about customer experience, approval risk, and business direction. Approval likelihood should also be labeled as inference, not fact.
Implementation Summary
- Added
queryIntentclassification to Second Brain Trace:technicalux-businessgovernancegeneral
- Expanded retrieval query terms based on intent.
- For
ux-business, boosted UX, customer journey, product discovery, virtual store, stakeholder approval, requirement fit, business value, acceptance criteria, and conversion-flow documents. - For
ux-business, penalized API Gateway, microservice, monolithic, backend, database, routing, and generic architecture-principles paths. - Added Trace context guidance that approval likelihood is inference unless explicit approval criteria are provided.
- Added base and Guard prompt guidance to prefer UX/business framing over technical architecture for these questions.
- Added tests to verify UX/business docs outrank API Gateway docs for approval/customer-experience questions.
Changed Files
src/features/secondBrainTrace.tssrc/features/projectChronicle/guardPrompt.tssrc/utils.tstests/secondBrainTrace.test.tstests/projectChronicleGuardPrompt.test.ts
Verification
./node_modules/.bin/tsc --noEmitnpm run compile./node_modules/.bin/jest --runInBand
Result
Second Brain Trace should now better match the user's question intent. Customer approval and UX/business-fit questions should retrieve customer journey and business-value notes before generic technical architecture notes.