CLARITY turns your argument into a formal graph, proves contradictions with a SAT solver, and surfaces fallacies, ambiguities, and tensions. Gemini handles all language understanding and explanation; Python engines (SAT + graph algorithms) handle formal verification. Voice mode adds Gemini Live for instant spoken feedback and for “Ask CLARITY” read-aloud.
You type → the app calls the backend /analyze/stream (SSE). Events stream back: propositions first, then contradictions, fallacies, ambiguities, and the reconstructed argument. The graph and sidebar update in real time.
You speak; mic audio goes to the backend over WebSocket. Gemini Live returns a short spoken acknowledgment. When you stop, the full transcript runs through the same SSE analysis pipeline as text.
We use two Gemini products: Generate Content (text/JSON) for understanding and explaining, and Gemini Live (audio) for voice.
Powers nine steps: (1) Proposition parser — raw text → propositions, relationships, formal logic. (2) Semantic implications — implicit contradictions for SAT. (3) Semantic contradictions fallback. (4) Validity checker. (5) Ambiguity detector. (6) Tension detector. (7) Temporal tracker. (8) Argument reconstructor. (9) Pre-generated explanation for “Ask CLARITY.”
Voice acknowledgment — mic → Live returns “I heard you…” while analysis runs on SSE. Ask CLARITY — cached explanation text → Live read-aloud → PCM audio, accumulate-then-play for natural speech.
Gemini extracts propositions (premises, conclusions, assumptions, evidence, constraints, risks) and relationships (supports, contradicts, assumes, concludes_from). Each proposition gets a formal expression (e.g. P → Q, ¬R). The rest of the pipeline runs on this structure.
Propositions and relationships are converted to CNF. Glucose3 SAT solver: if UNSAT, contradiction is proven (minimal core + formal proof). NetworkX detects circular reasoning, hasty generalization, false dilemma, load-bearing assumptions. Gemini validity checker: argument form and formal fallacies.
Gemini finds ambiguous terms, practical tensions, and temporal drift. It reconstructs a coherent argument and presentable summary. App pre-generates spoken-style explanation and caches it for “Ask CLARITY” (Gemini Live read-aloud).
Gemini tension detector: practical tensions and probing questions.
Gemini: ambiguous terms and clarification questions; parser and graph: implicit and load-bearing assumptions.
CNF + Glucose3: formal proof and minimal core. NetworkX: circular reasoning and structural fallacies.
Gemini argument reconstructor: presentable argument and summary in insights.