Package dev.langchain4j.adaptiverag
Interface Generation.Service
- Enclosing class:
- Generation
public static interface Generation.Service
Interface for service implementation that provides capabilities to answer questions based on given context.
-
Method Summary
-
Method Details
-
invoke
Retrieves and answers a question based on the provided context.The method accepts a question and a list of context strings. It processes these inputs to formulate an answer. If the answer cannot be determined with certainty, the response will state that an answer is not known. The provided answer is kept concise and limited to three sentences.
- Parameters:
question
- The user's question for which an answer is required.context
- A list of string values representing contextual information useful in answering the question.- Returns:
- A string containing the answer to the question based on the available context.
-