r/Neo4j • • May 29 '26

Using an agent to go from unstructured pharmaceutical documents to a knowledge graph (with the right harness)

Post image
26 Upvotes

We recently benchmarked a bunch of different models for an extraction task in the live sciences domain. The goal was to create a knowledge graph from unstructured PDF documents.

We took product information on prescription medicines (Summary of Product Characteristics) and extracted things like side effects, dosages, indications, studies, and more.

The harness was pretty important too:

- pydantic-ai in code mode
- medical ontology SNOMED for entity resolution
- quite a bit of deterministic schema and graph structure validation
- Neo4J to store the graph data
- agent steering

The biggest bump came from agent steering:

We fed traces to an evaluator, returned exact error locations, and then had the main agent self-correct its path to create a better outcome.

deepseek v4 flash reached 87% f1 score on node extraction without steering and 92% with steering (measured against a ground truth of 1.6k nodes). That’s quite an achievement and was on par with much bigger and more expensive models.

A full writeup is here: https://www.blueguardrails.com/en/blog/knowledge-graph-agent-steering


r/Neo4j • • Jan 23 '25

Neo4j - toxic for open source?

26 Upvotes

The SFC filed an amicus brief related to Neo4j’s toxic litigation against GPLv3. See link below.

Neo4j has spent millions over 5+ years on this lawsuit.

It just so happens that the lawsuit targets the open source founder of the 2 biggest Neo4j forks: ONgDB and the new DozerDB. Coincidence?

Shame on Neo4j!

https://sfconservancy.org/news/2025/jan/13/neo4j-amicus/


r/Neo4j • • Mar 24 '22

Downsides of Graph Databases

25 Upvotes

Hello everyone. I have been looking into Neo4j and the graph db paradigm for a while, and I have to say I think it has some very compelling features. It feels like graph databases are the most sensible way to represent data, since it is the closest to how we model data in OO programming. However, it seems like the graph paradigm is struggling to take off has the mainstream way to store data, and I have no clue why that is. I assume that a good portion of the people in this subreddit have used Neo4j for a real world application, and therefore can testify on what would be the drawbacks of going the graph way. Are there any?


r/Neo4j • • Apr 27 '21

Announcing the Neo4j GraphQL Library

24 Upvotes

Hi folks -

Today Neo4j released the 1.0 stable release of the official Neo4j GraphQL Library which aims to make it as simple as possible to build GraphQL APIs backed by a native graph database.

You can find out more in the announcement blog post here: https://neo4j.com/blog/announcing-neo4j-graphql-library-build-low-code-graphql-apis-faster/

There is also a new online Graph Academy workshop for a hands-on look at building Node.js GraphQL APIs with the Neo4j GraphQL Library: https://neo4j.com/graphacademy/training-graphql-apis/enrollment/

Let me know what you think of the course and what other kinds of things you'd like to see covered in Graph Academy!


r/Neo4j • • Jan 04 '24

No one uses Neo4j for actual large scale live applications... right?

23 Upvotes

Most true graph databases are either purpose built for a niche workflow (network analysis etc) or are overall not great experience (high latency, low availability). For a type of graph application that uses millions -> hundreds of millions of nodes and relations, does everyone move toward the TAO model and just build on top of more performant SQL databases? This is for something that would have high TPS, more reads than writes but a lot of mutation. Asking because I wanted to see if neo4j had developed enough but it is just not there IMO, esp for the cost. It seems neo4j is just for toy applications or one off analysis (even APOC is built to like just dump a dataset into it and play around)


r/Neo4j • • Dec 05 '25

Real-Time Knowledge Graph for Documents with LLM

21 Upvotes

Would love to share this project that builds real-time knowledge Graph for Documents with LLM. we will use LLM to extract relationships between the concepts in each document, and generate two kinds of relationships:

  1. Relationships between subjects and objects. E.g., "X supports Y"

  2. Mentions of entities in a document. E.g., "core/basics.mdx" mentions X and Y.

and then build a knowledge graph. Once the system connected, it performs real-time incremental processing

Link to the tutorial: https://cocoindex.io/docs/examples/knowledge-graph-for-docs
Link to the project: https://github.com/cocoindex-io/cocoindex


r/Neo4j • • Apr 01 '21

How to pass the new free Neo4j Graph Data Science certification exam

21 Upvotes

This is a brand new certification exam, announced one month ago. I took the time to look inside, and there are a few important findings you may like:

  1. This is not just for data scientists. In fact, as a software engineer, I enjoyed it a lot and it expanded my horizons.

  2. There is so much in the otherwise excellent recommended courses, labs or online Neo4j documentation that is not required for the exam. If you just want to quickly learn and pass the exam, check what is left aside.

  3. Yes, I also talk there about my own new practice tests, that may help you pass this exam in just 2-3 days, with a high score, as I did. Beware this doesn't make you an expert at all, but...

https://data-xtractor.com/blog/databases/neo4j-graph-data-science-certification-exam/


r/Neo4j • • Jul 19 '25

Essential GraphRAG

20 Upvotes

You can get the newly released Essential GraphRAG by Manning for free:

https://neo4j.com/essential-graphrag/

Code: https://github.com/tomasonjo/kg-rag


r/Neo4j • • Apr 11 '23

Context-Aware Knowledge Graph Chatbot with GPT-4 and Neo4j

20 Upvotes

The addition of OpenAI's ChatCompletion API allows us to create chatbots that are aware of the context of the conversation and can be used to ask follow-up question efficiently. In my latest post, I have evaluated GPT-4 on generating Cypher statements for follow-up questions, where understanding the context is crucial.

tldr: GPT-4 works really nicely for generating Cypher

https://medium.com/neo4j/context-aware-knowledge-graph-chatbot-with-gpt-4-and-neo4j-d3a99e8ae21e


r/Neo4j • • May 05 '21

Improved Vim Syntax Highlighting for Cypher

Post image
20 Upvotes

r/Neo4j • • May 17 '24

New finetuned text2cypher model based on Llama3

19 Upvotes

I'm very excited to announce that I've finetuned Llama3-Instruct:8b to generate Cypher statements based on the GPT-4o synthetic dataset I've generated at the start of the week. I have used the inspiration from Geraldus Wilsen to use Unsloth and updated it a bit to use chat prompt template (system, user, assistant messages). Please test it out and let me know how it goes as I used mostly default finetuning arguments because I don't really know what I'm doing 😃 . I have also added example code to show how to implement it with LangChain!

Links:

Finetuning notebook with docs: https://github.com/neo4j-labs/text2cypher/tree/main/finetuning/unsloth-llama3#using-chat-prompt-template

HuggingFace model:https://huggingface.co/tomasonjo/text2cypher-demo-16bit

Ollama models: https://ollama.com/tomasonjo/llama3-text2cypher-demo


r/Neo4j • • Jan 25 '24

Crowdsourcing a text2cypher dataset

18 Upvotes

Do you want to finetune a text2cypher LLM but can't find a dataset? Is there a new LLM you want to evaluate for its Cypher generating abilities? The problem is that there are no publicly available text2cypher datasets that you could use. I want to change that.

Given the excellent response from the community I got from my previous Cypher direction validation competition, I have decided to start a text2cypher dataset crowdsourcing initiative. We have implemented an application that allows you to generate and validate Cypher statements based on natural language input. To make the dataset as rich as possible, you have the option to generate Cypher statements for 17 different graph databases, each with its schema model.

Even if you are non-technical, you can help us by posing good questions you expect the graph to answer. Additionally, the top 10 contributors will receive swag prizes, and I'll ship a couple of copies of my recently published book as well.

Let's make 2024 the year of finetuned text2cypher LLMs together! :)

Neo4j #graph #llm #chatgpt

Link to the blog post for more information: https://bratanic-tomaz.medium.com/crowdsourcing-text2cypher-dataset-e65ba51916d4
Link to application: https://text2cypher.vercel.app/


r/Neo4j • • Oct 31 '25

I want to build a knowledge graph - can you tell me if that's something doable and makes sense, or it's complete nonsense

17 Upvotes
  • Goal: Building an Intelligent Knowledge System focusing on a specific medical domain (Down Syndrome) using AI for intelligent search and Q&A.

  • Data Aggregation: The system processes and aggregates data from multiple sources, including medical literature and drug databases.

  • Knowledge Graph (Neo4j): Core architecture uses Neo4j to store a structured Knowledge Graph containing Entities (like Drugs, Proteins, and Diseases) and the Relationships between them. This is the 'brain' for factual retrieval.

  • RAG/AI Search: Implements Retrieval-Augmented Generation (RAG) using a Vector Index (also in Neo4j) to store text fragments and their embeddings. This enables deep, semantic natural language searching of the source material.

  • Hybrid Querying: The Chatbot answers user questions by executing hybrid queries that combine semantic (vector) search and structured graph traversal for the most comprehensive and accurate response.

  • AI Data Processing: An ETL (Extract, Transform, Load) pipeline uses LLMs (Large Language Models) to automatically perform Graph Extraction (identifying and formalizing entities/relationships) and generate the necessary embeddings

---

A little bit more detailed process:

  • Goal: Build an Intelligent Knowledge System for a specific medical domain (Down Syndrome) using Knowledge Graphs and RAG.

  • Knowledge Graph (KG) Value (Neo4j):

    • Structured Facts: Create a structured network of Entities (Drugs, Proteins, Diseases) and their Relationships.

    • How to Achieve:

      • LLM Extraction: Process translated text using a Large Language Model (LLM) to identify and extract entities and relationships.

      • Loading: Use MERGE commands in Neo4j to load these structured facts and link them to their source article.

      • Enrichment: Load existing relational data (e.g., drug targets) into the graph directly from tabular files.

  • RAG (Retrieval-Augmented Generation) Value:

    • Semantic Search: Enable searching by meaning, not just keywords, across all source texts.

    • How to Achieve:

      • Chunking: Split source text into small, manageable fragments (chunks).

      • Vectorization: Generate embeddings (numerical representations) for each chunk using an LLM.

      • Indexing: Store chunks and their embeddings in a Vector Index within Neo4j (e.g., using CREATE VECTOR INDEX).

  • ETL (Extract, Transform, Load) Flow:

    • Data Ingestion: Fetch new content from sources (e.g., medical literature APIs, blogs).

    • Processing: Clean, translate content to a standardized language for extraction, and split it into chunks.

    • Loading: Store article metadata in an external SQL database (for dashboard/status tracking) and simultaneously load the KG facts and RAG vectors into Neo4j.

  • Chatbot (Hybrid Q&A) Flow:

    • Query Embedding: Generate a vector for the user's natural language question.

    • Hybrid Search: Execute a search in Neo4j that combines:

      • Vector Query: Find the most relevant text chunks using the Vector Index.

      • Graph Query (Optional): Retrieve explicit facts from the Knowledge Graph (e.g., finding all drugs related to a specific protein).

    • Prompt Generation: Package the retrieved text chunks and graph facts into a single, comprehensive prompt for the LLM.

    • Final Answer: LLM synthesizes the final answer in natural language, citing the retrieved context.


r/Neo4j • • Oct 22 '25

Knowledge Graph Engineer

17 Upvotes

Not sure if this will get booted off or not- can't find the community rules.

I'm hiring a fairly niche role for a consulting firm in NYC that would require occasional travel to NYC clients. It's a Knowledge Graph Engineer position looking for someone to design, build, and maintain enterprise knowledge graphs using Neo4j, focusing on ontology modeling, data integration, and graph infrastructure to enable search, recommendations, analytics, and AI grounding for organizations.

My client is looking for someone who is in the US and unfortunately isn't in a position to offer sponsorship (they're a small consulting firm).

I'm struggling to find people who are well versed enough in Neo4j to make it their day to day focus, mostly just finding people who have used it passively. If you sound like the right fit, are in the US, open to traveling to NYC on occasion for client visits, are senior enough to confidently have people report in to you, are authorized to work for any employer in the US without sponsorship and want to learn more- drop me a message.


r/Neo4j • • Jul 29 '25

Evaluating Neo4j's MCP Cypher server

17 Upvotes

Everyone’s building agents and spinning up MCP servers. But almost no one is talking about evaluation. In my latest post, I introduce a framework for evaluating graph retrieval in Neo4j MCP-based agentic systems, using LangChain.

Blog: https://towardsdatascience.com/evaluating-graph-retrieval-in-mcp-agentic-systems/

Code: https://github.com/neo4j-contrib/grape


r/Neo4j • • Apr 04 '25

I just found out Neo4j and its awesome

17 Upvotes

r/Neo4j • • Oct 29 '18

Practical Apache Spark in 10 minutes. Part 7 - GraphX and Neo4j

Thumbnail
datascience-school.com
17 Upvotes

r/Neo4j • • Jan 31 '23

ChatGPT as an interface for Neo4j

16 Upvotes

I've played around with ChatGPT over the weekend evaluating how well it performed as a Neo4j interface, where ChatGPT would be used to generate Cypher statements. I'm sharing the experience in my latest blog post.

https://towardsdatascience.com/use-chatgpt-to-query-your-neo4j-database-78680a05ec2#d083-cf615c9d7f04


r/Neo4j • • Mar 07 '26

Open-Source AI Assistant using Databricks, Neo4j and Agent Skills (from my PhD research)

15 Upvotes

Hi everyone,

I recently created Alfred, a open-source project from my PhD research on text-to-SQL data assistants built on top of Next.js, a database (Databricks) and with a semantic layer (Neo4j). I just added Agent Skills as update.

Instead of putting all logic into prompts, Alfred can now call explicit skills. This makes the system more modular, easier to extend, and more transparent. For now, the data-analysis is the first skill but this could be extend either to domain-specific knowledge or advanced data validation workflowd. The overall goal remains the same: making data assistants that are explainable, model-agnostic, open-source and free to use. It also includes scripts to create the initial knowledge graph from Databricks data schema.

Link: https://github.com/wagner-niklas/Alfred/


r/Neo4j • • Apr 08 '25

Zero Hallucination Chatbot with Neo4J

15 Upvotes

I built an open source zero hallucination chatbot to help other people answer questions about their classes, graduation requirements, and more. The techstack is nextjs, the vercel AI SDK, and Neo4j with cypher (for graph RAG). You can find the repo here.

Please let me know what you think. Thanks!!


r/Neo4j • • Jan 16 '24

When to Choose Neo4j [discussion]

15 Upvotes

Hey all,

New to Neo4j here, and kinda falling in love with it, but can't help but notice a lot of what's being done here can be done using many other structures (for example, MySQL/Mongo connected to GraphDB which allows us to focus on relationships a bit more).

The question is- in what cases will you choose Neo4j on top of other platforms? what factors will you take into consideration? would love to hear why you chose this or any other platform!

A bit about my project (and why this question popped into my head)- I foresee a large amount of nodes, each can be related to one/many other nodes, and we need to be able to search its' related nodes from many different endpoints, but almost never need a broad view (like, get me top 150 rows from table X). That being said, my nodes themselves will most likely need a scheme and set list of keys, but the amount of relationships they have and types thereof will vary.


r/Neo4j • • Apr 22 '21

Visualizing the Clubhouse Social Graph with neo4j and d3

15 Upvotes

Hey hey 👋

I spent the past month and a half crawling the Clubhouse API to extract publicly available user data for ~2.7M users, ~15M follower relationships, and ~1.2M invited by relationships.

All of this data is aggregated into a neo4j database (hosted on EC2) and exposed to a frontend for exploration here: https://clubhousesocialgraph.com

This was my first time using neo4j, and I have to say that it's been a really amazing tool for this job.

We've only recently started exploring the data science algo side of things, using PageRank to sort users by their transitive influence. Here's a breakdown of the pagerank top users vs the naive top users.

My collaborators and I are looking for feedback from the neo4j community. You can read a bit more about the data and the project itself here: https://www.clubhousesocialgraph.com/about

We're also looking for data scientists who would like access to the underlying neo4j database to see what insights we can derive from this awesome dataset.

One last thing: the project's completely free & open source 💯

Cheers.


r/Neo4j • • Jun 05 '26

Neogit: filesystem snapshots stored in Neo4j as a queryable graph

14 Upvotes

📦 https://github.com/OSWatcher/neogit

I'm storing filesystem snapshots as a graph in Neo4j so I can query across them.

Git already nails the storage half: content-addressed Merkle trees, automatic dedup of identical files across snapshots. But Git's object store is a key-value store, not something you can query.

I wanted to walk into any snapshot, attach my own data to it, and ask questions across everything in one language.

So I keep the same content-addressed Merkle structure, but in Neo4j. That bought me two things:

  • Traversal in any direction with Cypher. "Which snapshots contain this exact file?" is one query instead of a script

  • An open, extensible graph. I hang my own nodes off any commit, registry keys, binary symbols, struct fields, and query them with the same Cypher as the built-in commit/tree/blob graph

Neogit is one of the core libraries behind the OSWatcher project, where we aim to answer questions like:

  • "On which Windows builds is this registry key present ?"

  • "When did this Windows kernel struct field changed accross versions ?"

A few examples of such advanced git log-like characteristic history, where we trace a registry key / struct field over multiple Windows builds:

https://x.com/mtarral/status/2036594336058560971?s=20

Contributions, feeback and ideas are welcome ! 👏


r/Neo4j • • Dec 22 '23

@neo4j/graphql is blowing my mind

14 Upvotes

I have a very good use case for a graph db and I was struggling to understand how to do certain things, coming from mostly nosql and a little bit of relational. the graphql plugin seems to cut out a lot of work and as soon as I figured out how to write custom relationship properties I've solved so many problems with such little code.

Any words of wisdom to a n4j newcomer? Any major downsides with the graphql plugin I should be cognizant of?

Thanks!

edit: what has your experience been like trying to sell your teams on switching to neo4j / graph dbs, knowing it's a good tool for the job?