According to the neo4j documentation:
CREATE UNIQUE is in the middle of MATCH and CREATE — it will match what it can, and create what is missing. CREATE
This query should do what you want (if you always want to end up with a single knows relationship between the 2 nodes):
knows
MATCH (a:Person {name: 'Alice'}) MERGE (b:Person {name: 'Bob'}) MERGE (a)-[:knows]->(b) RETURN a;