Releases: neo4j/neo4j-graphrag-python
Neo4j GraphRAG Package for Python 1.4.3
https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#143
What's New in 1.4.3
- Added the ability to add event listener to get notifications about Pipeline progress.
- Added py.typed so that mypy knows to use type annotations from the
neo4j-graphrag
package.
Changed in 1.4.3
- Changed the default behaviour of
FixedSizeSplitter
to avoid words cut-off in the chunks whenever it is possible. Back to exact size splitter is possible usingapproximate=False
. - Updates tests to work with new Neo4j calendar versioning
neo4j_schema
is now used in custom prompt formatting inText2CypherRetriever
(if provided).
Fixed in 1.4.3
- Fixed a bug in the
AnthropicLLM
class preventing it from being used in GraphRAG pipeline. - Fixed a bug where the
extras
section of a config file was not resolved properly. - Fixed a bug where the LLM producing a valid JSON array was causing the
LLMEntityRelationExtractor
to fail. - Removed the
uuid
package from dependencies (not needed with Python 3).
New Contributors
- @NathalieCharbel made their first contribution in #242
- @koyonkym made their first contribution in #256
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
PyYAML
dependency was missing and has been added.Weaviate
was unintentionally added as a mandatory dependency in previous version, this behavior has been reverted.PyPDF
andfsspec
are not optional anymore so thatSimpleKGPipeline
examples 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_instructions
to the LLM - Added ability to pass
message_history
to the LLM and GraphRAG - Enhanced
PromptTemplate
to add asystem_instruction
parameter.
Changed in 1.4.0
KG Construction Pipeline
- The
id_prefix
ofLexicalGraphConfig
is 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
ERExtractionTemplate
prompt 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_schema
andget_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
relations
andpotential_schema
optional 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:
HybridRetriever
now excludes the embedding property index specified inself.vector_index_name
from the retriever results by default, streamlining the output.
Pipeline Adjustments:
- AsyncDriver Removal: Removed support for
neo4j.AsyncDriver
in the knowledge graph creation pipeline, affectingNeo4jWriter
and related components. Updated examples and unit tests to reflect this change.
Fixed in 1.2.0
Inheritance Correction:
- AzureOpenAIEmbeddings Fix: Resolved an issue where
AzureOpenAIEmbeddings
incorrectly inherited fromOpenAIEmbeddings
. It now correctly inherits fromBaseOpenAIEmbeddings
, ensuring proper functionality and integration.
Retriever Correction:
- Extended Return Properties: Vector and Hybrid retrievers using
return_properties
now 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
QdrantNeo4jRetriever
external retriever for when vectors and saved in the Qdrant vector database - Introduced a
fail_if_exist
option 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
SinglePropertyExactMatchResolver
component allowing to merge entities with exact same property (e.g. name)
Simplified KG Creation:
- Added the
SimpleKGPipeline
class, 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
openai
Python client andnumpy
were required to import any embedder or LLM.
Changed in 1.0.0:
Variable Standardization:
- Changed the value associated to the enum field
OnError.IGNORE
from "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
AzureOpenAILLM
andAzureOpenAIEmbeddings
for seamless use of Azure-hosted OpenAI models. - Vertex AI Integration: Introduced the
VertexAILLM
class 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
PromptTemplate
class 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_text
placeholder, 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
VertexAIEmbeddings
class, ensuring smooth integration.
Text2CypherRetriever Bugs:
- Fixed a bug where the
search
method failed to injectquery_text
from thecustom_prompt
argument. - Converted the
custom_prompt
argument to theText2CypherTemplate
class within theget_search_results
method for better consistency.
Prompt Template Requirements:
- Enforced the presence of the
query_text
argument inText2CypherTemplate
andRAGTemplate
prompt 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
Embedder
class to theneo4j_graphrag.embeddings
directory 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.