Constructors

  • Creates a Sensemaker object

    Parameters

    • modelSettings: ModelSettings

      what models to use for what tasks, a default model can be set.

    Returns Sensemaker

Methods

  • Categorize the comments by topics using a LLM on Vertex.

    Parameters

    • comments: Comment[]

      The data to summarize

    • includeSubtopics: boolean

      Whether to include subtopics in the categorization.

    • Optionaltopics: ({
          name: string;
      } | {
          name: string;
          subtopics: {
              name: string;
          }[];
      })[]

      The user provided topics (and optionally subtopics).

    • OptionaladditionalInstructions: string

      Optional. Context to add to the LLM prompt. @returns: The LLM's categorization.

    Returns Promise<Comment[]>

  • Get corresponding model from modelSettings object, or defaultModel if none specified.

    Parameters

    • modelSetting: keyof ModelSettings

      the key of the modelSettings options you want the Model for (corresponding to task)

    Returns Model

    The model to use for the corresponding ModelSetting key

  • Extracts topics from the comments using a LLM on Vertex AI. Retries if the LLM response is invalid.

    Parameters

    • comments: Comment[]

      The comments data for topic modeling

    • includeSubtopics: boolean

      Whether to include subtopics in the topic modeling

    • Optionaltopics: ({
          name: string;
      } | {
          name: string;
          subtopics: {
              name: string;
          }[];
      })[]

      Optional. The user provided top-level topics, if these are specified only subtopics will be learned.

    • OptionaladditionalInstructions: string

      Optional. Context to add to the LLM prompt. @returns: Topics (optionally containing subtopics) representing what is discussed in the comments.

    Returns Promise<({
        name: string;
    } | {
        name: string;
        subtopics: {
            name: string;
        }[];
    })[]>

  • Summarize a set of comments using all available metadata.

    Parameters

    • comments: Comment[]

      the text and (optional) vote data to consider

    • summarizationType: SummarizationType = SummarizationType.VOTE_TALLY

      what summarization method to use

    • Optionaltopics: ({
          name: string;
      } | {
          name: string;
          subtopics: {
              name: string;
          }[];
      })[]

      the set of topics that should be present in the final summary

    • OptionaladditionalInstructions: string

      additional context to give the model as part of the prompt

    Returns Promise<Summary>

    a summary of the information.