# joaosegurilho/scientific-claim-verifier architecture

> Architecture diagram of the GitHub repository joaosegurilho/scientific-claim-verifier, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/joaosegurilho/scientific-claim-verifier
- Repository: https://github.com/joaosegurilho/scientific-claim-verifier

## Overview

SciVerifier turns scientific claims into evidence-based verdicts by finding papers, extracting propositions, retrieving relevant evidence, and interpreting support or contradiction. Its other user-facing paths ingest local documents, verify claim batches, expose knowledge-base browsing and agent verification through a web app, and run benchmark datasets. The graph shows the documented CLI and sampled pipeline ownership; several component internals and web routes were not sampled, so uncertain wiring is omitted.

Main entry points: [`scverifier/pipelines/verification_pipeline.py`](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/pipelines/verification_pipeline.py) (Verification pipeline), [`scverifier/cli.py`](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/cli.py) (CLI), [`scverifier/pipelines/extraction_pipeline.py`](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/pipelines/extraction_pipeline.py) (Extraction pipeline), [`scverifier/webapp/main.py`](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/webapp/main.py) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_cli["CLI<br/>[cli.py]"]
  node_webapp["Web application<br/>[main.py]"]
  node_bulk["Bulk verifier<br/>[bulk_verifier.py]"]
end

subgraph group_evidence["Evidence acquisition"]
  node_literature["Literature search"]
  node_paper_apis["Paper APIs<br/>[api.py]"]
  node_extract_pipeline["Extraction pipeline"]
  node_file_loader["Document loader<br/>[file_loader.py]"]
  node_local_processor["Paper processor"]
  node_extractor["Proposition extractor"]
end

subgraph group_verify["Verification and retrieval"]
  node_verify_pipeline["Verification pipeline"]
  node_retrieval["Proposition retrieval"]
  node_reranker["Evidence reranker<br/>[reranker.py]"]
  node_claim_verifier["Claim verifier<br/>[claim_verifier.py]"]
  node_confidence["Confidence interpreter"]
  node_agent["Autonomous agent"]
  node_result["Verdict and evidence"]
end

subgraph group_state["Knowledge base"]
  node_kb["Knowledge base<br/>[knowledge_base.py]"]
  node_database[("Paper database<br/>[database.py]")]
end

subgraph group_products["Additional capabilities"]
  node_benchmark["Benchmark pipeline"]
  node_benchmark_runner["Benchmark runner<br/>[run_benchmark.py]"]
  node_timeline["Timeline visualization"]
end

node_user(("User"))
node_external_papers{{"Literature services"}}

node_user -->|"invokes"| node_cli
node_user -->|"uses"| node_webapp
node_cli -->|"starts verification"| node_verify_pipeline
node_cli -->|"starts extraction"| node_extract_pipeline
node_cli -->|"starts batch verification"| node_bulk
node_cli -->|"starts benchmark"| node_benchmark
node_verify_pipeline -->|"searches papers"| node_literature
node_literature -->|"queries"| node_paper_apis
node_paper_apis -->|"requests papers"| node_external_papers
node_verify_pipeline -->|"extracts propositions"| node_extractor
node_verify_pipeline -->|"loads and updates"| node_kb
node_verify_pipeline -->|"retrieves evidence"| node_retrieval
node_verify_pipeline -->|"ranks evidence"| node_reranker
node_verify_pipeline -->|"evaluates claim"| node_claim_verifier
node_claim_verifier -->|"interprets confidence"| node_confidence
node_verify_pipeline -->|"returns verdict"| node_result
node_extract_pipeline -->|"loads documents"| node_file_loader
node_extract_pipeline -->|"builds paper"| node_local_processor
node_extract_pipeline -->|"adds and saves paper"| node_kb
node_file_loader -->|"returns document text"| node_extract_pipeline
node_webapp -->|"browses papers"| node_kb
node_webapp -->|"streams agent verification"| node_agent
node_agent -->|"produces verdict"| node_result
node_kb -->|"stores paper records"| node_database
node_benchmark -->|"runs datasets"| node_benchmark_runner
node_benchmark_runner -->|"uses verification methods"| node_verify_pipeline
node_webapp -->|"generates timelines"| node_timeline

click node_cli "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/cli.py"
click node_webapp "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/webapp/main.py"
click node_bulk "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/bulk_verifier.py"
click node_verify_pipeline "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/pipelines/verification_pipeline.py"
click node_literature "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/knowledge/literature_search.py"
click node_paper_apis "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/api/api.py"
click node_extract_pipeline "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/pipelines/extraction_pipeline.py"
click node_file_loader "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/data/file_loader.py"
click node_local_processor "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/data/local_paper_processor.py"
click node_extractor "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/extraction/proposition_extractor.py"
click node_retrieval "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/retrieval/retrieval_system.py"
click node_reranker "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/retrieval/reranker.py"
click node_claim_verifier "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/verification/claim_verifier.py"
click node_confidence "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/verification/confidence_interpreter.py"
click node_agent "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/agents/autonomous_agent.py"
click node_kb "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/knowledge/knowledge_base.py"
click node_database "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/data/database.py"
click node_benchmark "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/pipelines/benchmark_pipeline.py"
click node_benchmark_runner "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/benchmarking/run_benchmark.py"
click node_timeline "https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/visualization/timeline_generator.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_webapp,node_bulk,node_user toneBlue
class node_literature,node_paper_apis,node_extract_pipeline,node_file_loader,node_local_processor,node_extractor toneAmber
class node_verify_pipeline,node_retrieval,node_reranker,node_claim_verifier,node_confidence,node_agent,node_result toneMint
class node_kb,node_database toneRose
class node_benchmark,node_benchmark_runner,node_timeline,node_external_papers toneIndigo
```

## Components

### User entry points

- [CLI](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/cli.py): `scverifier/cli.py`
- [Web application](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/webapp/main.py): `scverifier/webapp/main.py`
- [Bulk verifier](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/bulk_verifier.py): `scverifier/core/bulk_verifier.py`

### Evidence acquisition

- [Literature search](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/knowledge/literature_search.py): `scverifier/core/knowledge/literature_search.py`
- [Paper APIs](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/api/api.py): `scverifier/api/api.py`
- [Extraction pipeline](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/pipelines/extraction_pipeline.py): `scverifier/pipelines/extraction_pipeline.py`
- [Document loader](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/data/file_loader.py): `scverifier/data/file_loader.py`
- [Paper processor](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/data/local_paper_processor.py): `scverifier/data/local_paper_processor.py`
- [Proposition extractor](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/extraction/proposition_extractor.py): `scverifier/core/extraction/proposition_extractor.py`

### Verification and retrieval

- [Verification pipeline](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/pipelines/verification_pipeline.py): `scverifier/pipelines/verification_pipeline.py`
- [Proposition retrieval](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/retrieval/retrieval_system.py): `scverifier/core/retrieval/retrieval_system.py`
- [Evidence reranker](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/retrieval/reranker.py): `scverifier/core/retrieval/reranker.py`
- [Claim verifier](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/verification/claim_verifier.py): `scverifier/core/verification/claim_verifier.py`
- [Confidence interpreter](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/verification/confidence_interpreter.py): `scverifier/core/verification/confidence_interpreter.py`
- [Autonomous agent](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/agents/autonomous_agent.py): `scverifier/core/agents/autonomous_agent.py`
- **Verdict and evidence**

### Knowledge base

- [Knowledge base](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/knowledge/knowledge_base.py): `scverifier/core/knowledge/knowledge_base.py`
- [Paper database](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/data/database.py): `scverifier/data/database.py`

### Additional capabilities

- [Benchmark pipeline](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/pipelines/benchmark_pipeline.py): `scverifier/pipelines/benchmark_pipeline.py`
- [Benchmark runner](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/benchmarking/run_benchmark.py): `scverifier/core/benchmarking/run_benchmark.py`
- [Timeline visualization](https://github.com/joaosegurilho/scientific-claim-verifier/blob/main/scverifier/core/visualization/timeline_generator.py): `scverifier/core/visualization/timeline_generator.py`

### Other components

- **User**
- **Literature services**

## Connections

- User → CLI: invokes
- User → Web application: uses
- CLI → Verification pipeline: starts verification
- CLI → Extraction pipeline: starts extraction
- CLI → Bulk verifier: starts batch verification
- CLI → Benchmark pipeline: starts benchmark
- Verification pipeline → Literature search: searches papers
- Literature search → Paper APIs: queries
- Paper APIs → Literature services: requests papers
- Verification pipeline → Proposition extractor: extracts propositions
- Verification pipeline → Knowledge base: loads and updates
- Verification pipeline → Proposition retrieval: retrieves evidence
- Verification pipeline → Evidence reranker: ranks evidence
- Verification pipeline → Claim verifier: evaluates claim
- Claim verifier → Confidence interpreter: interprets confidence
- Verification pipeline → Verdict and evidence: returns verdict
- Extraction pipeline → Document loader: loads documents
- Extraction pipeline → Paper processor: builds paper
- Extraction pipeline → Knowledge base: adds and saves paper
- Document loader → Extraction pipeline: returns document text
- Web application → Knowledge base: browses papers
- Web application → Autonomous agent: streams agent verification
- Autonomous agent → Verdict and evidence: produces verdict
- Knowledge base → Paper database: stores paper records
- Benchmark pipeline → Benchmark runner: runs datasets
- Benchmark runner → Verification pipeline: uses verification methods
- Web application → Timeline visualization: generates timelines
