Package com.tnsai.reasoning
Class LLMOutputParser
java.lang.Object
com.tnsai.reasoning.LLMOutputParser
Utility for parsing structured content from LLM responses.
-
Method Summary
Modifier and TypeMethodDescriptionparseNumberedList(String text) Parses a numbered list from LLM output.parseNumberedList(String text, int limit) Parses a numbered list, limiting results to the given count.
-
Method Details
-
parseNumberedList
Parses a numbered list from LLM output.Recognizes lines starting with "1.", "1)", or "1:" patterns.
- Parameters:
text- the LLM output text- Returns:
- list of extracted items (never empty — returns the original text if no items found)
-
parseNumberedList
Parses a numbered list, limiting results to the given count.- Parameters:
text- the LLM output textlimit- maximum number of items to return- Returns:
- list of extracted items, limited to the given count
-