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

Documentation WIP #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
The aim of the project is to create a knowledge graph for Scientific documents. This is linked directly to the challenge https://github.com/ECMWFCode4Earth/challenges_2024/issues/7



## Overview
The project aims to enhance the user experiences of ECMWF’s experimental AI-based assistant. ECMWF chatbox based on GPT provides users with an intuitive and easy-to-use self-service chat-like interface to get their questions answered without the need to contact the dedicated support services. The application of GPT can generate human-like answers. However, like almost all other LLMs, their responses are not always reliable.

The construction of a knowledge graph and its integration into the chatbot is promising to improve the reliability of this conversational assistant’s responses. Besides, a tool that generates interactive graphs can help users summarise the idea behind the answers. Additionally, knowledge graphs can also help beginners to easily catch the scientific terms, ideas, and an overview of the domain.

In detail, the knowledge graphs will be constructed from various datasets, including scientific literature, weather data, domain-specific ontologies, etc.

In the end, this project will provide the ECMWF chatbot with a knowledge graph database.

## Features

Expand All @@ -22,6 +27,39 @@ To install necessary packages run:
pip install -r requirements.txt
```

### Neo4j :

We highly recommend you to use Neo4j Desktop if it is available for you due to its simplicity and UI interactions.

Installing Neo4j Desktop is fairly easy. You can follow this link to download and install it :
https://neo4j.com/docs/desktop-manual/current/installation/

Once Neo4j is installed, you can set up your own new local database as following :
- First, open Neo4j Desktop
- Click on Projects, then New (the field with a + symbol) to create a new project
- Then, on your project, click on button **Add** and select **Local DBMS**, set up the name and password as you like, and finally click on **Create** to create the database
- Each time that you want to run the app and/or work on the database, don't forget to start the database first by clicking (or hovering) on the database, and click **Start**

To run and use the app, you will need to install certain plugins of Neo4j :

#### APOC
More details here : https://neo4j.com/labs/apoc/4.1/installation/

But, in brief, you can do as follow :

- APOC Core : APOC Core can be installed by moving the APOC jar file from the $NEO4J_HOME/labs directory to the $NEO4J_HOME/plugins directory and restarting Neo4j.
- Neo4j Desktop : APOC Full can be installed with Neo4j Desktop, after creating your database, by going to the Manage screen, and then the Plugins tab. Click Install in the APOC box and wait until you see the "Installed" message.

#### Graph-Data-Science

More details here : https://neo4j.com/docs/graph-data-science/current/installation/

Similar to APOC, you have several ways to install the library Graph-Data-Science :

- If you use Neo4j Desktop, you can install it from the UI, similarly to APOC
- If you run Neo4j in a Docker container, you need to configure the GDS library as a Neo4j Docker plugin
- If you use Neo4j Server (Community or Enterprise), you need to install the GDS library manually. Please follow the link above for more details !

## Usage

Explain how to use the Knowledge Graph, including any specific commands, APIs, or interfaces available.
Expand Down
11 changes: 11 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Run the App :

### Step 1 :
Run script ***`/upload_db/test_create_vector_db.py`*** to initialize embedded vectors in database

# Step 2 :
Run script ***`/frontend/combine_test.py`*** with Streamlit to run the app. The command is as below :
```
streamlit run /frontend/combine_test.py
```
A page will be opened in the web browser where you can ask questions, get answers from OpenAI and related knowledge graphs generated by Neo4j from your database