• Stars
    star
    952
  • Rank 46,256 (Top 1.0 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created about 1 year ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Repository for the NaLLM project

Project NaLLM

Welcome to the NaLLM project repository, where we are exploring and demonstrating the synergies between Neo4j and Large Language Models (LLMs). As a part of our ongoing project, we are focusing on three primary use cases - a Natural Language Interface to a Knowledge Graph, Creating a Knowledge Graph from Unstructured Data and Generate a Report using both static data and data from LLM.

This repository houses both backend and frontend code, designed and organized to facilitate an intuitive journey through our project.

Blog posts

During this project we're also writing blog posts where we deep dive into our learnings and explorations.

  1. https://medium.com/neo4j/harnessing-large-language-models-with-neo4j-306ccbdd2867
  2. https://medium.com/neo4j/knowledge-graphs-llms-fine-tuning-vs-retrieval-augmented-generation-30e875d63a35
  3. https://medium.com/neo4j/knowledge-graphs-llms-multi-hop-question-answering-322113f53f51
  4. https://medium.com/neo4j/knowledge-graphs-llms-real-time-graph-analytics-89b392eaaa95
  5. https://medium.com/neo4j/construct-knowledge-graphs-from-unstructured-text-877be33300a2

Repository Structure

Our repository is designed with an efficient and logical structure for ease of navigation:

  • Backend Code: The backend code is found in the api folder in the main.py file you can find all endpoints and their corresponding functions. All LLM functionality is split into different components which have thier own purpose.

  • Frontend Code: The frontend code is organized into two folders - one for each use case these can be found in ui/src. Each folder contains separate React applications that are independent from each other.

Running the Demos

To simplify the process of running the demos, we have incorporated scripts that generate Docker images. To use these, you'll need to:

  1. Navigate into the root directory.
  2. Create an env file. You can use the env.example file as a template. (The open API key is optional and can be provided from the UI instead)
  3. run docker-compose up to build the images.

This will start the backend and frontend servers, and you can access the demos at the following URLs:

Please note that you'll need Docker installed on your machine to build and run these images. If you haven't already, you can download Docker from here.

Demo database

There is a demo databasing running on demo.neo4jlabs.com. This database is a set of compnaies, thier subsidaiers, people related to the companies and articles mentioned the compnaies. The database is a subset of the Diffbot knowledge graph. You can access it with the following credentaiils:

URI: neo4j+s://demo.neo4jlabs.com
username: companies
password: companies
database: companies

Graph schema

The database contains both structured information about organizations and people as well as news articles. The news articles are linked to the mentioned entity, while the actual text is stored in the Chunk nodes alongside their text-embedding-ada-002 vector representations.

Bring your own database

To run the project on your own database, follow these two steps:

  1. Set appropriate database credentials in .env file
  2. Remove or set appropriate Cypher examples in api/fewshot_examples.py file

Contributing

We welcome contributions and feedback to improve our project and demonstrations. Please feel free to raise issues or submit pull requests.

Note

We want to emphasize that the field of AI and specifically LLMs is rapidly evolving. As such, the information, assumptions, and code contained within this repository are based on our current understanding and are subject to change as new data and technological advancements become available.

Thank you for your interest in our project. We hope you find this repository useful and informative. Stay tuned for more updates as we continue to explore the fascinating world of Neo4j and LLMs!

More Repositories

1

neo4j

Graphs for Everyone
Java
12,473
star
2

neo4j-python-driver

Neo4j Bolt driver for Python
Python
864
star
3

neo4j-javascript-driver

Neo4j Bolt driver for JavaScript
JavaScript
832
star
4

neo4j-browser

Neo4j Browser is the general purpose user interface for working with Neo4j. Query, visualize, administrate and monitor the database.
TypeScript
651
star
5

graph-data-science

Source code for the Neo4j Graph Data Science library of graph algorithms.
Java
585
star
6

graphql

A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations.
TypeScript
485
star
7

neo4j-go-driver

Neo4j Bolt Driver for Go
Go
476
star
8

neo4j-java-driver

Neo4j Bolt driver for Java
Java
322
star
9

neo4j-ogm

Java Object-Graph Mapping Library for Neo4j
Java
322
star
10

docker-neo4j

Docker Images for the Neo4j Graph Database
Shell
307
star
11

neo4j-dotnet-driver

Neo4j Bolt driver for .NET
C#
218
star
12

graph-data-science-client

A Python client for the Neo4j Graph Data Science (GDS) library
Python
168
star
13

neo4j-documentation

Scala
99
star
14

trillion-graph

A scale demo of Neo4j Fabric spanning up to 1129 machines/shards running a 100TB (LDBC) dataset with 1.2tn nodes and relationships.
Java
89
star
15

cypher-shell

Cypher Shell has moved to https://github.com/neo4j/neo4j
Java
88
star
16

docker-neo4j-publish

Shell
82
star
17

sdn-rx

Nextgen Spring Data module for Neo4j supporting (not only) reactive data access and immutable support
Java
66
star
18

apoc

Java
63
star
19

helm-charts

Go
51
star
20

cypher-editor

Codemirror editor for Cypher, with syntax awareness and auto-completion
JavaScript
41
star
21

cypher-builder

A programmatic API for building Cypher queries for Neo4j.
TypeScript
35
star
22

neo4j-java-driver-spring-boot-starter

Automatic configuration of Neo4j's Java Driver for Spring Boot applications
Java
35
star
23

cypher-language-support

Neo4j's Cypher Language support
TypeScript
24
star
24

neo4j-example-auth-plugins

Example authentication and authorization plugins for Neo4j
Java
17
star
25

graphql-tracker-temp

This is a temporary repository for documentation and tracking issues for the @neo4j/graphql package until that repo is made public
12
star
26

graph-schema-introspector

This is a Proof of concept (PoC) for a Neo4j schema introspector that produces output in JSON format validating against graph-schema-json-js-utils.
Java
11
star
27

neo4j-ogm-quarkus

Quarkus extension to that allows proper usage of Neo4j-OGM inside Quarkus.
Java
10
star
28

docs-drivers

Neo4j Drivers Documentation
HTML
8
star
29

windows-wrapper

A service wrapper for windows
Java
8
star
30

neo4j.github.com

Web published resources
HTML
7
star
31

docs-cypher

Neo4j Cypher Documentation
JavaScript
7
star
32

docs-bolt

Neo4j Bolt Protocol Documentation
JavaScript
6
star
33

jsr311-api

Forked from revision 612
Java
6
star
34

dappr

Distributed Approximate Personalised PageRank
Jupyter Notebook
5
star
35

doctools

Perl
5
star
36

neo4j-jdbc

Official Neo4j JDBC Driver (EAP)
Java
5
star
37

github-action-traceability

TypeScript
4
star
38

graph-schema-json-js-utils

Utility library to work with the Graph Schema JSON representation
TypeScript
4
star
39

parents

Neo4j Build Configuration
4
star
40

docs-operations

Neo4j Operations documentation
JavaScript
3
star
41

docs-getting-started

JavaScript
3
star
42

docs-http-api

Documentation for Neo4j HTTP API
JavaScript
3
star
43

neo4j-aws-terraform

HCL
3
star
44

jbang-catalog

JBang catalog
Java
2
star
45

graphql-toolbox

TypeScript
2
star
46

import-spec

Java
2
star
47

docs-graphql

GraphQL docs
JavaScript
2
star
48

docs-maven-plugin

Java
2
star
49

ease-maven-plugin

Java
2
star
50

license-maven-plugin

Fork of http://code.google.com/p/maven-license-plugin/
Java
2
star
51

docs-status-codes

Documentation for Neo4j status codes
JavaScript
2
star
52

maven-skin

Neo4j Maven Skin
Java
2
star
53

docs-aura

Jupyter Notebook
2
star
54

azure-neo4j

Azure topology files
Shell
1
star
55

clirr-maven-plugin

Java
1
star
56

neo4jtester

neo4j tester
Go
1
star
57

docs-ops-manager

JavaScript
1
star