feat(ai): add embedding consolidate func and operator#736
Open
Leomrlin wants to merge 37 commits intoapache:masterfrom
Open
feat(ai): add embedding consolidate func and operator#736Leomrlin wants to merge 37 commits intoapache:masterfrom
Leomrlin wants to merge 37 commits intoapache:masterfrom
Conversation
# 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
…lidate_func # Conflicts: # geaflow-ai/src/main/java/org/apache/geaflow/ai/GeaFlowMemoryServer.java # geaflow-ai/src/main/java/org/apache/geaflow/ai/GraphMemoryServer.java # geaflow-ai/src/main/java/org/apache/geaflow/ai/client/GeaFlowMemoryClientCLI.java # geaflow-ai/src/main/java/org/apache/geaflow/ai/common/config/Constants.java # geaflow-ai/src/main/java/org/apache/geaflow/ai/consolidate/ConsolidateServer.java # geaflow-ai/src/main/java/org/apache/geaflow/ai/consolidate/function/ConsolidateFunction.java # geaflow-ai/src/main/java/org/apache/geaflow/ai/consolidate/function/EmbeddingRelationFunction.java # geaflow-ai/src/main/java/org/apache/geaflow/ai/consolidate/function/KeywordRelationFunction.java # geaflow-ai/src/main/resources/application.yml # geaflow-ai/src/test/java/org/apache/geaflow/ai/MemoryServerTest.java # geaflow-ai/src/test/java/org/apache/geaflow/ai/MutableGraphTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements
ConsolidateFunctionand its correspondingOperatorusing relative vector constructions for relation representation in graph memory, including:C = A ⊙ B(Hadamard product capturing shared features)cos(Q, A ⊙ B)measures intersection alignment with queryQDiff(B→A) = normalize(A - (A·B)B)cos(Q, Diff(B→A))detects directional feature divergence fromBtoAunderQDist(A,B) = 1 - cos(A,B)delta = cos(Q,B) - cos(Q,A)quantifies relative affinity shift