Class LlmResponseUtils

java.lang.Object
dev.dokimos.core.LlmResponseUtils

public final class LlmResponseUtils extends Object
Utility methods for processing LLM responses.

Provides common parsing functionality for handling responses from JudgeLM implementations.

  • Method Details

    • stripMarkdown

      public static String stripMarkdown(String response)
      Strips markdown code block formatting from an LLM response.

      Many LLMs wrap JSON responses in markdown code blocks like:

       ```json
       {"key": "value"}
       ```
       
      This method removes such formatting to extract the raw content.
      Parameters:
      response - the LLM response that may contain markdown formatting
      Returns:
      the response with markdown code block formatting removed