feat: replace MeaningUnitAspect enum with open-ended str - #206
feat: replace MeaningUnitAspect enum with open-ended str#206asteier2026 wants to merge 2 commits into
Conversation
Greptile SummaryThis PR removes the
Confidence Score: 5/5
Important Files Changed
|
1856714 to
212a478
Compare
The enum was causing record loss when the model returned values like "goal" or "symptom" that weren't enumerated. Aspect is now an unvalidated str to accommodate open-ended LLM output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: asteier2026 <asteier@nvidia.com>
…hema.aspect Empty strings are structurally valid but semantically meaningless; guard against them consistently with the other non-id string fields in these schemas. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: asteier2026 <asteier@nvidia.com>
212a478 to
373f2b6
Compare
| MeaningUnitSchema( | ||
| id=1, | ||
| aspect=MeaningUnitAspect.ROLE, | ||
| aspect="role", |
There was a problem hiding this comment.
nit: could we add a regression test using an aspect outside the former enum, such as "diagnosis" or "goal"? The current "role" and "environment" fixtures were valid under the old enum, so they don’t directly verify the behavior this PR fixes.
lipikaramaswamy
left a comment
There was a problem hiding this comment.
LGTM on the code and tests (left a small nit), plus internal benchmark results support merging.
Summary
MeaningUnitAspectenum fromEntityDispositionSchemaandschemas/__init__.pyMeaningUnitSchema.aspectfromMeaningUnitAspecttostrMotivation
The enum was causing record loss: the model returns open-ended aspect values like
"goal","symptom","diagnosis"that can't be exhaustively enumerated. Validation errors were silently dropping records.