Types¶
RawSearchResult¶
RetrieverResult¶
- class neo4j_graphrag.types.RetrieverResult(*, items, metadata=None)[source]¶
- Represents a result returned from a retriever. - Parameters:
- items (list[RetrieverResultItem]) 
 
 - items¶
- A list of retrieved items. - Type:
 
 
RetrieverResultItem¶
LLMResponse¶
LLMMessage¶
RagResultModel¶
- class neo4j_graphrag.generation.types.RagResultModel(*, answer, retriever_result=None)[source]¶
- Parameters:
- answer (str) 
- retriever_result (RetrieverResult | None) 
 
 
DocumentInfo¶
TextChunk¶
TextChunks¶
Neo4jNode¶
Neo4jRelationship¶
Neo4jGraph¶
- class neo4j_graphrag.experimental.components.types.Neo4jGraph(*, nodes=[], relationships=[])[source]¶
- Represents a Neo4j graph. - Parameters:
- relationships (list[Neo4jRelationship]) 
 
 - relationships¶
- A list of relationships in the graph. - Type:
 
 
KGWriterModel¶
PropertyType¶
NodeType¶
RelationshipType¶
- class neo4j_graphrag.experimental.components.schema.RelationshipType(*, label, description='', properties=[], additional_properties=<factory>)[source]¶
- Represents a possible relationship between nodes in the graph. - Parameters:
- label (str) 
- description (str) 
- properties (list[PropertyType]) 
- additional_properties (bool) 
 
 
GraphSchema¶
- class neo4j_graphrag.experimental.components.schema.GraphSchema(*, node_types, relationship_types=(), patterns=(), additional_node_types=<factory>, additional_relationship_types=<factory>, additional_patterns=<factory>)[source]¶
- This model represents the expected node and relationship types in the graph. - It is used both for guiding the LLM in the entity and relation extraction component, and for cleaning the extracted graph in a post-processing step. - Warning - This model is immutable. 
LexicalGraphConfig¶
- class neo4j_graphrag.experimental.components.types.LexicalGraphConfig(*, id_prefix='', document_node_label='Document', chunk_node_label='Chunk', chunk_to_document_relationship_type='FROM_DOCUMENT', next_chunk_relationship_type='NEXT_CHUNK', node_to_chunk_relationship_type='FROM_CHUNK', chunk_id_property='id', chunk_index_property='index', chunk_text_property='text', chunk_embedding_property='embedding')[source]¶
- Configure all labels and property names in the lexical graph. 
Neo4jDriverType¶
- class neo4j_graphrag.experimental.pipeline.config.object_config.Neo4jDriverType(root=PydanticUndefined)[source]¶
- A model to wrap neo4j.Driver and Neo4jDriverConfig objects. - The parse method always returns a neo4j.Driver. - Parameters:
- root (Driver | Neo4jDriverConfig) 
 
Neo4jDriverConfig¶
LLMType¶
- class neo4j_graphrag.experimental.pipeline.config.object_config.LLMType(root=PydanticUndefined)[source]¶
- A model to wrap LLMInterface and LLMConfig objects. - The parse method always returns an object inheriting from LLMInterface. - Parameters:
- root (LLMInterface | LLMConfig) 
 
LLMConfig¶
EmbedderType¶
- class neo4j_graphrag.experimental.pipeline.config.object_config.EmbedderType(root=PydanticUndefined)[source]¶
- A model to wrap Embedder and EmbedderConfig objects. - The parse method always returns an object inheriting from Embedder. - Parameters:
- root (Embedder | EmbedderConfig) 
 
EmbedderConfig¶
ComponentType¶
- class neo4j_graphrag.experimental.pipeline.config.object_config.ComponentType(root=PydanticUndefined)[source]¶
- Parameters:
- root (Component | ComponentConfig) 
 
ComponentConfig¶
ParamFromEnvConfig¶
EventType¶
- enum neo4j_graphrag.experimental.pipeline.notification.EventType(value)[source]¶
- Valid values are as follows: - PIPELINE_STARTED = <EventType.PIPELINE_STARTED: 'PIPELINE_STARTED'>¶
 - TASK_STARTED = <EventType.TASK_STARTED: 'TASK_STARTED'>¶
 - TASK_PROGRESS = <EventType.TASK_PROGRESS: 'TASK_PROGRESS'>¶
 - TASK_FINISHED = <EventType.TASK_FINISHED: 'TASK_FINISHED'>¶
 - PIPELINE_FINISHED = <EventType.PIPELINE_FINISHED: 'PIPELINE_FINISHED'>¶
 - PIPELINE_FAILED = <EventType.PIPELINE_FAILED: 'PIPELINE_FAILED'>¶
 
PipelineEvent¶
TaskEvent¶
EventCallbackProtocol¶
TaskProgressCallbackProtocol¶
RunContext¶
- class neo4j_graphrag.experimental.pipeline.types.context.RunContext(*, run_id, task_name, notifier=None)[source]¶
- Context passed to the component - Parameters:
- run_id (str) 
- task_name (str) 
- notifier (TaskProgressNotifierProtocol | None)