nexyron.semantic.mmrEdges
Generic Description
Diversity-reranked debug retrieval of edges.
Normal semantic search should use one query:
CALL nexyron.semantic.search({query: 'fraud cluster', k: 5})
YIELD result_kind, item_id, node_id, edge_id, source, name, score, text, metadata_json
RETURN result_kind, item_id, node_id, edge_id, source, name, score, text, metadata_json
ORDER BY score DESC
Semantic search procedures expose vector and semantic retrieval surfaces through Cypher.
Consumer-Level Explanation
Use nexyron.semantic.search for normal semantic retrieval. nexyron.semantic.mmrEdges is retained only when you specifically need diversity-reranked debugging of the edge slice of the unified semantic index without graph-node, abstraction, or artifact results.
Conceptual Explanation
nexyron.semantic.mmrEdges should be read as one named procedure contract in the broader Nexyron Cypher surface. The procedure call is not only a syntax hook: it defines what runtime state, projection, registry entry, or graph algorithm is being asked to operate, and it determines which output columns downstream YIELD, WITH, and RETURN stages can safely use.
More Detailed Explanation
This is the edge-index version of semantic diversification, useful when many nearly identical interactions would otherwise dominate the top results. It is not the product search surface.
The returned score is the hit's query relevance as a cosine-similarity score, where higher is better. The procedure's row order reflects MMR selection; if you sort later, use ORDER BY score DESC for relevance ordering.
Advanced Example
This debug-only example isolates diversity behavior in the edge slice of the unified semantic index. Use the unified procedure for normal search.
CALL nexyron.semantic.mmrSearch({query: 'identity fraud cluster', k: 10, fetch_k: 25, lambda: 0.7, ef: 200})
YIELD result_kind, item_id, node_id, edge_id, source, name, score, text, metadata_json
WITH result_kind, edge_id, score, text
WHERE result_kind = 'edge'
MATCH (u:User)-[e:INTERACTED_WITH]->(d:Document)
WHERE id(e) = edge_id
TIME e.ts BETWEEN datetime('2025-01-01T00:00:00Z') AND datetime('2025-03-01T00:00:00Z')
WITH edge_id, score, date_trunc('day', e.ts) AS day_bucket, properties(d) AS doc_map, unpivot(properties(d.metadata)) AS metadata_rows
RETURN edge_id, score, day_bucket, keys(doc_map) AS doc_keys, metadata_rows
LIMIT 10
Real Use Cases
- verifying edge-index diversity behavior
- diagnosing redundant edge embedding results
- comparing MMR edge-index behavior against unified search
- compose the procedure output with
YIELD,WITH, andRETURNrather than hiding follow-up logic outside Cypher
Real Limitations And Tradeoffs
- edge diversity still needs a meaningful downstream presentation model
- procedure calls are explicit contracts; missing state, unsupported parameters, or absent artifacts should fail rather than silently falling back