Skip to main content

Detect hallucinations using specialised Ollama model bespoke-minicheck

Workflow preview

Workflow preview
100%
Detect hallucinations using specialised Ollama model bespoke-minicheck preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Fact Checking Workflow Documentation Overview This workflow is designed for automated fact checking of texts. It uses AI models to compare a given text with a list of facts and identify potential d...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.code, n8n-nodes-base.splitout, @n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.lmchatollama, n8n-nodes-base.manualtrigger, n8n-nodes-base.set, n8n-nodes-base.merge, n8n-nodes-base.filter

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Guido Zockoll.

Original n8n.io source

1.1 Workflow description

Title
Detect hallucinations using specialised Ollama model bespoke-minicheck
Workflow name
Detect hallucinations using specialised Ollama model bespoke-minicheck

Fact-Checking Workflow Documentation

Overview

This workflow is designed for automated fact-checking of texts. It uses AI models to compare a given text with a list of facts and identify potential discrepancies or hallucinations.

Components

1. Input

  • The workflow can be initiated in two ways: a) Manually via the "When clicking 'Test workflow'" trigger b) By calling from another workflow via the "When Executed by Another Workflow" trigger
  • Required inputs:
    • facts: A list of verified facts
    • text: The text to be checked

2. Text Preparation

  • The "Code" node splits the input text into individual sentences
  • Takes into account date specifications and list elements

3. Fact Checking

  • Each sentence is individually compared with the given facts
  • Uses the "bespoke-minicheck" Ollama model for verification
  • The model responds with "Yes" or "No" for each sentence

4. Filtering and Aggregation

  • Sentences marked as "No" (not fact-based) are filtered
  • The filtered results are aggregated

5. Summary

  • A larger language model (Qwen2.5) creates a summary of the results
  • The summary contains:
    • Number of incorrect factual statements
    • List of incorrect statements
    • Final assessment of the article's accuracy

Usage

  1. Ensure the "bespoke-minicheck" model is installed in Ollama (ollama pull bespoke-minicheck)
  2. Prepare a list of verified facts
  3. Enter the text to be checked
  4. Start the workflow
  5. The results are output as a structured summary

Notes

  • The workflow ignores small talk and focuses on verifiable factual statements
  • Accuracy depends on the quality of the provided facts and the performance of the AI models

Customization Options

  • The summarization function can be adjusted or removed to return only the raw data of the issues found
  • The AI models used can be exchanged if needed

This workflow provides an efficient method for automated fact-checking and can be easily integrated into larger systems or editorial workflows.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 2 - Split Out1

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 3 - Basic LLM Chain4

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.5

Block 4 - Ollama Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOllama - lmChatOllama
Config choices
Version 1

Block 5 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 6 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 8 - Filter

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 9 - When Executed by Another Workflow

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 10 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 11 - Merge1

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 12 - Basic LLM Chain

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.5

Block 13 - Ollama Model

Type / Role
@n8n/n8n-nodes-langchain.lmOllama - lmOllama
Config choices
Version 1

Block 14 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Detect hallucinations using specialised Ollama model bespoke-minicheck
Complexity advanced
Nodes 18
Categories Document Extraction, AI Summarization
Author Guido Zockoll
Published 17 Feb 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2922/2922.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Detect hallucinations using specialised Ollama model bespoke-minicheck do?

Fact Checking Workflow Documentation Overview This workflow is designed for automated fact checking of texts. It uses AI models to compare a given text with a list of facts and identify potential d...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.