Personalizing and Categorizing with LLMs

Introduction to Workflow Automation with n8n

James Chapman

AI Curriculum Manager, DataCamp

From User Feedback to Custom Responses

 

classify_workflow.png

Introduction to Workflow Automation with n8n

LLMs for Classification

Summarization

Summarize the following user feedback:

{{ $json.feedback }}

Classification

Classify this feedback as positive, negative,
or neutral. Reply with one word only:

{{ $json.summary }}

 

classify_example.png

  • Instructions must include the desired labels
  • For more subjective classification, examples may be required
Introduction to Workflow Automation with n8n

From User Feedback to Custom Responses

classify_workflow.png

 

  • Expressions: Instruction + {{feedback}}
Introduction to Workflow Automation with n8n

From User Feedback to Custom Responses

classify_workflow.png

 

  • Expressions: {{instruction}} + {{feedback}}
    • Each branch sets a different instruction via Edit Fields
Introduction to Workflow Automation with n8n
Introduction to Workflow Automation with n8n

Let's practice!

Introduction to Workflow Automation with n8n

Preparing Video For Download...