Summarize Text in Generative AI

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

    1. In the navigation bar of the Console, select a region with Generative AI, for example, US Midwest (Chicago). If you don't know which region to select, see Regions with Generative AI.
    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. Choose a model for summarizing text by performing one of the following actions:
      • In the Model list, select a cohere.command model.
      • 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 your own 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 choose 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 for your use, click Copy output.

      The output is copied to your 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.

      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.

      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.