Detect AI-Generated Hallucinations with Custom Screening
Workflow Description
An automation workflow that leverages local language models to systematically scan AI-generated content for fabricated claims and analytical errors. The template processes input text, applies multiple LLM chains for verification, filters results by severity, and aggregates findings for review or downstream action.
How it works
- 1.Initiate workflow manually or via external trigger to begin hallucination screening
- 2.Parse and segment input text into analyzable chunks using custom code logic
- 3.Execute parallel LLM chains (Ollama and LLM Chat) to identify factual inaccuracies and false claims
- 4.Filter and rank detected hallucinations by severity level and confidence score
- 5.Merge and structure final results for reporting, logging, or automated response
Use cases
- Verify AI responses before publication to minimize misinformation spread
- Audit social media content from Twitter/X to fact-check shared information
- Validate local LLM model outputs and iteratively improve prompt quality based on detected errors
Requirements
- Deployed and properly configured Ollama model (local or cloud-hosted)
- Twitter/X API credentials if ingesting content from the social platform
- Structured or semi-structured text input with clear source attribution
- Database or logging system to track screening history and audit trails
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (18)
Code
Code
Split Out1
Split Out
Basic LLM Chain4
LLM Chain
Ollama Chat Model
Lm Chat Ollama
When clicking ‘Test workflow’
Manual Trigger
Edit Fields
Set
Merge
Merge
Filter
Filter
When Executed by Another Workflow
Execute Workflow Trigger
Aggregate
Aggregate
Merge1
Merge
Basic LLM Chain
LLM Chain
Ollama Model
Lm Ollama
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note