This module implements the GraphRAG retrieval strategy for the Neuron AI PHP framework.
- PHP: ^8.1
- Neuron: ^3.0
Install the latest version of the package:
composer require neuron-core/graph-retrieval
Return an instance of GraphRetrieval from the RAG method retrieval():
use NeuronAI\RAG\RAG;
use NeuronAI\RAG\Retrieval\RetrievalInterface;
use NeuronAI\RAG\GraphStore\Neo4jGraphStore;
use NeuronCore\GraphRetrieval\GraphRetrieval;
class GraphRAGAgent extends RAG
{
protected function retrieval(): RetrievalInterface
{
return new GraphRetrieval(
$this->resolveVectorStore(),
$this->resolveEmbeddingsProvider(),
$this->resolveProvider(),
new Neo4jGraphStore()
);
}
protected function embeddings(): EmbeddingsProviderInterface
{
return new ...
}
protected function vectorStore(): VectorStoreInterface
{
return new ...
}
}Neuron is a PHP framework for creating and orchestrating AI Agents. It allows you to integrate AI entities in your existing PHP applications with a powerful and flexible architecture. We provide tools for the entire agentic application development lifecycle, from LLM interfaces, to data loading, to multi-agent orchestration, to monitoring and debugging.
In addition, we provide tutorials and other educational content to help you get started using AI Agents in your projects.
