🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
🪟 Windows TippsProfi-Edelstahlpfanne von WMF jetzt zum halben Preis erhältlich(15.09.2026 um 08:05 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
🪟 Windows TippsProfi-Edelstahlpfanne von WMF jetzt zum halben Preis erhältlich(15.09.2026 um 08:05 Uhr)

🔧 AI Nachrichten 🕛 vor 3 Jahren 10 Min Lesezeit
0

LangChain has added Cypher Search

↗ Quelle (towardsdatascience.com)
🗣️ Stimme:

With the LangChain library, you can conveniently generate Cypher queries, enabling an efficient retrieval of information from Neo4j.

Image generated by Midjourney paid subscription. . LangChain library is the most widely known Python library used to develop applications that use LLMs in one or another capabilities. It is designed to be modular, allowing us to use any LLM in any available modules, such as chains, tools, memory, or agents.

A month ago, I spent a week researching and implementing a solution allowing anyone to retrieve information from .

A colleague of mine showed me a LangChain feature request, where the user requested that my work of having the option to retrieve information from the Neo4j database would be added as a module directly to the LangChain library so that no additional code or external modules would be needed to integrate Neo4j into LangChain applications. Since I was already familiar with LangChain internals, I decided to try and implement Cypher searching capabilities myself. I spent a weekend researching and coding the solution and ensuring it would conform to the contribution standards for it to be added to the library. Luckily, the maintainers of LangChain are very responsive and open to new ideas, and the Cypher Search has been added in the latest release of the LangChain library. Thanks to .

What is a knowledge graph

LangChain has already integrations with Vector and SQL databases, so why do we need an integration with a Graph Database like Neo4j?

, which offers a free cloud instance of a Neo4j database. You need to register and instantiate any of the available pre-populated databases. I will be using the as part of their .

Let’s start with a simple test.

chain.run("""
Which intermediary is connected to most entites?
""")

Results

Generated answer. Image by the author.

We can observe the generated Cypher statement and the retrieved information from Neo4j used to form the answer. That is as easy a setup as it gets. Let’s move on to the next example.

chain.run("""
Who are the officers of ZZZ-MILI COMPANY LTD.?
""")

Results

Generated answer. Image by the author.

Unfortunately, I wasn’t aware of this behavior during the PR. The Cypher statement was correctly generated, and the data was retrieved from the database. However, the answer-generating prompt is set up in a way where it needs explicit confirmation of the answer in the provided context. However, with the Cypher Search, we might only get relevant results, not the whole context. Not to worry, we can adjust the answer-generating prompt to let it know that the provided context always contains an answer.

from langchain.prompts.prompt import PromptTemplate
prompt_template = """
You are an assistant that helps to form nice and human understandable answers.
The information part contains the provided information that you can use to construct an answer.
The provided information is authorative, you must never doubt it or try to use your internal knowledge to correct it.
Make it sound like the information are coming from an AI assistant, but don't add any information.
Information:
{context}

Question: {question}
Helpful Answer:"""

QA_PROMPT = PromptTemplate(
template=prompt_template, input_variables=["context", "question"]
)

chain_improved = GraphCypherQAChain.from_llm(
ChatOpenAI(temperature=0), graph=graph, verbose=True,
qa_prompt=QA_PROMPT
)

This is the prompt I used in my other projects. Let’s rerun the question using the new answer-generating prompt.

chain_improved.run("""
Who are the officers of ZZZ-MILI COMPANY LTD.?
""")

Results

Generated answer. Image by the author.

Using the new prompt, the Cypher Search module returned a valid answer.

I have already .


on Medium, where people are continuing the conversation by highlighting and responding to this story.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf towardsdatascience.com.
↗ Original-Artikel auf towardsdatascience.com lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
The Gemini desktop app is now available for Windows
1 Quelle
Burn Out, Or Fade Away
1 Quelle
Windows 11 KB5129195 is out after Microsoft confirms major issues with the September 2026 update, but it won’t fix AMD GPU errors
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten LangChain has added Cypher Search

Thematisch verwandte Begriffe: LangChain, added, Cypher, Search · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...