ESDB — OEA Anti-Hallucination Fields¶
Ontological Epistemic Anchoring (OEA) is the framework that makes every chronomemory
record epistemically accountable. Every ChronoRecord carries seven mandatory OEA fields
that answer the critical questions about any belief stored in an agentic system.
Why OEA?¶
Without OEA, AI-generated content silently pollutes a project's knowledge base. An LLM assertion becomes indistinguishable from a measured fact. A recycled agent output at depth 5 looks the same as a fresh human observation. Low-confidence speculation gets injected into RAG context alongside high-confidence evidence.
OEA prevents this by making provenance, confidence, and epistemic context mandatory — not optional metadata.
The seven fields¶
source_type — H19¶
"Was this observed, inferred, or synthesized?"
| Value | Meaning |
|---|---|
observed |
Directly measured or witnessed by a human or deterministic system |
inferred |
Derived logically or statistically from observed data |
hypothesis |
Proposed belief not yet tested (prefer is_hypothesis=True also) |
synthetic |
Generated by an LLM or other stochastic model |
Default: "observed"
# Benchmark result from a Python script
ChronoRecord(source_type="observed", ...)
# An architectural decision made by reasoning over requirements
ChronoRecord(source_type="inferred", ...)
# A proposed explanation before testing
ChronoRecord(source_type="hypothesis", is_hypothesis=True, ...)
# GPT-4o summary of a document
ChronoRecord(source_type="synthetic", model_assumptions={"provider": "openai"}, ...)
confidence — H17¶
"How strongly is this belief held?"
A float in [0.0, 1.0]. Default: 0.7.
The RAG filter threshold is confidence >= 0.6 (OEA rule H18). Records below this threshold
are excluded from query(rag_filter=True) and should not be injected into LLM context without
explicit override.
| Range | Interpretation |
|---|---|
0.0 |
Known to be false or completely unreliable |
0.0–0.5 |
Low confidence; excluded from RAG |
0.6–0.7 |
Sufficient confidence for RAG; may carry uncertainty |
0.8–0.9 |
High confidence; typical for verified requirements |
1.0 |
Absolute certainty (use for measurements, not LLM output) |
# Empirical measurement with known reproducibility
ChronoRecord(confidence=1.0, source_type="observed", ...)
# LLM summary that may contain errors
ChronoRecord(confidence=0.65, source_type="synthetic", ...)
# Hypothesis that might be wrong
ChronoRecord(confidence=0.5, is_hypothesis=True, ...)
evidence — H20¶
"What sources support this belief?"
A list of string references. Default: [].
Evidence references can be document IDs, URLs, experiment identifiers, or any string that helps trace the belief back to its source.
# Requirement from a specification
ChronoRecord(
evidence=["ESDB-Specification.md §3", "REQUIREMENTS.md §2"],
...
)
epistemic_boundary — H15¶
"Where does this belief apply?"
A list of scope constraint strings. Default: [].
Epistemic boundaries declare the validity scope of a belief. Without boundaries, a belief is assumed to apply universally — which is often wrong.
ChronoRecord(
epistemic_boundary=[
"platform:linux",
"version:1.0",
"component:api/auth",
],
...
)
is_hypothesis — H20¶
"Is this a tentative, untested belief?"
A boolean. Default: False.
When True, the record is explicitly flagged as a hypothesis. This prevents hypotheses
from being treated as facts during RAG retrieval and allows them to be tracked through
their lifecycle (hypothesis → tested → confirmed/refuted).
model_assumptions — H21¶
"Which model produced this, and under what settings?"
A dict. Default: {}.
Required for any record produced by an LLM or stochastic model. Allows future auditing of which model generated a belief.
ChronoRecord(
source_type="synthetic",
model_assumptions={
"provider": "anthropic",
"model": "claude-opus-4",
"context_window": 200000,
"temperature": 0.0,
"session_id": "sess-abc123",
},
...
)
recursion_depth — H16¶
"How many autonomous agent hops produced this?"
An integer. Default: 0.
0 = directly human-initiated. N = produced by an agent acting on the output of N-1 prior
agent calls. ChronoStore stamps this value from recursion_depth=N passed at construction.
# Direct human action (default)
store = ChronoStore(project_root, recursion_depth=0)
store.upsert(record) # record.recursion_depth == 0
# Agent acting on prior agent output
store = ChronoStore(project_root, recursion_depth=2)
store.upsert(record) # record.recursion_depth == 2
H18 — RAG confidence filter¶
OEA rule H18: "RAG context injection filters to records with confidence >= 0.6."
# Only records with confidence >= 0.6 AND status == "active"
safe_context = store.query(rag_filter=True)
# Override the threshold
high_context = store.query(min_confidence=0.9)
# Bypass H18 (use with care)
all_records = store.query(rag_filter=False) # default
Conflict detection — H22¶
OEA rule H22: "Conflicting records at the same confidence level must not be injected into the same RAG context without explicit conflict resolution."
Currently detected via the dependency graph in the Rust core (EdgeType::Contradicts).
The Python implementation exposes the records; conflict resolution is the caller's
responsibility.