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

Refiners can also be used in the pipeline command by specifying them in a pipeline configuration file.

[
    {
        "type": "RequirementsDocumenter",
        "kwargs": {"refiner_types": ["RequirementsFormatRefiner"]}
    }
]

This will run the RequirementsFormatRefiner on the output of the RequirementsDocumenter.

Available Refiners#