Overview
TheexplainLogicalFallacy flow provides clear, educational explanations of specific logical fallacies. It’s designed to help users understand what a fallacy is and how it manifests in arguments.
Function Signature
Input Schema
The name of the logical fallacy to explain.
Input Type
Zod Schema
Output Schema
A detailed explanation of the logical fallacy, including a definition and simple example.
Output Type
Zod Schema
Usage Example
Example with Straw Man Fallacy
Example with Slippery Slope
Example with Appeal to Authority
AI Flow Process
The flow executes the following steps:- Receives Fallacy Name: Accepts the name of a logical fallacy as input
- AI Explanation: Sends the fallacy name to the AI with instructions to explain
- Generate Definition: AI creates a clear definition of the fallacy
- Provide Example: AI includes a simple, relatable example
- Returns Explanation: Returns the complete explanation
Prompt Template
Supported Fallacy Types
The flow can explain any logical fallacy, including:Informal Fallacies
- Ad Hominem - Attacking the person instead of the argument
- Straw Man - Misrepresenting an opponent’s position
- Appeal to Authority - Relying solely on authority figures
- Appeal to Emotion - Using emotions instead of logic
- Appeal to Tradition - Arguing something is right because it’s traditional
- Bandwagon Fallacy - Arguing something is true because it’s popular
- Red Herring - Introducing irrelevant information
- Tu Quoque - Deflecting by pointing out hypocrisy
- Hasty Generalization - Drawing broad conclusions from limited data
- False Dilemma - Presenting only two options when more exist
- Slippery Slope - Claiming one action leads to extreme consequences
Formal Fallacies
- Affirming the Consequent - Incorrect conditional reasoning
- Denying the Antecedent - Invalid negation of conditionals
- Circular Reasoning - Using the conclusion as a premise
Causal Fallacies
- Post Hoc Ergo Propter Hoc - Assuming causation from sequence
- Correlation vs Causation - Confusing correlation with causation
And many more fallacies from classical and modern logic
Explanation Format
Each explanation typically includes:- Definition: What the fallacy is and why it’s problematic
- Mechanism: How the fallacy undermines logical reasoning
- Example: A simple, clear example demonstrating the fallacy
- Context: When this fallacy commonly appears
- Avoidance: How to avoid committing this fallacy
Use Cases
Educational Tool
Glossary Generation
Interactive Help System
Error Handling
The flow uses Genkit’s AI flow error handling. Potential errors include:Invalid Fallacy Name
If an unrecognized fallacy name is provided, the AI will attempt to provide the best possible explanation or clarify that the fallacy is not recognized.Empty Input
If an empty string is provided:AI Generation Error
If the AI model fails to generate a response, Genkit will throw an error that should be caught by the calling code.Integration with Other Flows
This flow complements theidentifyLogicalFallacies flow:
Notes
- The AI provides educational, neutral explanations
- Explanations are designed to be accessible to users with varying levels of logical training
- Examples are kept simple and relatable
- The flow can handle both formal fallacy names (e.g., “Ad Hominem”) and informal descriptions (e.g., “attacking the person”)
- Response times are typically fast (1-3 seconds) as the task is straightforward