Skip to content

Quickstart

Build your first knowledge graph and run an evaluation in minutes.

For best results with FTM data, first load the ontology:

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

2. Build the Knowledge Graph

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

This will:

  1. Parse the source data using the use case's parser
  2. Convert entities to markdown episodes
  3. Extract entities and relationships using Graphiti
  4. Store everything in your graph database

Resume Interrupted Builds

If the build is interrupted, use --resume to continue from where it left off:

aletheia build-knowledge-graph ... --resume

3. Run an Evaluation

aletheia evaluate-ragas \
  --knowledge-graph terrorist_orgs \
  --questions use_cases/terrorist_orgs/evaluation_questions.json \
  --output-dir output/

Add --grounding-mode strict (the default) to verify that answers are grounded in evidence, or --use-community-search to include hierarchical community context.

This will:

  1. Search the graph for each question
  2. Generate answers from retrieved context
  3. Verify grounding (in strict/lenient mode)
  4. Calculate RAGAS metrics (precision, recall, faithfulness, similarity)
  5. Output results to JSON and Markdown files

4. Review Results

Check the output directory for:

  • ragas_YYYYMMDD_HHMMSS.json - Detailed results
  • ragas_YYYYMMDD_HHMMSS.md - Human-readable summary

Key metrics to look for:

Metric Good Score What It Measures
Context Precision > 0.7 Relevance ranking of retrieved context
Context Recall > 0.7 Coverage of required information
Faithfulness > 0.7 Answer grounded in context
Answer Similarity > 0.7 Semantic match to gold answer

Next Steps