Track additional field in validation set for brief type#590
Draft
yjunechoe wants to merge 8 commits intorstudio:mainfrom
Draft
Track additional field in validation set for brief type#590yjunechoe wants to merge 8 commits intorstudio:mainfrom
brief type#590yjunechoe wants to merge 8 commits intorstudio:mainfrom
Conversation
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.
Summary
This PR adds a column
brief_clstoagent$validation_setthat tracks how the string values in thebriefshould be interpreted w.r.t. yaml read/write (namely, whether it had been autogenerated or not).Example:
This is achieved by formalizing an
<autobrief>class which is attached byresolve_brief()when forwarding togenerate_autobriefs(). For minimal invasiveness to existing code,<autobrief>gets a methods such that indexing a vector of autobriefs perserves the class (much like behavior of<AsIs>). Since the class information is then immediately extracted out intobrief_clsinsidecreate_validation_step(), this approach allows thebriefcolumn to retain its atomic character type.Speaking of
<AsIs>, this is optional but I'm also testing an experimental support for verbatim yaml to be stored/round-tripped in an agent'sbrieffield. This should only requires a light extension to the infrastructure.For example, it would be nice if one could pack some metadata about a validation step into a yaml and pass it to
brief, after marking it withI(), like this:The intended effect would be for
briefto have its structure restored in the yaml representation when the agent is written out. And upon being read back into R, thebriefcolumn values would again be transformed into its flat string representation.Related GitHub Issues and PRs
Checklist
testthatunit tests totests/testthatfor any new functionality.