Skip to content

v0.1.0

Latest

Choose a tag to compare

@AsphodelRem AsphodelRem released this 07 Sep 18:39
abd3f29

Release 0.1.0: dev → main

This release introduces an ontology layer for artifact extraction. Entity and
relation types now come with rules — domain/range, a type hierarchy, aliases and
inverse predicates — and the same object both drives the extraction prompt and is
enforced on what the model returns, so the two cannot drift apart. It also adds
community size filtering, precise types across the public API, and fixes two cases
where extracted artifacts were silently lost.

Highlights

  • ragu-build skill: picks a RAGU pipeline through a short interview and
    generates a validated ragu_build.yaml alongside a runnable build script.
  • Ontology layer: Ontology carries a vocabulary and its constraints in one
    object — domain/range per predicate, an entity type hierarchy, symmetric and
    inverse predicates, aliases/inverse_aliases, and retype_when rules that
    rewrite a predicate for specific endpoint types. Built from a named built-in, a
    YAML file that may extend another, or plain type lists.
  • Enforcement: OntologyValidator runs between the model output and
    Entity/Relation construction, checking unknown types, domain/range
    violations, self-loops, and endpoints missing from the chunk. ValidationPolicies
    selects per check whether to repair, drop, count, or raise; a repair goes through
    an alias, a fuzzy match, a retype_when rule, or an endpoint swap, and applies
    only when the result satisfies the ontology.
  • NEREL as an ontology: 29 entity types and 49 predicates with domain/range
    rules, now the single source of truth for the legacy type lists.
  • Prompt type signatures: show_type_signatures renders each predicate with
    its signature, WORKPLACE [PERSON -> ORGANIZATION|FACILITY], in the system
    message, so a backend with prefix caching prefills it once per batch.
  • Community filtering: min_cluster_size drops communities below a given size
    right after community detection, and GlobalSearchParams applies the same
    threshold at query time.
  • Precise public types: a concrete output_schema carries through to the
    return type of chat_completion, and engines are generic as
    BaseEngine[ParamsT, RetrieveT].
    YAML file that may extend another, or plain type lists.

Breaking changes

  • The LLM extractors take a single ontology argument instead of entity_types
    and relation_types. Pass ontology=None for the previous unconstrained
    behaviour.
  • BaseEngine.__init__ takes prompts as a regular argument and everything after
    it keyword-only; the *args/**kwargs passthrough is gone.
  • Index is no longer generic: Index[Entity, Relation] becomes Index.
  • BaseArtifactExtractor.extract and the graph storage upsert_nodes/
    upsert_edges take a List instead of an Iterable.

Deprecations

  • RaguLmArtifactExtractor, in favour of TwoStageArtifactsExtractorLLM and
    ArtifactsExtractorLLM. It now emits a DeprecationWarning and will be removed
    in a future release.

Bug fixes

  • Fixed two-stage extraction discarding a chunk's entities when its relation stage
    produced nothing, and the whole batch's entities when the relation call failed.
  • Fixed the artifact-validation prompt not receiving the allowed relation types,
    which let validation rewrite a relation into a type outside the vocabulary.