Skip to main content

04.6.11 bart-large-cnn (preview)

Node Description

bart-large-cnn (preview) - action type node needed to generate a short, summarized version of text based on a given text.

note

Model ID@cf/facebook/bart-large-cnn . BART is a transform encoder-encoder (seq2seq) model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. The model can be used for text generalization. Generalization is the task of creating a shorter version of a document while preserving the important information it contains. Some models can extract text from the original input, while other models can generate entirely new text.

AI-based summarization technology is becoming more and more in demand as it helps to process large amounts of textual information efficiently. There are many areas where the technology is used:

  1. Email processing: automatically summarizing long emails for quick review. Filtering and prioritizing messages based on summary information.
  1. News and media applications: creating summaries of news articles for quick reference.
  1. Education: summarize lectures, tutorials, and research papers to facilitate learning.
  1. Legal: summarize legal documents, court decisions and contracts.
  1. Business and finance: summarize reports, presentations, meetings, and other business documents. Extracting key information from large amounts of data for decision making.

Node Configuration

To customize the bart-large-cnn (preview) node, required and optional fields are required. Required fields include the field:

  • Document Text.

Document Text

Text field to be filled in. The text can be filled in manually or be the result of previous nodes.

Max Length (Integer)

The maximum number of response tokens that can be generated by AI before stopping. Models can stop before reaching this maximum. This parameter sets only the absolute maximum number of tokens that can be generated.

Example of launching a node

Let's run the bart-large-cnn (preview) node to process the text and generate a response.

Example text
In the painting "Death of a bullfighter" the artist depicts both a bull, which for him served as a personification of masculinity, and a horse - of femininity. If we look at the picture through the eyes of the author, we see that in these images there is an eternal clash of the sexes, the struggle between man and woman.
Then we see a disturbing plot in which a huge bull drags a merciless toreador on his powerful horns, sensing his impending doom. We see his face peeking out from under a red piece of cloth, in which Picasso has left a certain mystery. If the bullfighter is able to defeat his horned rival, it will be just his red cape, if the opposite happens, gaining a sad outcome, this red stain means blood flowing from the body of the dying man. Judging by the title of the painting one should lean closer to the second option, however, knowing the unpredictability and unconventionality of the artist's thought it is possible to find another secret meaning of this action.
Pablo Picasso often depicted the images of heroes with a double meaning. Even in the painting "Death of a bullfighter", the bull is represented not only as a killer, but also as a victim, as well as the man defeated by him. If you look closely, we see that on the face of the beast there is not wild rage, but only an extraordinary surprise. The painting is imbued with expression and surrealism motifs that only true connoisseurs of Pablo Picasso's art can fully understand.

The output of the node execution is JSON:

  • with a summary of the provided text;
  • with the action execution status "success": true.
JSON
{
"result": {
"errors": [],
"messages": [],
"result": {
"summary": "The painting \"Death of a bull\" shows a man being defeated by a bull. The image is a symbol of the struggle between man and the bull."
},
"success": true
}
}