You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Users want some way to get structured output like behavior for non-deterministic output. For instance, if I've got a Rule that says "Talk like a Pirate", I want something that automatically enforces (and automatically corrects) an LLM to output that way.
Describe the solution you'd like
Use EvalEngine to automatically evaluate output on whether it follows the provided Rulesets.
Provide a custom function that can do whatever kind of check they'd like. Describe alternatives you've considered
Build the loop myself:
fromgriptape.enginesimportEvalEnginefromgriptape.structuresimportPipelinefromgriptape.tasksimportPromptTaskengine=EvalEngine(
criteria="Determine whether the answer is spoken like a pirate.",
evaluation_params=[EvalEngine.Param.INPUT, EvalEngine.Param.ACTUAL_OUTPUT],
)
pipeline=Pipeline(
tasks=[
PromptTask("What is 2 + 2? {% if args and args[0] %}{{ args[0] }}{% endif %}"),
]
)
score=-1reason=Nonewhilescore<0.5:
pipeline.run(reason)
score, reason=engine.evaluate(input=pipeline.input, actual_output=pipeline.output)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Users want some way to get structured output like behavior for non-deterministic output. For instance, if I've got a Rule that says "Talk like a Pirate", I want something that automatically enforces (and automatically corrects) an LLM to output that way.
Describe the solution you'd like
EvalEngine
to automatically evaluate output on whether it follows the provided Rulesets.Describe alternatives you've considered
Build the loop myself:
The text was updated successfully, but these errors were encountered: