Releases: neo4j/neo4j-graphrag-python
Neo4j GraphRAG Package for Python 1.4.2
Neo4j GraphRAG Package for Python 1.4.2
Fixed in 1.4.2
Ollama Embedding
Fixed a bug where OllamaEmbedding.embed_query method was returning a list[list[float]] instead of list[float].
Neo4j GraphRAG Package for Python 1.4.1
Neo4j GraphRAG Package for Python 1.4.1
Fixed in 1.4.1
Dependencies
PyYAMLdependency was missing and has been added.Weaviatewas unintentionally added as a mandatory dependency in previous version, this behavior has been reverted.PyPDFandfsspecare not optional anymore so thatSimpleKGPipelineexamples can run out of the box.
Neo4j GraphRAG Package for Python 1.4.0
What's New in 1.4.0
https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#140
LLM Interface and GraphRAG
- Added ability to pass 
system_instructionsto the LLM - Added ability to pass 
message_historyto the LLM and GraphRAG - Enhanced 
PromptTemplateto add asystem_instructionparameter. 
Changed in 1.4.0
KG Construction Pipeline
- The 
id_prefixofLexicalGraphConfigis not used anymore and will be removed in a future version. 
Fixed in 1.4.0
KG Construction Pipeline
- Fixed a bug where the chunk IDs were not unique and too many relationships were created in the lexical graph (between chunks and between entities and chunks). Now chunk IDs are UUIDs, truly unique, even for multiple runs on the same document or running the pipeline on multiple documents.
 
Neo4j GraphRAG Package for Python 1.3.0
https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#130
What's New in 1.3.0
Entity and Relation Extraction Improvements
- Updated LLM prompt for Entity and Relation extraction to include stricter instructions for generating valid JSON.
 - Integrated json-repair package to handle and repair invalid JSON generated by LLMs.
 - Introduced InvalidJSONError exception for handling cases where JSON repair fails.
 
SimpleKGPipeline from config files
- Added the ability to create a Pipeline or SimpleKGPipeline from a config file. See the example.
 
Ollama support
- Added OllamaLLM and OllamaEmbeddings classes to make Ollama support more explicit.
- Implementations using the OpenAILLM and OpenAIEmbeddings classes will still work.
 
 
Changed in 1.3.0
- The default prompt in the 
ERExtractionTemplateprompt template has been updated to include more instructions about the expected return format. 
Fixed in 1.3.0
Documentation
- Added schema functions to the documentation (
get_structured_schemaandget_schema) - Improved documentation around the 
Text2CypherTemplate:- Class added to the API doc
 - New example showcasing how to use a custom prompt
 
 
Neo4j GraphRAG Package for Python 1.2.1
https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#121
What's New in 1.2.1
SimpleKGPipeline improvements
- Ability to provide description and list of properties for entities and relations in the schema
 - Optional lexical graph config parameter, enhancing flexibility in customizing node labels and relationship types in the lexical graph.
 
Neo4j database configuration
New optional neo4j_database parameter for SimpleKGPipeline, Neo4jChunkReader and Text2CypherRetriever.
Changed in 1.2.1
Query routing for Neo4j clusters
- All READ queries are now routed to a reader replica (for clusters). This impacts all retrievers, the Neo4jChunkReader and SinglePropertyExactMatchResolver components.
 
Fixed in 1.2.1
Use of Neo4j database
- neo4j_database parameter is now used for all queries in the Neo4jWriter.
 
Updated examples
- Updated all examples to use neo4j_database parameter instead of an undocumented neo4j driver constructor.
 
Neo4j GraphRAG Package for Python 1.2.0
https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#120
What's New in 1.2.0
Enhanced Schema Building:
- Optional Relations and Schema: Made 
relationsandpotential_schemaoptional in theSchemaBuilder, providing greater flexibility in knowledge graph construction. 
Deprecation Safeguards:
- Cypher Syntax Check: Added a mechanism to prevent the use of deprecated Cypher syntax for Neo4j versions 5.23.0 and above, ensuring compatibility with future Neo4j releases.
 
New Components:
- LexicalGraphBuilder: Enables the import of the lexical graph (documents and chunks) without performing entity and relation extraction.
 - Neo4jChunkReader: Facilitates reading chunk text directly from the Neo4j database.
 
Changed in 1.2.0
Retriever Enhancements:
- Embedding Property Filtering: 
HybridRetrievernow excludes the embedding property index specified inself.vector_index_namefrom the retriever results by default, streamlining the output. 
Pipeline Adjustments:
- AsyncDriver Removal: Removed support for 
neo4j.AsyncDriverin the knowledge graph creation pipeline, affectingNeo4jWriterand related components. Updated examples and unit tests to reflect this change. 
Fixed in 1.2.0
Inheritance Correction:
- AzureOpenAIEmbeddings Fix: Resolved an issue where 
AzureOpenAIEmbeddingsincorrectly inherited fromOpenAIEmbeddings. It now correctly inherits fromBaseOpenAIEmbeddings, ensuring proper functionality and integration. 
Retriever Correction:
- Extended Return Properties: Vector and Hybrid retrievers using 
return_propertiesnow also return the node labels (nodeLabels) and the node's element ID (id), enriching the retriever results with additional metadata. 
Neo4j GraphRAG Package for Python 1.1.0
https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#110
Added
- Added a 
QdrantNeo4jRetrieverexternal retriever for when vectors and saved in the Qdrant vector database - Introduced a 
fail_if_existoption to index creation functions to control behavior when an index already exists. 
Changed
- Comprehensive rewrite of the README to improve clarity and provide detailed usage examples.
 - Documentation improvements
 
Neo4j GraphRAG package for Python 1.0.0
Neo4j GraphRAG Package for Python 1.0.0
https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#100
What's New in 1.0.0:
Additional Pipeline Components:
- Added 
SinglePropertyExactMatchResolvercomponent allowing to merge entities with exact same property (e.g. name) 
Simplified KG Creation:
- Added the 
SimpleKGPipelineclass, a simplified abstraction layer to streamline knowledge graph building processes from text documents 
Fixed in 1.0.0:
Import Errors:
- Fix a bug where the 
openaiPython client andnumpywere required to import any embedder or LLM. 
Changed in 1.0.0:
Variable Standardization:
- Changed the value associated to the enum field 
OnError.IGNOREfrom "CONTINUE" to "IGNORE" to stick to the convention and match the field name. 
Neo4j GraphRAG package for Python 0.7.0
Neo4j GraphRAG Package for Python 0.7.0
https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#070
What's New in 0.7.0:
Expanded LLM Support:
- Azure Integration: Added 
AzureOpenAILLMandAzureOpenAIEmbeddingsfor seamless use of Azure-hosted OpenAI models. - Vertex AI Integration: Introduced the 
VertexAILLMclass to integrate Vertex AI models, along with corresponding unit tests. - Additional LLMs: Added support for Cohere, Anthropic, and MistralAI LLMs, expanding the range of available language models.
 
Enhanced Pipeline Components:
- Fixed Size Text Splitter: Introduced a fixed size text splitter for more consistent text chunking with overlap, improving text processing in pipelines.
 - Prompt Template Validation: Implemented validation in the 
PromptTemplateclass to ensure templates contain necessary placeholders upon construction. 
Improved Retriever Functionality:
- Custom Prompt Enhancements: Enabled passing keyword arguments (
kwargs) toText2CypherRetriever.search(), allowing dynamic injection into custom prompts. - Prompt Validation: Ensured that custom prompts include the 
query_textplaceholder, enhancing prompt reliability. 
Examples and Documentation:
- RAG Pipeline Examples: Updated examples to demonstrate the use of Mistral embeddings and LLMs within Retrieval-Augmented Generation (RAG) pipelines.
 
Fixed in 0.7.0:
Import and Integration Fixes:
- Resolved import issues with the 
VertexAIEmbeddingsclass, ensuring smooth integration. 
Text2CypherRetriever Bugs:
- Fixed a bug where the 
searchmethod failed to injectquery_textfrom thecustom_promptargument. - Converted the 
custom_promptargument to theText2CypherTemplateclass within theget_search_resultsmethod for better consistency. 
Prompt Template Requirements:
- Enforced the presence of the 
query_textargument inText2CypherTemplateandRAGTemplateprompt templates, issuing errors if missing and warning about deprecated aliases. 
Neo4jWriter Enhancements:
- Fixed errors related to improperly defined start or end node IDs.
 - Ensured relationship types are correctly escaped in Cypher insert queries.
 - Improved query performance for faster execution.
 
Changed in 0.7.0:
Codebase Organization:
- Moved the 
Embedderclass to theneo4j_graphrag.embeddingsdirectory for better alignment with other custom embedders. 
Python Version Support:
- Dropped support for Python 3.8 due to its end-of-life status. Users are encouraged to upgrade to Python 3.9 or later for continued support and feature access.
 
Neo4j GraphRAG package for Python 0.6.2
Major Improvements and Package Renaming
https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#062
This release introduces a series of important updates, including the official renaming of the package from neo4j-genai to neo4j-graphrag, improvements to dependency management, and new functionality for pipeline visualization.
What's New in 0.6.2:
- Dependency Fix: 
pygraphvizis now correctly listed as an optional dependency. This resolves installation issues that previously requiredpygraphvizunnecessarily. 
Notable Changes in 0.6.1:
- Package Rename: The 
neo4j-genaipackage is officially deprecated and renamed toneo4j-graphrag. For users of the old package, please visit the final release of neo4j-genai. - Migration Note: Users are encouraged to migrate to 
neo4j-graphragfor future updates and improvements. 
Highlights from 0.6.0:
- Pipeline Visualization: You can now visualize your pipelines with the new feature 
my_pipeline.draw("pipeline.png"). - Improved Parallel Execution: Fixed a bug where running pipelines in parallel returned incorrect results.
 - Pipeline Enhancements: The run method now returns a PipelineResult object, and parameter validation is improved to catch errors before execution.