Skip to content

chore: add entity class examples to detection and augment prompts#11

Merged
lipikaramaswamy merged 2 commits into
mainfrom
chore/10-validation-prompt-entity-examples
Feb 25, 2026
Merged

chore: add entity class examples to detection and augment prompts#11
lipikaramaswamy merged 2 commits into
mainfrom
chore/10-validation-prompt-entity-examples

Conversation

@lipikaramaswamy
Copy link
Copy Markdown
Collaborator

Consolidate entity label examples into a single ENTITY_LABEL_EXAMPLES dict in engine/constants.py, used by validation, augment, and replacement prompts. Fixes conflicting augment prompt wording and aligns prompt example outputs with their Pydantic schemas.

Summary

  • Add entity class examples to validation and augment prompts so the LLM knows what each label means (e.g., city: Houston, San Diego, Doha, Lahore), improving reclassification accuracy
  • Consolidate the duplicate _EXAMPLE_LOOKUP (replace) and DEFAULT_ENTITY_LABELS (detection) into a single ENTITY_LABEL_EXAMPLES dict in engine/constants.py
  • Fix conflicting augment prompt wording: labels are now "preferred" rather than "the only classes that can be proposed," preserving the ability to create new snake_case labels
  • Align example outputs in validation and augment prompts with their Pydantic schemas ({"decisions": [...]} and {"entities": [...]} instead of bare lists)

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring

Testing

  • Tests pass locally
  • Added/updated tests for changes

Related Issues

Closes #10

Consolidate entity label examples into a single ENTITY_LABEL_EXAMPLES
dict in engine/constants.py, used by validation, augment, and replacement
prompts. Fixes conflicting augment prompt wording and aligns prompt
example outputs with their Pydantic schemas.
@lipikaramaswamy lipikaramaswamy requested a review from a team as a code owner February 25, 2026 18:36
…ted string, since it can create its own labels anyway
@lipikaramaswamy lipikaramaswamy merged commit b1036f7 into main Feb 25, 2026
5 checks passed
@lipikaramaswamy lipikaramaswamy deleted the chore/10-validation-prompt-entity-examples branch February 25, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: step _get_validation_prompt does not include entity examples

2 participants