Class ExpandingQueryTransformer

java.lang.Object
dev.langchain4j.rag.query.transformer.ExpandingQueryTransformer
All Implemented Interfaces:
QueryTransformer

public class ExpandingQueryTransformer extends Object implements QueryTransformer
A QueryTransformer that utilizes a ChatLanguageModel to expand a given Query.
Refer to DEFAULT_PROMPT_TEMPLATE and implementation for more details.

Configurable parameters (optional):
- promptTemplate: The prompt template used to instruct the LLM to expand the provided Query.
- n: The number of Querys to generate. Default value is 3.
See Also: