Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harrison/cypher #5078

Merged
merged 4 commits into from
May 22, 2023
Merged

Harrison/cypher #5078

merged 4 commits into from
May 22, 2023

Conversation

hwchase17
Copy link
Contributor

No description provided.

tomasonjo and others added 3 commits May 21, 2023 21:23
# Add Neo4j support and Cypher generating Chain

The idea is to add support for querying Graph Databases that use Cypher
query language like Neo4j.
Since queries need to be constructed at query time, we use a similar
approach as the text2sql, but instead of generating SQL statements, we
generate Cypher statements based on the provided graph schema, which
makes this a generic solution.

# Todo

- [x] Integration test
- [x] Better exception handling 


Fixes # (issue)
#4625

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
@@ -0,0 +1,100 @@
from typing import Any, Dict, List
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hwchase17 should this be in graphs module or just utilities? afaict just api wrapper

@dev2049 dev2049 merged commit 10ba201 into master May 22, 2023
@dev2049 dev2049 deleted the harrison/cypher branch May 22, 2023 14:31
@crazyyanchao
Copy link

Very cool contribution!

@danielchalef danielchalef mentioned this pull request Jun 5, 2023
This was referenced Jun 25, 2023
@felixocker felixocker mentioned this pull request Jul 4, 2023
hwchase17 pushed a commit that referenced this pull request Jul 5, 2023
# [SPARQL](https://www.w3.org/TR/rdf-sparql-query/) for
[LangChain](https://github.com/hwchase17/langchain)

## Description
LangChain support for knowledge graphs relying on W3C standards using
RDFlib: SPARQL/ RDF(S)/ OWL with special focus on RDF \
* Works with local files, files from the web, and SPARQL endpoints
* Supports both SELECT and UPDATE queries
* Includes both a Jupyter notebook with an example and integration tests

## Contribution compared to related PRs and discussions
* [Wikibase agent](#2690) -
uses SPARQL, but specifically for wikibase querying
* [Cypher qa](#5078) - graph
DB question answering for Neo4J via Cypher
* [PR 6050](#6050) - tries
something similar, but does not cover UPDATE queries and supports only
RDF
* Discussions on [w3c mailing list](mailto:semantic-web@w3.org) related
to the combination of LLMs (specifically ChatGPT) and knowledge graphs

## Dependencies
* [RDFlib](https://github.com/RDFLib/rdflib)

## Tag maintainer
Graph database related to memory -> @hwchase17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants