Summarize Text in Generative AI

Use a cohere.command model hosted on a dedicated AI cluster in OCI Generative AI to summarize text by using a specific format, length, and tone.

Important

The cohere.command model supported for the on-demand serving mode is now retired and this model is deprecated for the dedicated serving mode. If you're hosting cohere.command on a dedicated AI cluster, (dedicated serving mode) for summarization, you can continue to use this hosted model replica with the summarization API and in the playground until the cohere.command model retires for the dedicated serving mode. See Retiring the Models for retirement dates and definitions. We recommend that you use the chat models instead which offer the same summarization capabilities, including control over summary length and style.
    1. In the navigation bar of the Console, select the US Midwest (Chicago) region.
    2. Open the navigation menu and click Analytics & AI. Under AI Services, click Generative AI.
    3. Select a compartment that you have permission to work in. If you don't see the playground, ask an administrator to give you access to Generative AI resources and then return to the following steps.
    4. Click Playground.
    5. Click Summarization.
    6. Select a model for summarizing text by performing one of the following actions:
      • In the Model list select a model endpoint that's hosted on a dedicated AI cluster. The models are displayed as model name (endpoint name).
      • Click View model details, select a model and then click Choose model.
    7. Either paste the text to be summarized into the Input area, or select an example from the Example list.

      For the examples, the parameters are already set for you and it's optional to change them.

    8. If you entered a text to be summarized, in the Parameters section, select an approximate Length for the summary:
      • Short: Up to two sentences
      • Medium: Between three and five sentences
      • Long: Six or more sentences
      • Auto: Let the model select a length based on the input size
    9. For the Format parameter, select whether to format the generated summary as a paragraph or as a bullet list.

      If you select Auto, the model chooses the best format based on the input text.

    10. (Optional) Set new values for the other parameters. For parameter details, see Summarization Model Parameters.
    11. Click Summarize.
    12. (Optional) To change the output, update the parameters and click Summarize. Repeat this step until you're happy with the summary.
    13. To copy the generated output, click Copy output.

      The output is copied to the computer clipboard.

    14. (Optional) To copy the code that generated the output, click View code, select a programming language, click Copy code, paste the code into a file and save the file. Ensure that the file maintains the format of the pasted code.
      Tip

      If you're using the code in an application, ensure that you authenticate your code.
    15. (Optional) To clear the input area and input a new text to summarize, click Clear under the Input area.
      Note

      When you click Clear the model parameters reset to their default values.
  • To summarize text, use the summarize-text-result operation.

    Enter the following command for a list of options to summarize text.

    oci generative-ai-inference summarize-text-result summarize-text -h

    For a complete list of parameters and values for the OCIGenerative AI CLI commands, see Generative AI Inference CLI and Generative AI Management CLI.

  • Run the SummarizeText operation to summarize text.

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.