The Third Answer — evaluate AI uncertainty with T,I,F (Truth, Indeterminacy, Falsity)
Project description
thirdanswer
The Third Answer — evaluate AI uncertainty with T,I,F (Truth, Indeterminacy, Falsity).
Based on the book "The Third Answer: Why AI Doesn't Know What It Doesn't Know — And How Ancient Logic Can Fix It" by Leyva-Vazquez & Smarandache (2026).
Install
pip install thirdanswer
For LLM analysis (free via Groq):
pip install thirdanswer[groq]
Quick Start
Without LLM (pure logic)
from thirdanswer import Compass
# Create a reading
c = Compass(T=0.7, I=0.4, F=0.5)
print(c.zone) # "contradiction"
print(c.zone_emoji) # "🟠"
print(c.confidence) # 0.0
print(c.is_paraconsistent) # True (T+F=1.2 > 1)
print(c.should_abstain) # False
print(c.zone_action) # "Investigate both sides..."
Analyze any text (with Groq, free)
from thirdanswer import analyze
r = analyze(
"Coffee is definitively good for your health",
provider="groq",
api_key="gsk_..." # Free at console.groq.com
)
print(r) # Analysis(T=0.55, I=0.30, F=0.45) → 🟠 Contradiction
print(r.zone) # "contradiction"
print(r.errors) # ["confident_ignorance"] if detected
print(r.honest) # Rewritten version with uncertainty
# Claim-by-claim
for claim in r.claims:
print(f"{claim.zone_emoji} {claim.text[:50]} T={claim.T}")
Ask honest questions
from thirdanswer import ask
r = ask("Is intermittent fasting healthy?", provider="groq", api_key="gsk_...")
print(r.answer)
print(r.what_i_dont_know) # "Long-term effects beyond 2 years..."
print(r.zone) # "contradiction"
Compare two AI responses
from thirdanswer import compare
diff = compare(chatgpt_response, claude_response, provider="groq", api_key="gsk_...")
print(f"Agreement: {diff.agreement:.0%}")
print(f"Conflicts: {diff.conflicts}")
print(f"More honest: {diff.more_honest}")
Decompose text into claims
from thirdanswer import decompose
claims = decompose("Long AI response...", provider="groq", api_key="gsk_...")
for c in claims:
print(f"{c.zone_emoji} T={c.T} I={c.I} F={c.F} | {c.text}")
The Four Zones
| Zone | Condition | Action |
|---|---|---|
| 🟢 Consensus | T high, I low, F low | Trust |
| 🟡 Ambiguity | I high | Investigate |
| 🟠 Contradiction | T high AND F high | Explore both sides |
| ⚫ Ignorance | All low or I overwhelming | Stop |
Providers
| Provider | Cost | API Key | Install |
|---|---|---|---|
| Groq | Free (~30 req/min) | console.groq.com | pip install thirdanswer[groq] |
| Ollama | Free (local) | None | ollama.com |
Compass works without any provider — pure logic, no API calls.
Links
- The Third Answer App
- Prompt Templates
- Book (coming soon)
- ORCID: M. Leyva-Vazquez
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thirdanswer-0.1.0.tar.gz.
File metadata
- Download URL: thirdanswer-0.1.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
743e64de860d8032e694f968f74176280d3a2d386143fad032a8f64000f3a8f9
|
|
| MD5 |
e32f95e0888fbe6272cb158cb9acd809
|
|
| BLAKE2b-256 |
b15fbd2c1a72ecc0b28eb061f255e76a06f8bb5a48b4abad335e920ebddd3e31
|
File details
Details for the file thirdanswer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: thirdanswer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
195b7362d5f21f718271ec88e40c3b055e5e56eb6f27d8fb046291f6cde873cf
|
|
| MD5 |
68aca122c9f3329dfb78af91ac7b5dca
|
|
| BLAKE2b-256 |
6a67839045a452f1a73ee7058064a1b19ed5e71bd5017da406a549c2c28094f9
|