caikit.interfaces.nlp.tasks =========================== .. py:module:: caikit.interfaces.nlp.tasks .. autoapi-nested-parse:: This module holds the Task definitions for all common NLP tasks Classes ------- .. autoapisummary:: caikit.interfaces.nlp.tasks.TextGenerationTask caikit.interfaces.nlp.tasks.TextClassificationTask caikit.interfaces.nlp.tasks.TokenClassificationTask caikit.interfaces.nlp.tasks.TokenizationTask caikit.interfaces.nlp.tasks.ClassificationWithTextGenerationTask caikit.interfaces.nlp.tasks.EmbeddingTask caikit.interfaces.nlp.tasks.EmbeddingTasks caikit.interfaces.nlp.tasks.RerankTask caikit.interfaces.nlp.tasks.RerankTasks caikit.interfaces.nlp.tasks.SentenceSimilarityTask caikit.interfaces.nlp.tasks.SentenceSimilarityTasks caikit.interfaces.nlp.tasks.ChunkerTokenizationTask Module Contents --------------- .. py:class:: TextGenerationTask Bases: :py:obj:`caikit.core.TaskBase` The Text Generation Task is responsible for taking input prompting text and generating additional text from that prompt. .. py:class:: TextClassificationTask Bases: :py:obj:`caikit.core.TaskBase` The text classification task is responsible for assigning a label or class to text. .. py:class:: TokenClassificationTask Bases: :py:obj:`caikit.core.TaskBase` The token classification task is responsible for assigning a label to individual tokens in a document. .. py:class:: TokenizationTask Bases: :py:obj:`caikit.core.TaskBase` The tokenization task is responsible for splitting a document into tokens. .. py:class:: ClassificationWithTextGenerationTask Bases: :py:obj:`caikit.core.TaskBase` The classification with text generation task is responsible for taking input prompting text, generating additional text from that prompt and classifying the generated text based on detectors. .. py:class:: EmbeddingTask Bases: :py:obj:`caikit.core.TaskBase` Return a text embedding for the input text string .. py:class:: EmbeddingTasks Bases: :py:obj:`caikit.core.TaskBase` Return a text embedding for each text string in the input list .. py:class:: RerankTask Bases: :py:obj:`caikit.core.TaskBase` Returns an ordered list ranking the most relevant documents for the query Required parameters: query: The search query documents: JSON documents containing "text" or alternative "_text" to search Returns: The top_n documents in order of relevance (most relevant first). For each, a score and document index (position in input) is returned. The original document JSON is returned depending on optional args. The top_n optional parameter limits the results when used. .. py:class:: RerankTasks Bases: :py:obj:`caikit.core.TaskBase` Returns an ordered list for each query ranking the most relevant documents for the query Required parameters: queries: The search queries documents: JSON documents containing "text" or alternative "_text" to search Returns: Results in order of the queries. In each query result: The query text is optionally included for visual convenience. The top_n documents in order of relevance (most relevant first). For each, a score and document index (position in input) is returned. The original document JSON is returned depending on optional args. The top_n optional parameter limits the results when used. .. py:class:: SentenceSimilarityTask Bases: :py:obj:`caikit.core.TaskBase` Compare the source_sentence to each of the sentences. Result contains a list of scores in the order of the input sentences. .. py:class:: SentenceSimilarityTasks Bases: :py:obj:`caikit.core.TaskBase` Compare each of the source_sentences to each of the sentences. Returns a list of results in the order of the source_sentences. Each result contains a list of scores in the order of the input sentences. .. py:class:: ChunkerTokenizationTask Bases: :py:obj:`caikit.core.TaskBase` The Chunk tokenization task is responsible for taking input text and giving out chunks of pre-configured type, like sentences.