fix: update all Stage 2 references to Stage 3 CANONICAL type counts
Comprehensive update of type count references from Stage 2 (31 nouns + 40 verbs) to Stage 3 CANONICAL (42 nouns + 127 verbs) across entire codebase. Changes (23 files): - Core architecture: Memory tracking comments, speedup calculations - Tests: Type count assertions, enum index expectations, memory benchmarks - CLI: User-visible type count output - Augmentations: Type detection comments - Documentation: Architecture docs, guides, performance docs - Type embeddings: Regenerated for all 169 types (338KB) Specific updates: - 31 → 42 (noun count): 38 occurrences - 40 → 127 (verb count): 24 occurrences - 124 → 168 bytes (noun array size): 5 occurrences - 160 → 508 bytes (verb array size): 5 occurrences - 284 → 676 bytes (total type tracking): 12 occurrences - Enum indices updated to match Stage 3 reordering Type embeddings regenerated: - 42 noun embeddings (64.5 KB) - 127 verb embeddings (194.8 KB) - Total: 338 KB (was 108.8 KB) All constants, arrays, and tests now consistent with Stage 3 taxonomy. Fixes #v5.5.1-type-count-migration
This commit is contained in:
parent
f57732be90
commit
823cd5cf1b
23 changed files with 106 additions and 106 deletions
|
|
@ -31,7 +31,7 @@ describe('TypeAwareQueryPlanner', () => {
|
|||
expect(plan.targetTypes.length).toBe(1)
|
||||
expect(plan.targetTypes[0]).toBe(NounType.Person)
|
||||
expect(plan.confidence).toBeGreaterThanOrEqual(0.8)
|
||||
expect(plan.estimatedSpeedup).toBeGreaterThan(10) // 31/1 types
|
||||
expect(plan.estimatedSpeedup).toBeGreaterThan(10) // 42/1 types
|
||||
})
|
||||
|
||||
it('should use multi-type routing for multiple high-confidence types', () => {
|
||||
|
|
@ -45,14 +45,14 @@ describe('TypeAwareQueryPlanner', () => {
|
|||
expect(plan.targetTypes).toContain(NounType.Organization)
|
||||
|
||||
expect(plan.estimatedSpeedup).toBeGreaterThan(1)
|
||||
expect(plan.estimatedSpeedup).toBeLessThanOrEqual(31)
|
||||
expect(plan.estimatedSpeedup).toBeLessThanOrEqual(42)
|
||||
})
|
||||
|
||||
it('should use all-types routing for low confidence queries', () => {
|
||||
const plan = planner.planQuery('show me stuff')
|
||||
|
||||
expect(plan.routing).toBe('all-types')
|
||||
expect(plan.targetTypes.length).toBe(31) // All noun types
|
||||
expect(plan.targetTypes.length).toBe(42) // All noun types
|
||||
expect(plan.estimatedSpeedup).toBe(1.0) // No speedup
|
||||
expect(plan.confidence).toBeLessThan(0.6)
|
||||
})
|
||||
|
|
@ -61,7 +61,7 @@ describe('TypeAwareQueryPlanner', () => {
|
|||
const plan = planner.planQuery('')
|
||||
|
||||
expect(plan.routing).toBe('all-types')
|
||||
expect(plan.targetTypes.length).toBe(31)
|
||||
expect(plan.targetTypes.length).toBe(42)
|
||||
expect(plan.estimatedSpeedup).toBe(1.0)
|
||||
expect(plan.reasoning).toContain('Empty query')
|
||||
})
|
||||
|
|
@ -91,14 +91,14 @@ describe('TypeAwareQueryPlanner', () => {
|
|||
const multiType = planner.planQuery('engineers at companies')
|
||||
const allTypes = planner.planQuery('show everything')
|
||||
|
||||
// Single-type: 31/1 = 31x
|
||||
expect(singleType.estimatedSpeedup).toBeCloseTo(31, 0)
|
||||
// Single-type: 42/1 = 42x
|
||||
expect(singleType.estimatedSpeedup).toBeCloseTo(42, 0)
|
||||
|
||||
// Multi-type: 31/N where N = 2-5
|
||||
// Multi-type: 42/N where N = 2-5
|
||||
expect(multiType.estimatedSpeedup).toBeGreaterThan(1)
|
||||
expect(multiType.estimatedSpeedup).toBeLessThan(31)
|
||||
expect(multiType.estimatedSpeedup).toBeLessThan(42)
|
||||
|
||||
// All-types: 31/31 = 1x
|
||||
// All-types: 42/42 = 1x
|
||||
expect(allTypes.estimatedSpeedup).toBe(1.0)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue