Summarization

I am using the sum-transformers to get the summary of text which are stored in text property but I am getting empty list.

Here is the code I am using and the docker-compose.yml

result = (
    client.query
    .get("Resume", ["text", "_additional { summary { property result } }"])
    .do()
)
version: '3.4'
services:
  weaviate:
    command:
    - --host
    - 0.0.0.0
    - --port
    - '8080'
    - --scheme
    - http
    image: semitechnologies/weaviate:1.20.4
    ports:
    - 8080:8080
    restart: on-failure:0
    environment:
      CONTEXTIONARY_URL: contextionary:9999
      SUM_INFERENCE_API: 'http://sum-transformers:8080'
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      DEFAULT_VECTORIZER_MODULE: 'text2vec-contextionary'
      ENABLE_MODULES: 'text2vec-contextionary,sum-transformers'
      CLUSTER_HOSTNAME: 'node1'
  contextionary:
    environment:
      OCCURRENCE_WEIGHT_LINEAR_FACTOR: 0.75
      EXTENSIONS_STORAGE_MODE: weaviate
      EXTENSIONS_STORAGE_ORIGIN: http://weaviate:8080
      NEIGHBOR_OCCURRENCE_IGNORE_PERCENTILE: 5
      ENABLE_COMPOUND_SPLITTING: 'false'
    image: semitechnologies/contextionary:en0.16.0-v1.2.1
    ports:
    - 9999:9999
  sum-transformers:
    image: semitechnologies/sum-transformers:facebook-bart-large-cnn-1.0.0
    environment:
      ENABLE_CUDA: '0'
1 Like

Hi @Parth_Patel,
Welcome to the community.

I think you might be missing the properties that should be summarized in your query:
( properties: [\"property_name_to_summarise\"])

Can you update the property_name_to_summarise and run the following query again?

result = (
    client.query
    .get("Resume", ["text", "_additional { summary ( properties: [\"property_name_to_summarise\"])  { property result } }"])
    .do()
)