Official implementation of the paper: "From Ambiguity to Verdict: A Semiotic-Grounded Multi-Perspective Agent for LLM Logical Reasoning".
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:
- Multi-Perspective Semantic Analysis: Leveraging the Greimas Semiotic Square to map out logical relations.
- Reflective Verification Pipeline: Integrating automated deduction with structural verification to manage deeper reasoning chains.
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
The agent operates through a multi-perspective structured reasoning process, ensuring that every verdict is grounded in both semantic clarity and logical consistency.
LogicAgent utilizes the Greimas Square to navigate the semantic space of propositions, transforming linguistic ambiguity into a clear logical lattice.
- 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.).
- Configure your target dataset in
utils/global_vars.py:DATASET_NAME = "RepublicQA" # Options: ProntoQA, ProofWriter, FOLIO, RepublicQA, ProverQA
- Execute the reasoning agent:
poetry run python3 main.py
Analyze the complexity and semantic diversity of the datasets or results:
poetry run python3 analyze/analyze.py.
├── 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
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
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."

