Package org.codelibs.fess.llm
Class IntentDetectionResult
java.lang.Object
org.codelibs.fess.llm.IntentDetectionResult
Represents the result of intent detection from user input.
Contains the detected intent type, Fess query, and other metadata.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntentDetectionResultfallbackSearch(String originalMessage) Creates a fallback search intent when intent detection fails.static IntentDetectionResultCreates a FAQ intent result with a Fess query.Returns the document URL for summary intent.Returns the detected intent type.getQuery()Returns the Fess query string for search.Returns the reasoning for the detected intent.static IntentDetectionResultCreates a search intent result with a Fess query.static IntentDetectionResultCreates a summary intent result for a specific document.toString()static IntentDetectionResultCreates an unclear intent result when intent cannot be determined.
-
Method Details
-
getIntent
Returns the detected intent type.- Returns:
- the intent type
-
getQuery
Returns the Fess query string for search.- Returns:
- the Fess query string, or null if not available
-
getDocumentUrl
Returns the document URL for summary intent.- Returns:
- the document URL
-
getReasoning
Returns the reasoning for the detected intent.- Returns:
- the reasoning
-
search
Creates a search intent result with a Fess query.- Parameters:
query- the Fess query stringreasoning- the detection reasoning- Returns:
- the search intent result
-
summary
Creates a summary intent result for a specific document.- Parameters:
documentUrl- the document URL to summarizereasoning- the detection reasoning- Returns:
- the summary intent result
-
faq
Creates a FAQ intent result with a Fess query.- Parameters:
query- the Fess query stringreasoning- the detection reasoning- Returns:
- the FAQ intent result
-
unclear
Creates an unclear intent result when intent cannot be determined.- Parameters:
reasoning- the detection reasoning- Returns:
- the unclear intent result
-
fallbackSearch
Creates a fallback search intent when intent detection fails.- Parameters:
originalMessage- the original user message- Returns:
- the fallback search intent result
-
toString
-