Repository navigation
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 validatedragu_build.yamlalongside a runnable build script. - Ontology layer:
Ontologycarries a vocabulary and its constraints in one
object —domain/rangeper predicate, an entity type hierarchy, symmetric and
inverse predicates,aliases/inverse_aliases, andretype_whenrules 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:
OntologyValidatorruns between the model output and
Entity/Relationconstruction, 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, aretype_whenrule, 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_signaturesrenders 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_sizedrops communities below a given size
right after community detection, andGlobalSearchParamsapplies the same
threshold at query time. - Precise public types: a concrete
output_schemacarries through to the
return type ofchat_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
ontologyargument instead ofentity_types
andrelation_types. Passontology=Nonefor the previous unconstrained
behaviour. BaseEngine.__init__takespromptsas a regular argument and everything after
it keyword-only; the*args/**kwargspassthrough is gone.Indexis no longer generic:Index[Entity, Relation]becomesIndex.BaseArtifactExtractor.extractand the graph storageupsert_nodes/
upsert_edgestake aListinstead of anIterable.
Deprecations
RaguLmArtifactExtractor, in favour ofTwoStageArtifactsExtractorLLMand
ArtifactsExtractorLLM. It now emits aDeprecationWarningand 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.