Skip to content

CLI Reference

Complete reference for all Aletheia CLI commands.

Global Options

aletheia [OPTIONS] COMMAND [ARGS]...

List Commands

list-use-cases

List all available use cases.

aletheia list-use-cases

Output:

Available use cases:
  - anticorruption
  - terrorist_orgs
  - aviation_safety
  - safety_recommendations
  - airworthiness_directives
  - operation_tango
  - evaluation

list-graphs

List all knowledge graphs in the database.

aletheia list-graphs

Output:

Knowledge graphs:
  - terrorist_orgs (1,234 nodes, 5,678 edges)
  - my_graph (456 nodes, 789 edges)

Build Commands

build-ontology-graph

Load an ontology into the graph database.

aletheia build-ontology-graph \
  --use-case <name> \
  --knowledge-graph <graph_name>

Options:

Option Required Description
--use-case Yes Use case name
--knowledge-graph Yes Target graph name

Example:

aletheia build-ontology-graph \
  --use-case terrorist_orgs \
  --knowledge-graph terrorist_orgs_ontology

build-knowledge-graph

Build a knowledge graph from source data.

aletheia build-knowledge-graph \
  --use-case <name> \
  --knowledge-graph <graph_name> \
  --schema-mode <mode> \
  [OPTIONS]

Options:

Option Required Default Description
--use-case Yes - Use case name
--knowledge-graph Yes - Target graph name
--schema-mode Yes - Schema mode: none, llm, inference, ontology, hybrid, graph-hybrid, ontology-first
--ontology-graph No - Ontology graph for graph-hybrid mode
--build-communities No False Build community clusters after ingestion
--reset No False Clear existing graph before building
--resume No False Resume interrupted build

Example:

aletheia build-knowledge-graph \
  --use-case terrorist_orgs \
  --knowledge-graph terrorist_orgs \
  --schema-mode graph-hybrid \
  --ontology-graph terrorist_orgs_ontology \
  --build-communities

Evaluation Commands

evaluate-ragas

Run RAGAS evaluation on a knowledge graph.

aletheia evaluate-ragas \
  --knowledge-graph <graph_name> \
  --questions <path> \
  [OPTIONS]

Options:

Option Required Default Description
--knowledge-graph Yes - Graph to evaluate
--questions Yes - Path to questions JSON
--output-dir No output/ Output directory
--compare-baseline No False Compare BFS+cosine vs cosine-only
--use-community-search No False Include community context
--use-query-filters No False Enable query-based filters
--grounding-mode No strict Grounding mode (strict, lenient, off)
--limit No - Limit number of questions
--verbose No False Verbose output

Example:

aletheia evaluate-ragas \
  --knowledge-graph terrorist_orgs \
  --questions use_cases/terrorist_orgs/evaluation_questions.json \
  --output-dir output/ \
  --grounding-mode strict \
  --use-query-filters \
  --verbose

Utility Commands

show-graph

Display graph statistics and sample data.

aletheia show-graph --knowledge-graph <graph_name>

show-errors

Display ingestion errors for a graph.

aletheia show-errors --knowledge-graph <graph_name>

Exit Codes

Code Meaning
0 Success
1 General error
2 Invalid arguments

Learn More