Repository navigation
Add Typesafe wrangles for structured AI answers - #1202
Merged
Merged
Conversation
ebhills
marked this pull request as ready for review
September 26, 2026 23:41
9 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #1201
What changes
Provide structured answers to common types of questions about each input row through the new
ainamespace on the Python, recipe, and DataFrame surfaces.ai.chooseanswers which option best fits,ai.scoreanswers where input falls along ordered criteria, andai.true_falseanswers how likely a statement is to be true.ai.answersanswers any combination of these question types in one Typesafe request; all four wrangles accept multiple named questions.ai.true_falsereturns probability true and the supplied true criterion.How it was verified
.\scripts\test-local.ps1— 2,508 passed, 6 skipped, 139 deselected.git diff --checkpassed; branch verified current with refreshedorigin/main.ai.choosecall succeeded usingTYPESAFE_API_KEYandcache=False. This is user-reported provider connectivity/function evidence, not a measured accuracy evaluation.ai.score,ai.true_false,ai.answers, and hosted recipe execution have not been verified. GitHub CI results are pending; this PR remains Draft.Compatibility and risk
ai.answers; the earlier unreleased draft name has no compatibility alias. Preview callers must update the function/recipe name and catalog operation/model role. Thequestionsinput mapping, provider payload, and result fields are unchanged.extract.aiand its support-module imports remain in place; noai.extractalias or module reorganization is included.0..N-1semantics. There is no rescaling or Boolean thresholding.WRANGLES_AI_CACHE_*controls are separate from extraction's existing cache controls.Ready-for-review checklist
mainand has no merge conflictsSee the pull request workflow.