감정 추출

참고

AI_SENTIMENT 은 ENTITY_SENTIMENT (SNOWFLAKE.CORTEX) 의 업데이트된 버전입니다. 최신 기능의 경우 AI_SENTIMENT 를 사용하십시오.

AI_SENTIMENT 함수는 다양한 시장과 언어에 걸쳐 최첨단 품질의 감정 분류를 제공합니다. AI_SENTIMENT를 사용하면 다음과 같은 사용 사례에 대해 전체적인 감정 분석과 세부적인 측면 기반 감정 분석을 모두 확보할 수 있습니다.

  • 소셜 미디어 모니터링

  • 자세한 제품 분석

  • 종합적인 브랜드 인식 연구

  • 고급 시장 인텔리전스

  • 직원 참여도 분석

  • 고객 경험 여정 매핑

  • 콘텐츠 성과 분석

  • 고객 지원 최적화

감정 추출 품질

AI_SENTIMENT는 사용자 지정 Snowflake 대규모 언어 모델을 사용하여 업계 최고 수준의 전반적 감정 분석 및 측면별 감정 분석 정확도를 제공합니다. 다음 테이블에서는 AI_SENTIMENT가 대중적인 모델과 비교하여 전체적인 감정 분석 및 측면 기반 감정(ABSA 혼합) 벤치마크에서 어떻게 수행되는지에 대한 정보를 제공합니다. 다국어 벤치마크에서 평가된 언어는 영어, 스페인어, 프랑스어, 독일어, 힌디어, 이탈리아어, 포르투갈어입니다.

참고

벤치마크된 모델 중 일부는 Snowflake Cortex에서 사용할 수 없습니다.


모델
측면 기반 감정
정확성(ABSA-mix)
측면 기반 감정
정확성(ABSA-multilingual)
전반적인 감정
정확성
전반적인 감정
정확성(다국어)

Cortex AI AI_SENTIMENT

0.92

0.81

0.83

0.83

claude-4-sonnet

0.84

0.79

0.75

0.82

mistral-large2

0.83

0.80

0.77

0.78

openai-gpt-4.1

0.83

0.73

0.80

0.78

llama4-scout

0.82

0.79

0.71

0.76

llama3.3-70b

0.82

0.79

0.71

0.76

AWS DetectSentiment

0.62

0.64

AI_SENTIMENT 함수 호출하기

기본적으로 Cortex AI_SENTIMENT는 전체 콘텐츠에 대한 전체적인 감정 점수를 반환합니다. 그러나 AI_SENTIMENT는 전반적으로 긍정적, 부정적, 중립적 버킷을 넘어 다양한 고객 의견을 포착할 수도 있습니다. 이 선택적 측면 기반 감정 분석을 위해, 감정 분석을 수행할 콘텐츠(예: 고객 의견 또는 리뷰)와 측면(엔터티 또는 범주라고도 함)을 지정합니다. AI_SENTIMENT는 각 엔터티에 대한 감정과 전체적인 감정을 반환합니다. 전체적인 감정만 받으려면 측면을 지정하지 않고 콘텐츠를 지정합니다.

영어 예제

다음 예제에서는 AI_SENTIMENT를 사용하여 제품 리뷰의 감정 분류를 가져옵니다.

SELECT AI_SENTIMENT('I went to the store, bought the leggings and exact same as shorts...
  they are expensive but i heard such great things. After wearing them twice i noticed a string popping out already.
  And aince i believed that they were this amazing luxury brand i didnt keep the receipt 😭 ');
Copy

반환 값:

{
  "categories": [
    {
      "name": "overall",
      "sentiment": "mixed"
    }
  ]
}

다음 예제에서는 AI_SENTIMENT를 사용하여 레스토랑 리뷰의 특정 측면에 대한 감정 분류를 가져옵니다.

SELECT AI_SENTIMENT('A tourist\'s delight, in low urban light,
  Recommended gem, a pizza night sight. Swift arrival, a pleasure so right,
  Yet, pockets felt lighter, a slight pricey bite. 💰🍕🚀',
  ['Cost', 'Quality' ,'Wait Time']);
Copy

반환 값:

{
  "categories": [
    {
      "name": "overall",
      "sentiment": "mixed"
    },
    {
      "name": "Cost",
      "sentiment": "negative"
    },
    {
      "name": "Quality",
      "sentiment": "positive"
    },
    {
      "name": "Wait Time",
      "sentiment": "positive"
    }
  ]
}

지정한 일부 측면이 제공된 텍스트에 적용되지 않을 경우, AI_SENTIMENT는 다음 예제에서 전문성과 브랜드에 대해 보여주는 대로 해당 측면에 대해 ‘알 수 없음’을 반환합니다.

SELECT AI_SENTIMENT('A tourist\'s delight, in low urban light,
  Recommended gem, a pizza night sight. Swift arrival, a pleasure so right,
  Yet, pockets felt lighter, a slight pricey bite. 💰🍕🚀',
  ['Cost', 'Professionalism' ,'Brand']);
Copy

반환 값:

{
  "categories": [
    {
      "name": "overall",
      "sentiment": "mixed"
    },
    {
      "name": "Brand",
      "sentiment": "unknown"
    },
    {
      "name": "Cost",
      "sentiment": "negative"
    },
    {
      "name": "Professionalism",
      "sentiment": "unknown"
    }
  ]
}

다국어 예제

다음 두 가지 유사한 예에서 볼 수 있듯이, AI_SENTIMENT는 여러 언어로 감정을 분석할 수 있으므로 텍스트를 번역하고 의미의 핵심 부분을 잃을 위험을 감수할 필요가 없습니다. 텍스트의 언어를 지정할 필요는 없습니다. 측면은 다음 예제에서 보듯이 텍스트의 언어로 지정될 수도 있고, 두 번째 예제에서 보듯이 영어로 지정될 수도 있습니다.

참고

AI_SENTIMENT는 영어, 프랑스어, 독일어, 힌디어, 이탈리아어, 스페인어, 포르투갈어를 지원합니다.

스페인어로 된 텍스트와 레이블이 모두 포함된 예제:

SELECT AI_SENTIMENT ('Pedí dos pares del mismo modelo en diferentes colores.
    Uno tenía defectos en la costura y el cuero se veía de menor calidad.
    Por 350€ el par, esto es inaceptable. El servicio al cliente tardó una
    semana en responder y la solución no fue satisfactoria. Es una pena porque
    cuando están bien hechos, son zapatos hermosos. Pero la inconsistencia en la
    calidad es preocupante.', ['Calidad', 'Calidad de Servicio,' 'Precio', 'Tiempo de Espera']);
Copy

반환 값:

{
  "categories": [
    {
      "name": "overall",
      "sentiment": "negative"
    },
    {
      "name": "Calidad",
      "sentiment": "negative"
    },
    {
      "name": "Calidad de Servicio",
      "sentiment": "negative"
    },
    {
      "name": "Precio",
      "sentiment": "negative"
    },
    {
      "name": "Tiempo de Espera",
      "sentiment": "negative"
    }
  ]
}

독일어 텍스트와 영어 레이블이 포함된 예제:

SELECT AI_SENTIMENT ('Die Schuhe selbst sind wirklich schön und gut verarbeitet.
    Das Leder ist weich und die Passform stimmt. Allerdings gab es erhebliche
    Verzögerungen bei der Lieferung - statt der versprochenen 5 Tage hat es 3
    Wochen gedauert. Der Kundenservice war freundlich, aber nicht sehr hilfreich.
    Für 320€ erwarte ich besseren Service. Die Schuhe sind in Ordnung, aber das
    Gesamterlebnis war mittelmäßig', ['Quality', 'Price', 'Service', 'WaitTime']);
Copy

반환 값:

{
  "categories": [
    {
      "name": "overall",
      "sentiment": "mixed"
    },
    {
      "name": "Price",
      "sentiment": "neutral"
    },
    {
      "name": "Quality",
      "sentiment": "positive"
    },
    {
      "name": "Service",
      "sentiment": "neutral"
    },
    {
      "name": "WaitTime",
      "sentiment": "negative"
    }
  ]
}

모델 제한 사항

Snowflake Cortex AI에서 사용 가능한 모든 대규모 언어 모델(LLMs)은 입력 및 출력 토큰의 총 개수에 제한이 있으며, 이를 모델의 *컨텍스트 윈도우*라고 합니다.

AI_SENTIMENT의 컨텍스트 창은 모델이 높은 수준의 정확도를 유지할 수 있도록 설정되었습니다. AI_SENTIMENT는 2,048개 토큰(약 1,600단어)의 텍스트 입력을 위해 훈련 및 최적화되었습니다. 최대 10개의 측면을 지정할 수 있으며, 각 측면은 30자를 초과할 수 없습니다.

함수

컨텍스트 윈도우(토큰)

엔터티 레이블의 최대 수

AI_SENTIMENT

2,048

10