Giter Club home page Giter Club logo

graph_llm's Introduction

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.

View Demos here

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

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!

graph_llm's People

Contributors

noahmay avatar tomasonjo avatar oskarhane avatar jharris4 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.