Skip to content

fix: get instructions from upstream guardian adapters#1037

Draft
psschwei wants to merge 4 commits intogenerative-computing:mainfrom
psschwei:guardian-formatters
Draft

fix: get instructions from upstream guardian adapters#1037
psschwei wants to merge 4 commits intogenerative-computing:mainfrom
psschwei:guardian-formatters

Conversation

@psschwei
Copy link
Copy Markdown
Member

@psschwei psschwei commented May 7, 2026

Misc PR

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

This is a test of a potential fix for #1017 . The goal is to move the instruction logic out of the guardian helper function and into the upstream io.yaml files for each adapter/intrinsic.

To see what that might look like, I've included a mellea/backends/adapters/_overlays/ directory with my take on what an updated io.yaml file might look like. These are temporary files to serve as a discussion point on what the final form might look like. This directory (and the helper method(s) that use it) should be considered as items to help illustrate the final solution.

The key file to pay attention to is mellea/stdlib/components/intrinsic/guardian.py -- I'd say if we're happy with how those look, we'll probably be happy with the overall solution.

One item that I don't have a good answer to just yet: the CRITERIA_BANK still lives in Mellea, not upstream. Not sure how to best handle that, so input welcome.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com>
@psschwei psschwei requested a review from jakelorocco May 7, 2026 14:34
@psschwei psschwei added the do-not-merge/hold Block merging this PR label May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

The PR description has been updated. Please fill out the template for your PR to be reviewed.

@github-actions github-actions Bot added the bug Something isn't working label May 7, 2026
@psschwei
Copy link
Copy Markdown
Member Author

psschwei commented May 7, 2026

cc @pronics2004

@psschwei
Copy link
Copy Markdown
Member Author

psschwei commented May 7, 2026

Also note: there's updated io.yaml files for every version of the models. It was very little overhead to generate them all so I included them, but we may ultimately want to do a subset of them.

psschwei added 2 commits May 7, 2026 11:00
Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com>
Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com>
@psschwei
Copy link
Copy Markdown
Member Author

psschwei commented May 7, 2026

Latest commit uses pre-existing config file override

Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com>
@psschwei psschwei force-pushed the guardian-formatters branch from b76390a to b8d180d Compare May 7, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working do-not-merge/hold Block merging this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

investigate top-level guardian intrinsic functions to remove prompt formatting

1 participant