Package dev.langchain4j.adaptiverag
Class QuestionRewriter
java.lang.Object
dev.langchain4j.adaptiverag.QuestionRewriter
This class implements a
Function
to rewrite questions for better vectorstore retrieval.
It uses an AI language model to rephrase input questions based on semantic intent and meaning.-
Constructor Details
-
QuestionRewriter
public QuestionRewriter()
-
-
Method Details
-
apply
Applies a natural language processing pipeline to improve a given question. This method uses a ChatLanguageModel with specified configuration and an LLMService to generate and invoke a new, improved question based on the provided input.
-