Skip to content

Releases: neo4j/neo4j-graphrag-python

Neo4j GraphRAG Package for Python 1.3.0

16 Dec 14:18
Compare
Choose a tag to compare

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 and get_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

26 Nov 10:28
Compare
Choose a tag to compare

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

28 Oct 11:11
Compare
Choose a tag to compare

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 and potential_schema optional in the SchemaBuilder, 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 in self.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, affecting Neo4jWriter 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 from OpenAIEmbeddings. It now correctly inherits from BaseOpenAIEmbeddings, 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

16 Oct 09:13
Compare
Choose a tag to compare

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

08 Oct 10:36
Compare
Choose a tag to compare

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 and numpy 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

02 Oct 12:40
Compare
Choose a tag to compare

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 and AzureOpenAIEmbeddings 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) to Text2CypherRetriever.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 inject query_text from the custom_prompt argument.
  • Converted the custom_prompt argument to the Text2CypherTemplate class within the get_search_results method for better consistency.

Prompt Template Requirements:

  • Enforced the presence of the query_text argument in Text2CypherTemplate and RAGTemplate 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 the neo4j_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.

Neo4j GraphRAG package for Python 0.6.2

17 Sep 12:48
Compare
Choose a tag to compare

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: pygraphviz is now correctly listed as an optional dependency. This resolves installation issues that previously required pygraphviz unnecessarily.

Notable Changes in 0.6.1:

  • Package Rename: The neo4j-genai package is officially deprecated and renamed to neo4j-graphrag. For users of the old package, please visit the final release of neo4j-genai.
  • Migration Note: Users are encouraged to migrate to neo4j-graphrag for 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.

Neo4j GenAI package for Python 0.5.0

03 Sep 14:33
Compare
Choose a tag to compare

https://github.com/neo4j/neo4j-genai-python/blob/main/CHANGELOG.md#050

Minor Changes

  • Experimental Knowledge Graph Constructor: Introduces a PDF-to-knowledge-graph constructor in experimental mode. This constructor uses a flexible component/pipeline architecture and includes components such as text splitters, a schema builder, an entity-relation extractor, and a Neo4j database writer.
  • Hybrid Retriever Fix: Fixes the hybrid retriever query to ensure proper normalization of scores returned by both vector and full-text indexes.

Neo4j GenAI package for Python 0.4.0

08 Aug 12:02
Compare
Choose a tag to compare

https://github.com/neo4j/neo4j-genai-python/blob/main/CHANGELOG.md#040

Minor Changes

  • Introduced an optional custom_prompt argument to the Text2CypherRetriever class for enhanced customization capabilities.
  • Renamed the first parameter of GraphRAG.search from query to query_text for consistency, while ensuring backward compatibility with deprecation warnings for the query parameter.

Neo4j GenAI package for Python 0.3.1

11 Jul 09:05
Compare
Choose a tag to compare

https://github.com/neo4j/neo4j-genai-python/blob/main/CHANGELOG.md#031

Patch Changes

  • OpenAIEmbedding fixes: Fixed embedding model initialization and removed unused import to prevent ImportError when sentence_transformers is not installed.