glam/apps/archief-assistent/src/pages
kempersc 7fbff2ff5f feat(archief-assistent): add entity extraction to semantic cache
Prevent geographic false positives in cache lookups. Queries like
"musea in Amsterdam" vs "musea in Noord-Holland" have ~93%
embedding similarity but completely different answers.

Changes:
- Add ExtractedEntities interface for structured cache keys
- Implement fast entity extraction (<5ms, no LLM) with regex patterns
- Extract institution types (GLAMORCUBESFIXPHDNT), locations, and intent
- Generate structured cache keys (e.g., "count:M:amsterdam")
- Raise similarity threshold from 0.85 to 0.97 to match backend DSPy
- Add 'structured' match method to CacheLookupResult

The entity extractor recognizes:
- 19 institution types (Dutch + English patterns)
- 12 Dutch provinces with ISO 3166-2:NL codes
- Major Dutch cities with settlement codes
- Query intents (count, list, info)

This ensures geographic queries get different cache entries even when
embeddings are highly similar.
2026-01-10 10:33:21 +01:00
..
BrowsePage.tsx remove a,bihguous web-claims 2025-12-21 00:01:54 +01:00
ChatPage.tsx feat(archief-assistent): add entity extraction to semantic cache 2026-01-10 10:33:21 +01:00
LoginPage.tsx remove a,bihguous web-claims 2025-12-21 00:01:54 +01:00
MapPage.tsx remove a,bihguous web-claims 2025-12-21 00:01:54 +01:00
OntologyPage.tsx add sparql validator and RAG injector 2025-12-30 03:43:31 +01:00
RulesPage.tsx Make AGENTS more succint by referring to opencode rules & enrich custodians 2025-12-28 14:56:35 +01:00
StatsPage.tsx remove a,bihguous web-claims 2025-12-21 00:01:54 +01:00