Add validate_schema_with config method for structured JSON output

Open
#1,010 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
ruby
Domain
ai

Research direction

Read issue #1007 first to understand the structured JSON output this feature depends on. Then trace the config do/chat(:extract) entry point shown here and define the completion criteria around accepting a secondary model and validating the cog's structured output against the user's needs.

Written by the indexing model from the issue text.

Description

enhancement

Follow-up to #1007. Once structured JSON output exists, add a config method that designates a secondary model to validate a cog's structured output.

This would be used to validate that the output conforms to the user's needs. For example, it could flag that a field was not populated although the prompt indicated that it was supposed to be always present.

an example of usage would be

config do
  chat(:extract) do
    validate_schema_with "claude-opus-4-8"
  end
end
Dominant language
Ruby
Stars
1.3k
Forks
80
Avg merge
21m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/roast

All issues in Shopify/roast

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.