Spaces:
Runtime error
Runtime error
File size: 489 Bytes
06cb2a3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
// Load game summary embeddings into Neo4j
// This script adds embeddings as vector properties to Game nodes
LOAD CSV WITH HEADERS
FROM 'file:///game_summary_embeddings.csv'
AS row
MATCH (g:Game {game_id: row.game_id})
WITH g, row,
[x in keys(row) WHERE x STARTS WITH 'dim_'] AS embedding_keys
WITH g, row,
[x in embedding_keys | toFloat(row[x])] AS embedding_vector
CALL db.create.setNodeVectorProperty(g, 'summaryEmbedding', embedding_vector)
RETURN count(*) as UpdatedGames |