TrustGraph Ontology
type: Ontology
comment: Vocabulary for TrustGraph provenance, extraction metadata, and explainability.
version info: 2.3

Document
type: Class
subclass of: Entity
comment: A loaded document (PDF, text, etc.).

Page
type: Class
subclass of: Entity
comment: A page within a document.

Section
type: Class
subclass of: Entity
comment: A structural section within a document.

Chunk
type: Class
subclass of: Entity
comment: A text chunk produced by the chunker.

Image
type: Class
subclass of: Entity
comment: An image extracted from a document.

Subgraph
type: Class
subclass of: Entity
comment: A set of triples extracted from a chunk.

Question
type: Class
subclass of: Entity
comment: Root entity for a query session.

Graph RAG Question
type: Class
subclass of: Question
comment: A question answered via graph-based RAG.

Document RAG Question
type: Class
subclass of: Question
comment: A question answered via document-based RAG.

Agent Question
type: Class
subclass of: Question
comment: A question answered via the agent orchestrator.

Grounding
type: Class
subclass of: Entity
comment: Concept extraction step (query decomposition into search terms).

Exploration
type: Class
subclass of: Entity
comment: Entity/chunk retrieval step.

Focus
type: Class
subclass of: Entity
comment: Edge selection and scoring step (GraphRAG).

Synthesis
type: Class
subclass of: Entity
comment: Final answer synthesis from retrieved context.

Analysis
type: Class
subclass of: Entity
comment: One agent iteration: reasoning followed by tool selection.

ToolUse
type: Class
comment: Mixin type applied to Analysis when a tool is invoked.

Error
type: Class
comment: Mixin type applied to events where a failure occurred (tool error, parse error).

Conclusion
type: Class
subclass of: Entity
comment: Agent final answer (ReAct pattern).

Pattern Decision
type: Class
subclass of: Entity
comment: Meta-router decision recording which execution pattern was selected.

Answer
type: Class
subclass of: Entity
comment: Unifying type for any terminal answer (Synthesis, Conclusion, Finding, StepResult).

Reflection
type: Class
subclass of: Entity
comment: Unifying type for intermediate commentary (Thought, Observation).

Thought
type: Class
subclass of: Reflection
comment: Agent reasoning text within an iteration.

Observation
type: Class
subclass of: Reflection
comment: Tool execution result.

Decomposition
type: Class
subclass of: Entity
comment: Supervisor pattern: question decomposed into sub-goals.

Finding
type: Class
subclass of: Answer
comment: Result from a sub-agent execution.

Plan
type: Class
subclass of: Entity
comment: Plan-then-execute pattern: structured plan of steps.

Step Result
type: Class
subclass of: Answer
comment: Result from executing one plan step.

contains
type: ObjectProperty
comment: Links a parent entity to a child (e.g. Document contains Page, Subgraph contains triple).

page count
type: DatatypeProperty
range: integer
domain: Document

MIME type
type: DatatypeProperty
range: string
domain: Document

page number
type: DatatypeProperty
range: integer
domain: Page

chunk index
type: DatatypeProperty
range: integer
domain: Chunk

character offset
type: DatatypeProperty
range: integer

character length
type: DatatypeProperty
range: integer

chunk size
type: DatatypeProperty
range: integer

chunk overlap
type: DatatypeProperty
range: integer

component version
type: DatatypeProperty
range: string

LLM model
type: DatatypeProperty
range: string

ontology
type: DatatypeProperty
range: string

embedding model
type: DatatypeProperty
range: string

source text
type: DatatypeProperty
range: string

source character offset
type: DatatypeProperty
range: integer

source character length
type: DatatypeProperty
range: integer

element types
type: DatatypeProperty
range: string

table count
type: DatatypeProperty
range: integer

image count
type: DatatypeProperty
range: integer

query
type: DatatypeProperty
comment: The user's query text.
range: string
domain: Question

concept
type: DatatypeProperty
comment: An extracted concept from the query.
range: string
domain: Grounding

entity
type: ObjectProperty
comment: A seed entity retrieved during exploration.
domain: Exploration

edge count
type: DatatypeProperty
comment: Number of edges explored.
range: integer
domain: Exploration

selected edge
type: ObjectProperty
comment: Link to an edge selection entity within a Focus event.
domain: Focus

edge
type: ObjectProperty
comment: A quoted triple representing a knowledge graph edge.
domain: Focus

reasoning
type: DatatypeProperty
comment: LLM-generated reasoning for an edge selection.
range: string

document
type: ObjectProperty
comment: Reference to a document stored in the librarian.

chunk count
type: DatatypeProperty
comment: Number of document chunks retrieved (DocumentRAG).
range: integer
domain: Exploration

selected chunk
type: DatatypeProperty
comment: A selected chunk ID (DocumentRAG).
range: string
domain: Exploration

thought
type: ObjectProperty
comment: Links an Analysis iteration to its Thought sub-entity.
domain: Analysis
range: Thought

action
type: DatatypeProperty
comment: The tool/action name selected by the agent.
range: string
domain: Analysis

arguments
type: DatatypeProperty
comment: JSON-encoded arguments passed to the tool.
range: string
domain: Analysis

observation
type: ObjectProperty
comment: Links an Analysis iteration to its Observation sub-entity.
domain: Analysis
range: Observation

tool candidate
type: DatatypeProperty
comment: Name of a tool available to the LLM for this iteration. One triple per candidate.
range: string
domain: Analysis

step number
type: DatatypeProperty
comment: Explicit 1-based step counter for iteration events.
range: integer
domain: Analysis

termination reason
type: DatatypeProperty
comment: Why the agent loop stopped: final-answer, plan-complete, subagents-complete, max-iterations, error.
range: string

pattern
type: DatatypeProperty
comment: Selected execution pattern (react, plan-then-execute, supervisor).
range: string
domain: Pattern Decision

task type
type: DatatypeProperty
comment: Identified task type from the meta-router (general, research, etc.).
range: string
domain: Pattern Decision

LLM duration (ms)
type: DatatypeProperty
comment: Time spent in the LLM prompt call, in milliseconds.
range: integer
domain: Analysis

tool duration (ms)
type: DatatypeProperty
comment: Time spent executing the tool, in milliseconds.
range: integer
domain: Observation

tool error
type: DatatypeProperty
comment: Error message from a failed tool execution.
range: string
domain: Observation

input tokens
type: DatatypeProperty
comment: Input token count for the LLM call associated with this event.
range: integer

output tokens
type: DatatypeProperty
comment: Output token count for the LLM call associated with this event.
range: integer

sub-agent goal
type: DatatypeProperty
comment: Goal string assigned to a sub-agent (Decomposition, Finding).
range: string

plan step
type: DatatypeProperty
comment: Goal string for a plan step (Plan, StepResult).
range: string