Skip to content

AI4SS/Logic-Agent

Repository files navigation

LogicAgent: From Ambiguity to Verdict

arXiv License: MIT

Official implementation of the paper: "From Ambiguity to Verdict: A Semiotic-Grounded Multi-Perspective Agent for LLM Logical Reasoning".


🌟 Overview

LogicAgent is a semiotic-square-guided framework designed to address the dual challenges of logical complexity and semantic complexity in LLM reasoning.

Traditional logical reasoning systems often struggle with abstract propositions and ambiguous contexts. LogicAgent addresses this by:

  1. Multi-Perspective Semantic Analysis: Leveraging the Greimas Semiotic Square to map out logical relations.
  2. Reflective Verification Pipeline: Integrating automated deduction with structural verification to manage deeper reasoning chains.

📈 Highlights

LogicAgent achieves State-of-the-Art (SOTA) performance on logical reasoning benchmarks:

  • RepublicQA: +6.25% improvement over baseline on our new benchmark coupling high semantic difficulty with logical depth
  • Mainstream Benchmarks: +7.05% improvement on ProntoQA, ProofWriter, FOLIO, and ProverQA

🏗️ Framework & Theory

1. LogicAgent Pipeline

The agent operates through a multi-perspective structured reasoning process, ensuring that every verdict is grounded in both semantic clarity and logical consistency.

LogicAgent Overview

2. Theoretic Foundation: Greimas Semiotic Square

LogicAgent utilizes the Greimas Square to navigate the semantic space of propositions, transforming linguistic ambiguity into a clear logical lattice.

Greimas Semiotic Square


🚀 Getting Started

1. Preparation

  • Installation:
    git clone https://github.com/AI4SS/Logic-Agent.git
    cd LogicAgent
    poetry install
  • Configuration: LogicAgent is built on MetaGPT. Please follow the official MetaGPT configuration guide to set up your LLM (OpenAI, Ollama, etc.).

2. Run

  1. Configure your target dataset in utils/global_vars.py:
    DATASET_NAME = "RepublicQA" # Options: ProntoQA, ProofWriter, FOLIO, RepublicQA, ProverQA
  2. Execute the reasoning agent:
    poetry run python3 main.py

3. Evaluation

Analyze the complexity and semantic diversity of the datasets or results:

poetry run python3 analyze/analyze.py

📂 Project Structure

.
├── actions/      # Core implementation of the multi-perspective reasoning steps
├── analyze/      # Analysis scripts for evaluating results and dataset complexity
├── data/         # Logic benchmarks including RepublicQA
├── prompts/      # Prompt templates for different reasoning stages
└── main.py       # Main experiment execution script

📊 Dataset: RepublicQA

RepublicQA is a benchmark grounded in classical philosophical concepts, annotated through multi-stage human review. RepublicQA captures semantic complexity through abstract content and systematically organized contrary relations, achieving college-level reading difficulty (FKGL = 11.94) while maintaining rigorous logical reasoning.

  • Location: data/RepublicQA/all.json
  • Size: 600 entries

📝 Citation

If you find our work or code useful, please cite:

@article{zhang2025ambiguity,
  title={From Ambiguity to Verdict: A Semiotic-Grounded Multi-Perspective Agent for LLM Logical Reasoning},
  author={Zhang, Yunyao and Zhang, Xinglang and Sheng, Junxi and Li, Wenbing and Yu, Junqing and Yang, Wei and Song, Zikai},
  journal={arXiv preprint arXiv:2509.24765},
  year={2025}
}

"From Ambiguity to Verdict — Unfolding the logic within language."

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages