Skip to content

[GraphRAG] Implement Query Engine and AI Agent connectors for Contextual Graph Queries #17

@dineshpinto

Description

@dineshpinto
  • Description:
    Develop a query engine that utilizes Neo4j's Cypher query language to support complex, context-aware queries against the structured Flare transaction data. An API layer should be provided to allow AI agents to easily execute these queries and retrieve historical context or relationship information. For example, agents should be able to query for "all transactions related to account X in the past Y days" or "contracts that interacted with contract Z." Integrate the GraphRAG engine directly with the AI agent's reasoning module. This integration will empower agents to query the Neo4j graph database during their decision-making processes, allowing them to incorporate rich, structured historical transaction context.
  • Acceptance Criteria:
    • A set of common and useful Cypher queries is defined and implemented to retrieve insightful contextual information from the graph database.
    • An API (e.g., RESTful endpoints or SDK methods) is exposed, allowing AI agents to execute these Cypher queries or parameterized variations of them.
    • The query engine and API are designed with consideration for performance and scalability.
    • AI agents built with the Flare AI Kit can seamlessly call the GraphRAG query API (developed in Issue 17).
    • Data retrieved from the graph database (e.g., transaction histories, account relationships) can be easily incorporated into the agent's operational context and used in its reasoning process.
    • The integration supports real-time (or near real-time) contextual augmentation of agent capabilities based on blockchain transaction history.
  • Key Files/Modules Involved (Tentative):
    • flare_ai_kit/rag/graph/engine.py (New file to be created)
  • Tasks / Implementation Steps:
    • Create Key files
    • Use Neo4j's Cypher query language to allow AI agents to craft queries to retrieve historical context or relationship information.

Metadata

Metadata

Assignees

Labels

component:graph-ragonlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions