Skip to content

Add semantic operators module#124

Merged
D3f0 merged 1 commit intomainfrom
semantic-operators-summary
Feb 2, 2026
Merged

Add semantic operators module#124
D3f0 merged 1 commit intomainfrom
semantic-operators-summary

Conversation

@D3f0
Copy link
Collaborator

@D3f0 D3f0 commented Feb 2, 2026

This PR adds the semantic_operators.py module containing four key semantic operations:

Operations

  • sem_map: Semantically transforms records from source to target schema using natural language instructions
  • sem_filter: Filters records based on natural language predicates using LLM-based logical classification
  • sem_agg: Aggregates across all records for summarization tasks
  • normalize_input_data: Helper function for input normalization

The module provides an agentic analogue of LOTUS-style semantic operations and supports both Agentics Graph (AG) and pandas DataFrame inputs/outputs.

Testing

Includes comprehensive test suite with 20 test cases covering:

  • Input normalization with DataFrame and AG types
  • sem_map operation with BaseModel/string targets and various merge modes
  • sem_filter operation with predicate evaluation and DataFrame support
  • sem_agg operation with aggregation logic and transduction type setting
  • Integration tests for end-to-end workflows
  • Edge cases and error handling

All tests passing with 100% success rate.

…perations

Signed-off-by: Nahuel Defossé <nahuel.deofsse@ibm.com>
@D3f0 D3f0 force-pushed the semantic-operators-summary branch from b4ee27e to 8581f2a Compare February 2, 2026 07:50
@D3f0 D3f0 merged commit 324a908 into main Feb 2, 2026
5 checks passed
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