autorag.nodes.generator package¶
Submodules¶
autorag.nodes.generator.base module¶
- class autorag.nodes.generator.base.BaseGenerator(project_dir: str, llm: str, *args, **kwargs)[source]¶
Bases:
BaseModule
autorag.nodes.generator.llama_index_llm module¶
autorag.nodes.generator.openai_llm module¶
- class autorag.nodes.generator.openai_llm.OpenAILLM(project_dir, llm: str, batch: int = 16, *args, **kwargs)[source]¶
Bases:
BaseGenerator
autorag.nodes.generator.run module¶
- autorag.nodes.generator.run.evaluate_generator_node(result_df: DataFrame, metric_inputs: List[MetricInput], metrics: List[str] | List[Dict])[source]¶
- autorag.nodes.generator.run.run_generator_node(modules: List, module_params: List[Dict], previous_result: DataFrame, node_line_dir: str, strategies: Dict) DataFrame [source]¶
Run evaluation and select the best module among generator node results. And save the results and summary to generator node directory.
- Parameters:
modules – Generator modules to run.
module_params – Generator module parameters. Including node parameters, which is used for every module in this node.
previous_result – Previous result dataframe. Could be prompt maker node’s result.
node_line_dir – This node line’s directory.
strategies – Strategies for generator node.
- Returns:
The best result dataframe. It contains previous result columns and generator node’s result columns.