Skip to content

Implement auto-ontology generation #75

@krapfj23

Description

@krapfj23

Summary

Build the system that automatically generates and maintains an ontology from ingested documents.

Blocked by

Blocks

Steps

  1. Based on the research recommendation, implement the chosen approach
  2. Create backend/app/services/ontology.py with function generate_ontology(dataset_name) -> str that returns an OWL/TTL string
  3. After cognee.cognify(), analyze extracted entities/relationships and generate/update the ontology file
  4. Store the generated ontology at a known path (e.g., data/ontologies/<dataset_name>.ttl)
  5. On subsequent ingestions to the same dataset, pass the existing ontology to cognee.cognify(ontology_file_path=...)

Acceptance Criteria

  • Ontology is auto-generated after document ingestion
  • Ontology file is persisted and reused on subsequent ingestions
  • Re-ingestion updates (not overwrites) the ontology
  • Extraction quality improves with the ontology applied
  • PR body includes Closes #75

Metadata

Metadata

Assignees

No one assigned

    Labels

    ontologyOntology & knowledge graph

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions