refiner#
Attributes#
Classes#
This requirements-specific refiner is intended to address a common issue with |
|
Module Contents#
- refiner.log#
- class refiner.JanusRefiner#
- class refiner.SimpleRetry(llm, parser, max_retries)#
Bases:
JanusRefiner
- Parameters:
llm (janus.llm.models_info.JanusModel) –
parser (janus.parsers.parser.JanusParser) –
max_retries (int) –
- retry_chain: langchain_core.runnables.RunnableSerializable#
- class refiner.FixParserExceptions(llm, parser, max_retries)#
Bases:
JanusRefiner
,langchain.output_parsers.RetryWithErrorOutputParser
- Parameters:
llm (janus.llm.models_info.JanusModel) –
parser (janus.parsers.parser.JanusParser) –
max_retries (int) –
- class refiner.ReflectionRefiner(llm, parser, max_retries, prompt_template_name='refinement/reflection')#
Bases:
JanusRefiner
- Parameters:
llm (janus.llm.models_info.JanusModel) –
parser (janus.parsers.parser.JanusParser) –
max_retries (int) –
prompt_template_name (str) –
- reflection_chain: langchain_core.runnables.RunnableSerializable#
- revision_chain: langchain_core.runnables.RunnableSerializable#
- class refiner.RequirementsReflectionRefiner(llm, parser, max_retries, prompt_template_name='refinement/reflection/incose')#
Bases:
JanusRefiner
This requirements-specific refiner is intended to address a common issue with requirements reflection, where over the course of several reflection loops, requirements lists grow increasingly verbose, eventually becoming too wordy to be useful. To reduce this, this refiner interlaces an additional reflection -> revision loop which de-duplicates requirements.
- Parameters:
llm (janus.llm.models_info.JanusModel) –
parser (janus.parsers.parser.JanusParser) –
max_retries (int) –
prompt_template_name (str) –
- reflection_chain: langchain_core.runnables.RunnableSerializable#
- revision_chain: langchain_core.runnables.RunnableSerializable#
- reflect_duplication_chain: langchain_core.runnables.RunnableSerializable#
- revise_duplication_chain: langchain_core.runnables.RunnableSerializable#
- class refiner.HallucinationRefiner(**kwargs)#
Bases:
ReflectionRefiner