How kimseongmin0301/pierrot works
PIERROT verifies AI-written financial answers by extracting claims, restoring missing company/time context, routing claims to domain-specific checks, and annotating the original answer with verdicts and reasons. Numeric and price claims are compared with stored financial and market snapshots; narrative claims use evidence retrieval and meaning comparison. The README also documents segment and disclosure-based capabilities. Several of those implementations were not excerpted, so their internal call paths are not expanded here; relationships shown for them rely on documented workflow or indexed references.
Main entry points: nodes.py Verification steps · service.py Verification service · narrative_verify.py Narrative verification · llm.py LLM client
Components 21
Claim preparation
- Claim extraction
src/pierrot/extractor/extractor.py - Context restoration
src/pierrot/extractor/decontextualize.py - Extraction quality checks
src/pierrot/extractor/quality.py
Verification orchestration
- Verifier graph
src/pierrot/verifier/graph.py - Claim routing
src/pierrot/verifier/routing.py - Verification state
src/pierrot/verifier/state.py - Verification steps
src/pierrot/verifier/nodes.py
Claim checks
- Financial claim parsing
src/pierrot/tools/numeric_claim.py - Financial comparison
src/pierrot/tools/numeric_verify.py - Price claim parsing
src/pierrot/tools/price_claim.py - Price comparison
src/pierrot/tools/price_verify.py - Narrative verification
src/pierrot/tools/narrative_verify.py - Segment checks
src/pierrot/tools
Evidence and data
- Financial snapshots
src/pierrot/tools/financials.py - Market snapshots
src/pierrot/tools/price.py - DART disclosures
src/pierrot/tools/dart_documents.py - LLM client
src/pierrot/llm.py
Results and interface
- HTTP API
src/pierrot/api/app.py - Verification service
src/pierrot/api/service.py - Answer annotation
src/pierrot/reporter/report.py
Other components
- Answer author
Connections 26
- Answer author → HTTP API: submits answer
- HTTP API → Verification service: dispatches
src/pierrot/api/app.py - Verification service → Claim extraction: extracts claims
src/pierrot/api/service.py - Verification service → Context restoration: restores context
src/pierrot/api/service.py - Claim extraction → LLM client: uses model
src/pierrot/extractor/extractor.py - Context restoration → LLM client: uses model
src/pierrot/extractor/decontextualize.py - Claim extraction → Extraction quality checks: checks output
src/pierrot/extractor/extractor.py - Verification service → Verifier graph: builds graph
src/pierrot/api/service.py - Verifier graph → Verification steps: runs steps
src/pierrot/verifier/nodes.py - Verification steps → Claim routing: routes claims
src/pierrot/verifier/nodes.py - Verification steps → Verification state: updates state
src/pierrot/verifier/nodes.py - Verification steps → Financial claim parsing: parses financials
src/pierrot/verifier/nodes.py - Verification steps → Financial comparison: checks financials
src/pierrot/verifier/nodes.py - Verification steps → Price claim parsing: parses prices
src/pierrot/verifier/nodes.py - Verification steps → Price comparison: checks prices
src/pierrot/verifier/nodes.py - Verification steps → Narrative verification: checks narratives
src/pierrot/verifier/nodes.py - Verification steps → Segment checks: checks segments
src/pierrot/verifier/nodes.py - Financial comparison → Financial snapshots: reads snapshot
src/pierrot/tools/financials.py - Price comparison → Market snapshots: reads snapshot
src/pierrot/tools/price_verify.py - Narrative verification → Financial snapshots: uses financials
src/pierrot/tools/narrative_verify.py - Narrative verification → Market snapshots: uses prices
src/pierrot/tools/narrative_verify.py - Verification service → Answer annotation: formats results
src/pierrot/api/service.py - Answer annotation → Answer author: returns annotation
- Financial claim parsing → LLM client: parses claim
src/pierrot/tools/numeric_claim.py - Price claim parsing → LLM client: parses claim
src/pierrot/tools/price_claim.py - Narrative verification → DART disclosures: uses disclosures