Skip to main content

A graph database application with embedding and similarity calculations.

Project description

Euler Graph Database - Knowledge Graph Viewer ๐Ÿ“Š

Euler Graph Database

Author โœ๏ธ

Name: Prashant Verma
Email: prashant27050@gmail.com


Table of Contents ๐Ÿ“š

  1. Introduction
  2. Installation
  3. Project Structure
  4. Running the Application
  5. User Guide
  6. Using Euler Database for Knowledge Graph Building
  7. FAQ
  8. Support

Introduction โ„น๏ธ

The Euler Graph Database is a knowledge graph viewer that allows users to create, visualize, and manage knowledge graphs. It provides an interactive graphical user interface (GUI) for performing various operations on the knowledge graph such as adding nodes and edges, executing queries, and visualizing the graph.

Installation ๐Ÿ’ป

  1. Install the Package:
    pip install euler_database
    

Project Structure ๐Ÿ“

euler_graph_database/
โ”œโ”€โ”€ data/
โ”œโ”€โ”€ docs/
โ”œโ”€โ”€ euler/
โ”‚   โ”œโ”€โ”€ experimental/
โ”‚   โ”œโ”€โ”€ function_tools/
โ”‚   โ”œโ”€โ”€ graph_embeddings/
โ”‚   โ”œโ”€โ”€ llm_reader/
โ”‚   โ”œโ”€โ”€ path_finding/
โ”‚   โ”œโ”€โ”€ similarity/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ edge_node.py
โ”‚   โ”œโ”€โ”€ graph_api.py
โ”‚   โ”œโ”€โ”€ knowledge_graph.py
โ”‚   โ”œโ”€โ”€ query_engine.py
โ”‚   โ”œโ”€โ”€ query_executer.py
โ”‚   โ”œโ”€โ”€ query_parser.py
โ”‚   โ”œโ”€โ”€ relationship.py
โ”œโ”€โ”€ examples/
โ”œโ”€โ”€ gui/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ app.py
โ”‚   โ”œโ”€โ”€ gui_navbar.py
โ”‚   โ”œโ”€โ”€ modal_dialog.py
โ”‚   โ”œโ”€โ”€ syntax_highlighter.py
โ”œโ”€โ”€ icons/
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ setup.py

Running the Application ๐Ÿš€

To run the application, use the following command:

eulerdb

User Guide ๐Ÿ“

Main Interface ๐Ÿ–ฅ๏ธ

The main interface of the application consists of the following components:

  • Header: Displays the application name and logo.
  • Navbar: Provides options to load, visualize, add nodes, add edges, save the graph, and display help/about information.
  • Query Entry: A text area to enter queries.
  • Buttons:
    • Execute Query: Executes the entered query.
    • Save Query: Saves the entered queries to a file.
    • Load Query: Loads queries from a file.
  • Output Areas:
    • Query Output: Displays the results of executed queries.
    • JSON Output: Displays the JSON representation of the current graph.

Loading a Graph ๐Ÿ“‚

  1. Click on the Load Graph button in the navbar.
  2. Select the file containing the graph you want to load.

Visualizing a Graph ๐Ÿ”

  1. After loading a graph, click on the Visualize Graph button in the navbar.
  2. The graph will be displayed in the visualization area.

Adding Nodes โž•

  1. Click on the Add Node button in the navbar.
  2. Enter the node ID and label in the prompt that appears.
  3. The node will be added to the graph.

Adding Edges ๐Ÿ”—

  1. Click on the Add Edge button in the navbar.
  2. Enter the edge ID, source node ID, target node ID, and edge label in the prompt that appears.
  3. The edge will be added to the graph.

Saving a Graph ๐Ÿ’พ

  1. Click on the Save Graph button in the navbar.
  2. Choose the location to save the graph file.

Executing Queries ๐Ÿ“‹

  1. Enter your query in the Query Entry area.
  2. Click the Execute Query button.
  3. The result of the query will be displayed in the Query Output area.

Saving Queries ๐Ÿ’ผ

  1. Enter your queries in the Query Entry area.
  2. Click the Save Query button.
  3. Choose the location to save the queries file (with .euler extension).

Loading Queries ๐Ÿ“„

  1. Click the Load Query button.
  2. Select the file containing the queries.
  3. The queries will be loaded into the Query Entry area.

Using Euler Database for Knowledge Graph Building ๐Ÿง 

Creating Chunks of Relational Data ๐Ÿ”—

The Euler Database provides classes to create chunks of relational data, which can be used to build knowledge graphs. By importing and utilizing these classes, you can preprocess your data and represent it in a graph format.

Example:

from euler.graph_api import KnowledgeGraphAPI
from euler.query_parser import QueryParser
from euler.query_executor import QueryExecutor

# Initialize API and related components
api = KnowledgeGraphAPI()
parser = QueryParser(api.graph)
executor = QueryExecutor(api.graph)

# Add nodes and edges
api.create_node('1', 'Person', {'name': 'Alice'})
api.create_node('2', 'Person', {'name': 'Bob'})
api.create_edge('1', '1', '2', 'knows')

# Query the graph
result = executor.execute_query('FIND (n)-[r]->(m)')
print(result)

Building Knowledge Graphs ๐ŸŒ

Using the provided classes, you can build comprehensive knowledge graphs. These graphs can help in organizing information, discovering relationships, and enhancing data analysis.

Benefits:

  • Organized Data: Represent your data in an easily understandable graph format.
  • Relationship Discovery: Identify and explore relationships between different data points.
  • Enhanced Analysis: Use graph-based analysis techniques to gain deeper insights.

GraphRAG (Graph-based Retrieval Augmented Generation) ๐Ÿš€

GraphRAG is a powerful technique that leverages knowledge graphs to enhance information retrieval and generation processes. By building and utilizing knowledge graphs, GraphRAG can provide more accurate and contextually relevant information.

Benefits:

  • Improved Retrieval: Enhance search and retrieval processes by leveraging the structure and relationships in knowledge graphs.
  • Contextual Generation: Generate more relevant and contextually accurate information by utilizing the rich relational data in knowledge graphs.

FAQ โ“

Q: What file formats are supported for saving graphs?
A: The application supports saving graphs in JSON format.

Q: How do I fix module import errors?
A: Ensure you are running the application using eulerdb to correctly set up the module paths.

Q: Can I visualize large graphs?
A: Yes, but performance may vary depending on the size of the graph and the capabilities of your system.

Support ๐Ÿ™‹โ€โ™‚๏ธ

For any issues or questions, please contact:

Name: Prashant Verma
Email: prashant27050@gmail.com

Or visit the GitHub repository for more information and updates.


### Key Additions

- **Using Euler Database for Knowledge Graph Building**: New section detailing how to use the classes provided by the Euler Database package to create chunks of relational data, build knowledge graphs, and leverage GraphRAG.
- **Code Examples**: Example code snippets showing how to use the provided classes to build and query knowledge graphs.

By following this updated `README.md`, users will have a comprehensive guide on how to install, run, use, and extend the `Euler Graph Database` for their knowledge graph needs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

euler_database-1.0.0.tar.gz (29.1 kB view hashes)

Uploaded Source

Built Distribution

euler_database-1.0.0-py3-none-any.whl (33.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page