Skip to main content

Graphreader Implementation

Project description

Graphreader

Graphreader is a Python library that allows you to read and write data from a Neo4j database. It is built on top of the Langgraph/LangChain library, which provides a framework for building language models. It is based on Medium article Implementing GraphReader with Neo4j and LangGraph

Getting started

  1. Install the library using pip:

    pip install graphreader_agentic_rag
    
  2. Configure environment variables (.env):

    • OPENAI_API_KEY='your-openai-api-key'
    • OPENAI_MODEL_NAME='gpt-4o-mini'
    • NEO4J_URI="neo4j+s://xxxxxxxx.databases.neo4j.io"
    • NEO4J_USERNAME=neo4j
    • NEO4J_PASSWORD='your-neo4j-password'
    • ITERATION_LIMIT=12

Iteration limit is used to control the number of iterations that the agent will perform. This avoids infinite loops. If not specified, the default value is 10 iterations. Langgraph use 25 iterations. If the value higher than 25, it will cause an error.

  1. Import data:

To import data, you can use the import.ipynb Jupyter notebook available in the examples folder of the repository. There, three methods for data import are provided:

  • Text: Import text.
  • A single file: Import a specific file.
  • All files in a folder: Import all available files in a folder.

Currently, only files in the txt format are supported. This allows you to reprocess your original files using the tool of your choice.

  1. Run the agent:

To run the agent, use the agent.ipynb Jupyter notebook available in the examples folder of the repository.

Roadmap

  • [] Memgraph integration
  • [] Customizable prompting for agents

Add your files

Roadmap

If you have ideas for releases in the future, it is a good idea to list them in the README.

from graphreader.chains.neo4j_utils import result_sources

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

graphreader_agentic_rag-0.1.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphreader_agentic_rag-0.1.1-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file graphreader_agentic_rag-0.1.1.tar.gz.

File metadata

  • Download URL: graphreader_agentic_rag-0.1.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.8.0-48-generic

File hashes

Hashes for graphreader_agentic_rag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 702df4d31e1d3df6f3211ae5768449a69192f333809a258ffe305a6572a2c176
MD5 a4ca67da22a56c5a7850c707e9b331d8
BLAKE2b-256 57e79594a65f4fbc32b7c648f2cfa6b217b2dbca9db40d6456e95d910086fb44

See more details on using hashes here.

File details

Details for the file graphreader_agentic_rag-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for graphreader_agentic_rag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af0472a6bfb0b021fd3cbea877ae694db4d9076bde323330e9a22ba716da5c35
MD5 a8094338f2782db610b560d4414627b4
BLAKE2b-256 cfaaa0d7d7f06fb418a5a1b4acb8e569e2bbe405058c76f5eaa279b53a8a3af1

See more details on using hashes here.

Supported by

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