Skip to main content

Overview

The identifyLogicalFallacies flow analyzes a piece of argument text to identify any logical fallacies present and provides detailed explanations for each detected fallacy. This flow is used as a standalone tool for fallacy analysis and can be applied to any argument text.

Function Signature

Source: src/ai/flows/identify-logical-fallacies.ts:30

Input Schema

string
required
The text of the argument to analyze for logical fallacies.

Input Type

Output Schema

string[]
required
An array of logical fallacies identified in the argument.
string
required
A detailed explanation of each identified logical fallacy.

Output Type

Example Usage

Common Fallacy Types Detected

The AI is trained to identify various logical fallacies including:
  • Ad Hominem: Attacking the person instead of the argument
  • Straw Man: Misrepresenting an opponent’s position
  • False Dichotomy: Presenting only two options when more exist
  • Appeal to Authority: Using authority as the sole basis for truth
  • Slippery Slope: Claiming one action will lead to extreme consequences
  • Circular Reasoning: Using the conclusion as a premise
  • Hasty Generalization: Drawing conclusions from insufficient evidence
  • Red Herring: Introducing irrelevant information to distract
  • And many more…

Implementation Details

The flow uses a specialized AI prompt that:
  1. Analyzes the argument text for logical errors
  2. Identifies specific fallacy types present
  3. Explains why each instance constitutes a fallacy
  4. Returns structured output with fallacy names and explanations
Prompt Template (from src/ai/flows/identify-logical-fallacies.ts:40):