Skip to content

feat: upgrade iris SDK to v0.13.0 with structured output for entity extraction#1

Merged
erikhoward merged 1 commit intomainfrom
feat/iris-v0.13.0-structured-output
Mar 8, 2026
Merged

feat: upgrade iris SDK to v0.13.0 with structured output for entity extraction#1
erikhoward merged 1 commit intomainfrom
feat/iris-v0.13.0-structured-output

Conversation

@erikhoward
Copy link
Member

Summary

  • Upgrade iris SDK from v0.12.0 to v0.13.0
  • Leverage new ResponseJSONSchema() feature for reliable entity extraction
  • Simplify extraction prompt by removing JSON format instructions (schema enforces structure)

Changes

Dependency Update

  • github.com/petal-labs/iris: v0.0.0-20260215074851-88b18e925989v0.13.0

Entity Extraction Improvements

  • Add entityExtractionSchema with strict JSON Schema validation including:
    • Required fields: name, type, confidence
    • Enum validation for entity types: person, organization, product, location, concept
    • Type constraints for all fields
  • Update Extract() to use ResponseJSONSchema() for constrained model output
  • Keep parseExtractionResponse() as fallback for providers without structured output support
  • Remove unused complete() helper method

Benefits

  1. Reliability: JSON Schema enforces output structure at the model level, eliminating parsing failures
  2. Type Safety: Required fields and enum values catch errors before they reach application code
  3. Simpler Prompts: No need for JSON format examples in prompts

Test plan

  • All existing tests pass
  • Entity extraction tests pass
  • Full project builds successfully

🤖 Generated with Claude Code

…xtraction

- Update iris dependency from v0.12.0 to v0.13.0
- Use ResponseJSONSchema() for reliable JSON output in entity extraction
- Add entityExtractionSchema with strict JSON Schema validation
- Simplify extraction prompt (schema handles format constraints)
- Keep parseExtractionResponse() as fallback for providers without structured output support
- Remove unused complete() helper method

Benefits:
- More reliable entity extraction with guaranteed valid JSON
- Type-safe output with required fields and enum validation
- Cleaner prompt without JSON format instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@erikhoward erikhoward merged commit 4b168d6 into main Mar 8, 2026
6 checks passed
@erikhoward erikhoward deleted the feat/iris-v0.13.0-structured-output branch March 8, 2026 04:08
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.

1 participant