LLM_SENTIMENT
Descriptionβ
Used to analyze the sentiment of text.
Syntaxβ
LLM_SENTIMENT([<resource_name>], <text>)
Parametersβ
Parameter | Description |
---|---|
<resource_name> | The specified resource name |
<text> | The text to analyze sentiment for |
Return Valueβ
Returns the sentiment analysis result. Possible values include:
- positive
- negative
- neutral
- mixed
If any input is NULL, returns NULL.
The result is generated by a large language model, so the output may vary.
Examplesβ
SET default_llm_resource = 'resource_name';
SELECT LLM_SENTIMENT('Apache Doris is a great DB system.') AS Result;
+----------+
| Result |
+----------+
| positive |
+----------+
SELECT LLM_SENTIMENT('resource_name', 'I hate sunny days.') AS Result;
+----------+
| Result |
+----------+
| negative |
+----------+