Refiners#
Refiners can be used in pipelines to improve the quality of the output. They are used to refine the output of a component, and can be used to fix errors, improve formatting, or add additional information.
Using Refiners#
Refiners can be used in the CLI with the -r
flag. You can specify multiple refiners in a chain, and they will be run in order. The output of one refiner will be used as the input for the next refiner.
janus translate --input janus/cli/ --output janus-translation --llm my-gpt -l python -r ReflectionRefiner -r CodeFormatRefiner
Available Refiners#
FormatRefiner
: Base class for formatting refiners.CodeFormatRefiner
: Refines the formatting of source code so that it can be correctly parsed.RequirementsFormatRefiner
: Refines the formatting of requirements so that they can be correctly parsed. Recommended for use with generating requirements.SimpleRetry
: Simple retry refiner that will retry the LLM call a specified number of times.ReflectionRefiner
: Uses LLM reflection to improve the quality of the output.RequirementsReflectionRefiner
: Uses LLM reflection to improve the quality of requirements, specifically.HallucinationRefiner
: Uses LLM reflection to attempt to remove hallucinations from the output.FixUMLConnectionsRefiner
: Fixes connections in UML diagrams.