ontocast.agent.aggregate_serialize¶
Fact aggregation agent for OntoCast.
This module provides functionality for aggregating and serializing facts from multiple chunks into a single RDF graph, handling entity and predicate disambiguation.
aggregate(state, tools)
¶
Aggregate facts from multiple processed chunks into a single RDF graph.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
AgentState
|
Current agent state with processed chunks |
required |
tools
|
ToolBox
|
ToolBox containing aggregation tools |
required |
Returns:
| Type | Description |
|---|---|
AgentState
|
Updated agent state with aggregated facts |
Source code in ontocast/agent/aggregate_serialize.py
serialize(state, tools)
¶
Serialize the knowledge graph to the triple store.
This function: - Handles version management for updated ontologies - Tracks budget usage - Serializes both ontology and facts to the triple store
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
AgentState
|
Current agent state with ontology and facts |
required |
tools
|
ToolBox
|
ToolBox containing serialization tools |
required |
Returns:
| Type | Description |
|---|---|
AgentState
|
Updated agent state after serialization |