1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! `klieo-memory-graph-rag` — graph-first RAG composer.
//!
//! Stable at `1.x`. Trait freeze contract recorded in ADR-039
//! (`docs/adr/adr-039-graphrag-1-0-promotion.md`).
//!
//! Public surface:
//! - `BuiltinExtractor`, `FallbackExtractor`, `LlmEntityExtractor`
//! - `ProvenanceKnowledgeGraph` — wraps any `KnowledgeGraph` with a
//! `ProvenanceRepository` so every `index()` mints a v2 chain
//! entry and every `recall_paths()` attaches the entry per hop
//! (ADR-038).
//! - `VerbalizationPipeline` — LLM-driven prose summary of a
//! `RetrievalPath` under a `klieo-spec` `QualityLoop`.
//! - `RegulationIngestTool` — `ImportSource` for structured
//! regulatory texts (DORA, AI-Act) — pre-seeds typed
//! `Article` / `Obligation` / `Deadline` entity hints.
//! - `GraphAwareLongTerm` — drop-in `LongTermMemory` that issues
//! graph-first recall with vector fallback; `recall_traced` exposes
//! the same authoritative facts plus a `RecallTrace` of extracted
//! entities and graph paths for "why did retrieval return this?"
//! - `KnowledgeIngestionPipeline` + `ImportSource` extension point
//! - `InMemoryFilterableLongTerm` — zero-infra `FilterableLongTermMemory`
//! with real cosine similarity over an injected `Embedder`
//!
//! # Quickstart
//!
//! ```no_run
//! # use std::sync::Arc;
//! # use klieo_memory_graph::{FilterableLongTermMemory, KnowledgeGraph};
//! # use klieo_memory_graph_rag::GraphAwareLongTerm;
//! # fn run(vector: Arc<dyn FilterableLongTermMemory>, graph: Arc<dyn KnowledgeGraph>) {
//! let long_term = GraphAwareLongTerm::builder().build(vector, graph);
//! # let _ = long_term; }
//! ```
//!
//! [`GraphAwareLongTerm::builder`] defaults the extractor
//! ([`BuiltinExtractor`]) and the [`klieo_memory_graph::RecallMetrics`]
//! counter so callers only supply the two mandatory backends. Override
//! either via [`GraphAwareLongTermBuilder::extractor`] /
//! [`GraphAwareLongTermBuilder::metrics`] /
//! [`GraphAwareLongTermBuilder::min_graph_hits`].
/// Regex-driven entity recogniser and (future) extractor combinators.
/// Two-stage extractor combinator: secondary runs only when primary is empty.
/// `GraphAwareLongTerm` — graph-first RAG composer over vector + graph.
/// `KnowledgeIngestionPipeline` + `ImportSource` — bulk-ingest extension point.
/// In-memory [`klieo_memory_graph::FilterableLongTermMemory`] with real cosine similarity.
/// LLM-backed entity extractor — JSON-array prompt with hint-fallback.
/// Shared reserved metadata-key constants for the ingest/recall contract.
/// `VerbalizationPipeline` — LLM-driven verbalisation of a
/// `RetrievalPath` under a `klieo-spec` `QualityLoop`.
/// `ProvenanceKnowledgeGraph` — wraps a `KnowledgeGraph` with a
/// `klieo-provenance` chain bridge (see ADR-038).
/// Regulatory-text ingest source — DORA / AI-Act and friends.
pub use BuiltinExtractor;
pub use FallbackExtractor;
pub use ;
pub use ;
pub use InMemoryFilterableLongTerm;
pub use LlmEntityExtractor;
pub use ;
pub use ;
pub use ;
pub use ;