Icon

LLMs for Sentiment Prediction

LLMs for Sentiment Analysis

This workflows employs three distinct strategies using Large Language Models (LLMs) for sentiment analysis.

It demonstrates the application of open-source and closed-source API-based LLMs, as well as local models for advancing financial sentiment analysis.

URL: Financial Sentiment Analysis (dataset) https://www.kaggle.com/datasets/sbhatti/financial-sentiment-analysis

Workflow description: This workflows employs three distinct strategies using Large Language Models (LLMs) for sentiment analysis. It demonstrates the application of open-source and closed-source API-based LLMs, as well as local models for advancing financial sentiment analysis.



Hugging Face

Open-source API models (e.g, bigscience/mt0-large for text2text generation)

OpenAI LLMs

Closed-source API model (e.g., gpt-3.5-turbo)

GPT4All

Local Models (e.g, mistral-7b-instruct)

Import input data
Join input data with prompt

LLMs for Sentiment Prediction with KNIME

Score model
OpenAI Authenticator
LLM Prompter
OpenAI API key
Credentials Configuration
Value Lookup
Sentiment labels
Table Creator
HF Hub Authenticator
Local GPT4All LLM Connector
Financial text datawith sentiment
CSV Reader
HF Hub LLM Connector
Column Appender
LLM Prompter
Missing valueto prompt
Missing Value
HuggingFace API key
Credentials Configuration
Keep 10
Sampling Rows
Join prompt+ texts
Expression
Create prompt
Table Creator
LLM Scorer
LLM Prompter
OpenAI Chat Model Connector

Nodes

Extensions

Links