Skip to content

Conversation

@Leomrlin
Copy link
Contributor

Description

The current context memory system lacks support for unstructured data types such as text, images, video, and audio. These data formats do not come with pre-built graph structures, requiring a mechanism to dynamically extract and model relationships from raw data.

Solution

Implement a ConsolidateFunction component that will:

  1. Read raw unstructured data from the storage system
  2. Leverage available computational resources to:
    • Analyze content and extract semantic relationships
    • Generate necessary association edges between data entities
    • Create searchable indices for different data modalities
  3. Model the generated metadata as nodes/edges in the graph structure
  4. Write the processed graph data back to the storage system
  5. Support both initial graph construction and incremental updates

# Conflicts:
#	geaflow-ai/pom.xml
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/GraphMemoryServer.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/common/ErrorCode.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/common/config/Constants.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/graph/MemoryMutableGraph.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/graph/MutableGraph.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/graph/io/MemoryGraph.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/operator/GraphSearchStore.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/operator/SearchUtils.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/operator/SessionOperator.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/session/SessionManagement.java
#	geaflow-ai/src/main/java/org/apache/geaflow/ai/verbalization/SubgraphSemanticPromptFunction.java
#	geaflow-ai/src/test/java/org/apache/geaflow/ai/MutableGraphTest.java
Copy link

@Appointat Appointat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


if (null == mutableGraph.getSchema().getSchema(
Constants.CONSOLIDATE_KEYWORD_RELATION_LABEL)) {
int code = mutableGraph.addEdgeSchema(new EdgeSchema(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the graph schema is changed or updated inside a function rather than being created by the caller before execution, is there a risk that the updated schema will not be visible to subsequent steps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The modification and synchronization of the mutableGraph are entirely managed by the external HTAP graph engine. The Server side of the GraphMemory component is not responsible for this logic. Currently, there is only one instance of ConsolidateServer in the system, so there are no data synchronization or conflict issues between multiple instances.

import org.slf4j.LoggerFactory;

@Controller
public class GeaFlowMemoryServer {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a need for an API to start the ConsolidateServer? I don't see any explicit startup command for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants