Skip to content

Repository files navigation

toulmin-argument

Structured, auditable reasoning primitives for any automated decision.

Most systems emit a bare score or label — 0.82, "high_risk", "approved" — and throw away why. toulmin-argument gives you a tiny, dependency-free data model for carrying the reasoning alongside the result, so every automated decision is explainable and reviewable after the fact.

It implements Stephen Toulmin's model of argument as plain Python dataclasses:

Field Meaning
claim the assertion being made
grounds the evidence supporting it
warrant why the grounds support the claim
qualifier how confident we are (CERTAINDEFEATED)
rebuttal what would defeat the claim
data_availability whether enough data existed at all

The moat

Explainability is usually bolted on after the fact (log scraping, post-hoc rationalization). Here it is a first-class data structure threaded through the decision itself — every output can carry its own argument, and chains of reasoning are auditable step by step. In regulated or high-trust settings (credit, eligibility, moderation, triage, prioritization), a deterministic system whose every decision ships a Toulmin chain is far easier to defend than a black-box score. See docs/MOAT.md.

Install

pip install -e .

Zero runtime dependencies — pure standard library, Python 3.9+.

Quickstart

from toulmin_argument import ToulminArgument, QualifierLevel, DataAvailability

arg = ToulminArgument(
    claim="This account is enterprise-tier",
    grounds="Reported revenue $80M; 600 employees on LinkedIn",
    warrant="Accounts above $50M revenue and 500 employees are enterprise-tier",
    qualifier=QualifierLevel.PROBABLE,
    rebuttal="Headcount may include contractors; revenue is self-reported",
    data_availability=DataAvailability.PARTIAL,
)

print(arg.to_dict())            # JSON-ready dict
ToulminArgument.from_dict(arg.to_dict())  # round-trips

Compose multi-step derivations with InferenceStep + InferenceChain — see examples/minimal/quickstart.py.

What's here

  • toulmin_argument.ToulminArgument — one unit of reasoning
  • toulmin_argument.QualifierLevel, DataAvailability — confidence + data-presence enums
  • toulmin_argument.InferenceStep, InferenceChain — ordered multi-step derivations

Full reference: docs/API.md. How to extend it for your domain: docs/FORKING.md.

License

MIT — see LICENSE.


About Powerweave Skunkworks

Powerweave Skunkworks is the AI R&D division of Powerweave Software Services — a rapid-innovation lab that turns real-world product feedback into working, reusable, open-source building blocks. Working in parallel to the main engineering backlog, a lean, cross-functional team of product and technology specialists (UX, data, software engineering, and AI) fast-tracks high-priority ideas into validated modules ready for full-scale build-out.

toulmin-argument is one such building block — a de-domained, MIT-licensed, dependency-light component extracted from Powerweave's internal R&D and engineered to be forked into any SaaS or enterprise product.

About Powerweave

Powerweave Software Services Pvt. Ltd. is a digital-transformation company founded in 2001 and headquartered in Mumbai, India. With 25+ years of experience, 1,700+ professionals, and 350+ global customers, Powerweave builds platforms, processes, and teams across enterprise eCommerce, AI-powered procurement, Microsoft Dynamics ERP, business services, and sustainability — with a strong focus on cutting-edge AI automation that streamlines workflows, reduces manual errors, and accelerates decision-making. Powerweave is ISO 27001:2013 certified.

Explore Powerweave

Maintainers — Powerweave Skunkworks


Keywords: toulmin · explainability · reasoning · audit · argumentation · xai · Powerweave · Powerweave Skunkworks · AI R&D · open source · MIT · Python · forkable.

About

Dependency-free Toulmin argumentation primitives for attaching structured, auditable reasoning to any automated decision.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages