Repository navigation
Bug Fix
Fix: WordExtractor prompt/schema contract inconsistency (#2)
The Dutch extraction prompt instructed the LLM to extract phraseological constructions as single units, but PartOfSpeech had no phrase value. When the LLM returned word_type="phrase", Pydantic validation failed and the entire extraction raised APIError — breaking save-to-dictionary flows in production.
Changes
- Added
PHRASE = "phrase"toPartOfSpeechenum incore.models - Added
phraseto the allowed types list in the NL extraction prompt - Added a few-shot example demonstrating phraseological unit extraction
- Regenerated
nl.jsonprompt asset - Added prompt-schema consistency tests to prevent future drift