GraphBridge: New EF Core Provider for Neo4j

Summary

The Neo4j community introduces GraphBridge, an open-source Entity Framework Core provider designed for .NET developers. This tool enables seamless integration with Neo4j through LINQ, typed Fluent Cypher, and vector search capabilities. It provides a structured approach to graph data by balancing EF Core tracking with flexible Cypher query options, including upcoming support for GraphRAG tooling.

This post is part of Cypher updates GraphBridge provider released ยท latest news Dec 2 ยท from posts in Discord communities
See the latest →
amberdragon-56 OP

Hi ๐Ÿ‘‹๐Ÿป all!
I've just shared GraphBridge in the forum: an open-source Entity Framework Core provider for Neo4j, so .NET developers can use Neo4j through EF Core (LINQ to parameterized Cypher, typed Fluent Cypher, vector search).
Feedback is very welcome: https://community.neo4j.com/t/graphbridge-an-entity-framework-core-provider-for-neo4j-net-open-source/81494

It comes with tooling for Visual Studio Code & I am expanding it right now with some tooling for makign GraphRAG easier ๐Ÿ”ฅ

happybeacon-37

Wondering if you have any thoughts about this, since you're also building a client library. Any thoughts on where you draw the line to wrap Cypher in a typed layer?

happybeacon-37

any thoughts on this too, composition over inheritance so that you can mix views. how does graphbridge deal with that?

amberdragon-56 OP

Hi and I love LINQ and if there was a nice way to put this in a fluent api, personally I'd go for it ๐Ÿ˜‰
On what I have done, check here: https://github.com/joslat/GraphBridge.EFCore#three-ways-to-query as I allow several levels, so you can choose ๐Ÿ˜‰

Where I have drawn the line so far: the typed layer owns what it can check, and translating everything isn't the goal. In GraphBridge, an EF Core provider for Neo4j, that means three layers:
1. LINQ and EF tracking for mapping, CRUD and queries that translate cleanly. EF is the single owner of entity state, and anything it can't translate faithfully throws instead of silently running on the client.
2. Fluent Cypher for graph-shaped work: paths, patterns, starting from a vector or full-text search. It stays typed against the EF model, and any shape it can't make safe is refused with a code.
3. Parameterized Cypher as the escape hatch, with identifiers only from validated metadata.

And directly responding to you: The line sits where a typed abstraction would start lying about what the database does.
Makes sense? what do you think? would you do it differently?

On composition over inheritance and multi-labels: that's the direction I went. An entity type can carry several labels. They're written on create and upsert and required by every match, so a type works like a view defined by a label set. The same applies to relationships: several entity types can share one relationship type and are told apart by their endpoint types.

Thoughts? ๐Ÿ™‚

GraphBridge: New EF Core Provider for Neo4j

amberdragon-56 OP
  • what is this thing? it was trying to publish my post into a website-portal...?? is this something you have set up officially? or is a kind of hijack of this platform from a user?
goldenquartz-17

CommunityOne is my community partner who partner close with on our Discord Server. The portal allows for your post to be indexed for a larger audience.

amberdragon-56 OP

lol, it scared me ๐Ÿ˜… ๐Ÿฃ - how can I approve it then? ๐Ÿคช

goldenquartz-17

?

@amberdragon-56 lol, it scared me ๐Ÿ˜… ๐Ÿฃ - how can I approve it then? ๐Ÿคช
happybeacon-37

I checked our records, and it looks like you opted out. We don't currently have a way for you to opt back in because we assumed that if someone opted out, they wanted it to be permanent.

If you'd like to opt back in, I can change that manually on my side. Just need you to confirm if you give us permission to publish your chat messages.

By the way, Discord recently announced that it will start indexing messages from public community servers, including Neo4j. Just a heads-up that messages posted after late November will likely be published online by default. I believe Discord also has a setting that lets you opt out.

@amberdragon-56 Hi and I love LINQ and if there was a nice way to put this in a fluent api, personally I'd go for iโ€ฆ
happybeacon-37

this is honestly a much clearer breakdown than most ORM, i am familar very django and i have a lot of problems with django's "throw instea of silently running on the client" approach, the query can run forever with no obvious reasons,

i feel you are closest to this problem with Drivine, would you draw the line in the similar place

@happybeacon-37 I checked our records, and it looks like you opted out. We don't currently have a way for you to opโ€ฆ
amberdragon-56 OP

I'd like to opt in if you don't mind... thanks a ton! I give permission to publish my chat messages ๐Ÿ™‚

@amberdragon-56 I'd like to opt in if you don't mind... thanks a ton! I give permission to publish my chat messagesโ€ฆ
happybeacon-37

done! your chat message iis now being published

happybeacon-37

how was ur thanksgiving

amberdragon-56 OP

was good took some days to my homecountry, thansk for asking ๐Ÿ™‚ - hope yours was good too

@amberdragon-56 was good took some days to my homecountry, thansk for asking ๐Ÿ™‚ - hope yours was good too
happybeacon-37

it was good too! feels a lot like a holiday now that we are in December, are you still full speed ahead working on GraphBridge or gonna take some times off on christmas

amberdragon-56 OP

I implemented a GraphRAG component and then I paused development ๐Ÿ™‚ - putting a lot of effort into AgentMemory for .NET and improving its recall performance - on Jul, I managed to bring it to 400 ms and in Sept. to 69 ms - as the mean tune of recall only on database time on a local neo4j on Docker. Today this is down to 6,8 ms ๐Ÿ™‚ - still it needs the local embedding model which on my fast desktop is 112 ms so total time for retrieval is 118 ms (mean over 100 recall/retrieval tasks). I am also working on improving the Entity/Identity resolution as this is a field that most of the memory providers arent doing that well...
This started with this post: https://www.linkedin.com/pulse/your-agent-doesnt-forget-error-forgets-tidy-answer-pablo-piovano-ihwwe/
And after Improving it substantially, this followed: https://www.linkedin.com/pulse/my-agent-memory-forgot-wedding-easy-bug-jose-luis-latorre-j2j9e/
And i have kept improving this and creating an identity-entity benchmark using my other project AgentEval.

if you have a moment I would love to have your feedback on AgentMemory and its direction...

There i have defined a standard for memory packaging and delivery that supports hierarchical composition, verification and validation so you can be sure that the memory in your hands is safe, signed and untampered and you can verify-validate it yourself too. Two weeks ago I demoed it first time with a "I know Kung-Fu" moment.

If you or are curious, happy to show this to you anytime!

goldenquartz-17

I will have to catch up on some items and I will do my bets to review! Looks really cool.

@amberdragon-56 I implemented a GraphRAG component and then I paused development ๐Ÿ™‚ - putting a lot of effort into Aโ€ฆ
happybeacon-37

two thoughts after reading it

on identity, love that it keeps both when unsure. what if the agent asked the user right there in the chat, like 'did you mean Alex your cousin or Alex from billing?' they're the only ones who actually know

on dates, I wonder if for a planning use case days should be their own nodes, like a time tree. every event links to the days it covers, so go-live week is just a walk over seven days and the wedding overlap shows up in the graph itself, not through search. you could even flag conflicts automatically, same day, two cities, both need her there. we've found with our own agents that people are really unforgiving when dates are wrong, so it feels worth treating them as special

curious if you considered that or if there's a reason it didn't fit

amberdragon-56 OP

Hi , that is a great point, that I think nobody has considered really. It usually happens in the Storage phase of the memory which usually does not make the agent wait (it's more a fire and forget - store and forget... no need to update the agent that it finished) but yes, in case of doubt we could ask the agent to ask the human ๐Ÿ™‚
We do that as humans sometimes right? when the other interlocutor does not give enough context, we ask for it! that is a great point ๐Ÿ™‚
And yes since that dates are treated as a special case - all the issues that the "bariloche test" found are solved ๐Ÿ™‚

Thanks to that and some further iteration my entity-identity management is much better. Almost everybody in the agent memory industry matches by name mostly and that is all...
when you say "considered that" you refer to get back to the agent to ask the human for further context?

To be honest I have pushed this to a fully fledged evaluation set for identity and I'm on the Version 7 and about to put it into AgentEval as a benchmark

The latest from Neo4j