Skip to main content

Overview

Fallacy Detection is an integrated feature that automatically identifies logical fallacies in argument nodes, helping you recognize flawed reasoning patterns and strengthen critical thinking skills.
Every ArgumentNode in your analysis includes a fallacies array that lists any logical fallacies detected in that specific argument.

What Are Logical Fallacies?

Logical fallacies are errors in reasoning that undermine the logic of an argument. They can be:

Formal Fallacies

Errors in the logical structure itself, regardless of content

Informal Fallacies

Errors in reasoning due to the content or context of the argument

Relevance Fallacies

Arguments that rely on irrelevant information

Presumption Fallacies

Arguments that assume unproven premises

How Detection Works

Automatic Analysis

Fallacy detection happens automatically during argument blueprint generation:
1

Argument Extraction

Each claim, counterclaim, and evidence node is identified
2

AI Analysis

The identifyLogicalFallacies flow analyzes the argument text
3

Fallacy Identification

The AI identifies specific fallacies present in the reasoning
4

Integration

Detected fallacies are added to the node’s fallacies array

Fallacy Detection Schema

type ArgumentNode = {
  // ... other fields
  fallacies: string[];  // Array of fallacy names (empty if none)
}
Examples:
// No fallacies detected
fallacies: []

// Single fallacy
fallacies: ["Ad Hominem"]

// Multiple fallacies
fallacies: ["Straw Man", "False Dilemma", "Appeal to Authority"]

The Fallacy Detection Flow

The system uses a specialized AI flow for logical analysis:

Input

type IdentifyLogicalFallaciesInput = {
  argumentText: string;  // The text of the argument to analyze
}

Output

type IdentifyLogicalFallaciesOutput = {
  fallacies: string[];        // Array of fallacy names
  explanation: string;        // Detailed explanation of each fallacy
}

Process

const prompt = ai.definePrompt({
  name: 'identifyLogicalFallaciesPrompt',
  prompt: `You are an expert in logical fallacies. Identify any 
           logical fallacies present in the given argument text 
           and provide a detailed explanation for each fallacy.`
});
The AI is trained to recognize dozens of common fallacies, from ad hominem attacks to slippery slope arguments.

Visual Indicators

Fallacies are prominently displayed throughout the interface:

In Argument Cards

┌──────────────────────────────┐
│ [Type Badge]                 │
│ Argument content here...     │
│                              │
│ ⚠️  Contains logical fallacy │
└──────────────────────────────┘
A red triangle warning icon (⚠️) appears on cards with detected fallacies
Small destructive badge showing fallacy count if multiple are present
Hovering shows a tooltip with fallacy names

In Detail Panel

Clicking an argument card opens the detail panel with full fallacy information:
┌─────────────────────────────────────┐
│ [Argument Details]                  │
├─────────────────────────────────────┤
│ ⚠️  Logical Fallacies               │
│ ┌─────────────────────────────────┐ │
│ │ [Ad Hominem]  [Straw Man]       │ │
│ └─────────────────────────────────┘ │
│                                     │
│ Detailed explanation of why these   │
│ fallacies apply to this argument... │
└─────────────────────────────────────┘
1

Section Header

“Logical Fallacies” section with warning icon
2

Fallacy Badges

Each fallacy displayed as a destructive badge
3

Explanation Text

Detailed explanation of each identified fallacy
4

Context

How the fallacy applies to this specific argument

Common Fallacies Detected

Here are examples of frequently identified fallacies:
Attacking the person making the argument rather than the argument itself.Example: “We shouldn’t trust this climate data because the scientist is politically liberal.”
Misrepresenting someone’s argument to make it easier to attack.Example: “People who support environmental regulations want to destroy all industry and return to the Stone Age.”
Presenting only two options when more exist.Example: “Either we ban all AI development or we accept robots taking over humanity.”
Claiming something is true because an authority figure says so, without evidence.Example: “A celebrity endorses this policy, so it must be good.”
Arguing that one small step will inevitably lead to extreme consequences.Example: “If we allow any gun regulation, soon the government will confiscate all firearms.”
Drawing broad conclusions from limited evidence.Example: “My neighbor’s electric car broke down, so all electric cars are unreliable.”
The conclusion is assumed in the premise.Example: “The Bible is true because it says so in the Bible.”
Introducing irrelevant information to distract from the main argument.Example: “Why worry about climate change when there are still homeless people?”

Fallacy Analysis in Context

Per-Node Detection

Each argument node is analyzed independently:
// Thesis node - rarely has fallacies (it's a proposition)
{
  type: 'thesis',
  content: 'AI should be regulated',
  fallacies: []  // Propositions typically don't contain fallacies
}

// Claim node - analyzed for logical errors
{
  type: 'claim',
  content: 'Everyone agrees AI is dangerous, so regulation is needed',
  fallacies: ['Appeal to Popularity', 'Hasty Generalization']
}

// Evidence node - analyzed for reliability
{
  type: 'evidence',
  content: 'One tech CEO said AI could be risky',
  fallacies: ['Anecdotal Evidence', 'Appeal to Authority']
}
Fallacy detection is most valuable for claim and counterclaim nodes, as these represent the core reasoning in a debate.

Logical Role Context

The logicalRole field helps explain why a fallacy matters:
{
  content: 'Opponents of this policy are just naive idealists',
  fallacies: ['Ad Hominem'],
  logicalRole: 'Attempts to dismiss opposition by attacking character',
  // ⚠️ This combination reveals both WHAT the fallacy is and 
  // HOW it undermines the argument structure
}

Educational Value

Fallacy detection serves multiple learning purposes:

Critical Thinking

Learn to recognize flawed reasoning patterns

Argument Evaluation

Assess the strength of claims based on logical soundness

Rhetoric Awareness

Identify persuasive techniques that bypass logic

Better Reasoning

Avoid fallacies in your own arguments

Teaching Applications

1

Fallacy Library

Build a collection of real-world fallacy examples from analyzed arguments
2

Comparative Analysis

Compare fallacy rates between different sources or viewpoints
3

Debate Training

Practice identifying fallacies in live debates and discussions
4

Writing Improvement

Check your own writing for logical errors before publishing

Limitations & Nuance

Fallacy detection is a guide, not absolute truth. Context matters, and some arguments that seem fallacious may be acceptable in certain contexts.

Important Considerations

Some appeals to authority are valid (e.g., citing a medical study on health topics), while others aren’t (e.g., citing a celebrity on politics).
Everyday reasoning often uses shortcuts that would be fallacies in formal logic but are acceptable in practical discourse.
The AI may occasionally miss fallacies or flag false positives. Always apply your own judgment.
Some “fallacies” are intentional rhetorical devices. A slippery slope argument might be used to illustrate potential risks, not as logical proof.
Use fallacy detection as a starting point for deeper analysis, not as a final verdict on argument quality.

Filtering and Analysis

You can analyze fallacy patterns across your entire argument map:

Find All Fallacious Arguments

const fallacious = blueprint.filter(
  node => node.fallacies.length > 0
);

console.log(`${fallacious.length} arguments contain logical fallacies`);

Compare Sides

const forFallacies = blueprint.filter(
  node => node.side === 'for' && node.fallacies.length > 0
).length;

const againstFallacies = blueprint.filter(
  node => node.side === 'against' && node.fallacies.length > 0
).length;

// Which side relies more on fallacious reasoning?

Most Common Fallacies

const allFallacies = blueprint
  .flatMap(node => node.fallacies)
  .reduce((acc, fallacy) => {
    acc[fallacy] = (acc[fallacy] || 0) + 1;
    return acc;
  }, {});

// Shows frequency distribution of fallacy types

Integration with Other Features

Fallacy detection enhances other analysis features:
FeatureHow Fallacies Enhance It
Visual MappingWarning badges on tree nodes highlight problematic reasoning
Detail PanelClick to see detailed explanations of why reasoning is flawed
Source VerificationCross-reference fallacies with source quality
Social PulseCompare formal fallacies to informal social media rhetoric

Best Practices

Don't Dismiss Automatically

A fallacy doesn’t mean the conclusion is wrong, just that the reasoning is flawed

Investigate Further

Click to see the detailed explanation and understand the context

Compare to Sources

Check if the source material contains the fallacy or if it’s in the AI’s interpretation

Learn Patterns

Study detected fallacies to improve your own reasoning skills
The goal isn’t to “win” by finding fallacies in opposing arguments, but to improve the quality of reasoning on all sides of a debate.

Use Cases

Evaluate the logical soundness of arguments in papers, ensuring research conclusions are well-founded
Identify weaknesses in both your arguments and your opponents’ to strengthen your position
Analyze news articles and opinion pieces for logical fallacies that may indicate bias or poor reasoning
Develop stronger reading comprehension by recognizing rhetorical techniques and logical errors
Check your own arguments before publishing to ensure logical soundness

Future Enhancements

Planned improvements to fallacy detection:
  • Severity Ratings: Indicate how serious each fallacy is in context
  • Suggested Corrections: AI-generated recommendations for fixing fallacious reasoning
  • Fallacy Explanations: Built-in encyclopedia of fallacies with examples
  • Custom Fallacy Training: Teach the AI to recognize domain-specific logical errors

What’s Next?

Explore how fallacy detection integrates with other features:

Argument Analysis

See how fallacies are detected during argument deconstruction

Visual Mapping

View fallacy warnings in interactive visualizations

Social Pulse

Compare formal logical fallacies to informal social media reasoning

Build docs developers (and LLMs) love