API Reference
Last updated
Last updated
The QueryDecomposition
class is used to decompose a complex question into multiple simpler questions using a LLM model. The class uses a default decomposition prompt from the . The default prompt is based on few-shot prompts from the StrategyQA dataset.
To use the QueryDecomposition
class, you first need to create an instance of the class.
After the QueryDecomposition
instance has been initialized, you can use the decompose
method to decompose a query into multiple simpler questions. The decompose
method takes a complex query as input and returns a list of simple queries.
If the input query is a simple question and doesn't require decomposition, the decompose
method returns an empty list.