Skip to content

Releases: neo4j/neo4j-graphrag-python

Neo4j GraphRAG Package for Python 1.7.0

28 Apr 17:11
Compare
Choose a tag to compare

New in 1.7.0

Full Changelog: 1.6.1...1.7.0

LLMInterface

  • Added tool calling functionality to the LLM base class with OpenAI and VertexAI implementations, enabling structured parameter extraction and function calling.

Qdrant retriever

  • Added support for multi-vector collection in Qdrant driver.

Entity resolution

  • Added a new semantic match resolver to the KG Builder for entity resolution based on spaCy embeddings and cosine similarities so that nodes with similar textual properties get merged.
  • Added a new fuzzy match resolver to the KG Builder for entity resolution based on RapiFuzz string fuzzy matching.

Pipeline

  • Added a Pipeline.stream method to stream pipeline progress.

Fixed in 1.7.0

  • Fixed a bug where the $nin operator for metadata pre-filtering in retrievers would create an invalid Cypher query.

Changed in 1.7.0

  • Improved log output readability in Retrievers and GraphRAG and added embedded vector to retriever result metadata for debugging.
  • Switched from pygraphviz to neo4j-viz
    • Renders interactive graph now on HTML instead of PNG
    • Removed get_pygraphviz_graph method

New Contributors

Neo4j GraphRAG Package for Python 1.6.1

28 Apr 12:08
Compare
Choose a tag to compare

Added in 1.6.1

  • Added the run_with_context method to Component. This method includes a context_ parameter, which provides information about the pipeline from which the component is executed (e.g., the run_id). It also enables the component to send events to the pipeline's callback function.

Fixed in 1.6.1

  • Added enforce_schema parameter to SimpleKGPipeline for optional schema enforcement.

Neo4j GraphRAG Package for Python 1.6.0

12 Mar 13:00
Compare
Choose a tag to compare

New in 1.6.0

https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#160

Hybrid retrievers

  • Add linear hybrid search ranker to give more weight to either the full text or the vector score.
  • Raise SearchQueryParseError when HybridRetriever and HybridCypherRetriever encounters invalid Lucene string

KG Builder pipeline

  • Add optional schema enforcement for KG builder as a validation layer after entity and relation extraction. If strict mode is enabled, properties, nodes and relationships not declared in the schema will be dropped from the LLM output.

Changed in 1.6.0

Dependencies

  • Update dependencies in pyproject.toml (pypdf, anthropic, cohere)

Fixed in 1.6.0

  • Config loading after module reload (for use in Jupyter notebooks)
  • Fallback to Qdrant point id if external_id_property is not found in the point's payload in QdrantNeo4jRetriever

New Contributors

Neo4j GraphRAG Package for Python 1.5.0

06 Mar 16:38
Compare
Choose a tag to compare

https://github.com/neo4j/neo4j-graphrag-python/blob/main/CHANGELOG.md#150

What's New in 1.5.0

  • Added utility functions to retrieve metadata about existing vector and full-text indexes.
  • Added support for the effective_search_ratio parameter in vector and hybrid searches, allowing finer control over query accuracy by adjusting the candidate pool size in similarity searches.
  • Introduced the upsert_vectors utility function for batch upserting embeddings into vector indexes on both nodes and relationships.
  • Introduced the extract_cypher function to improve the extraction of LLM-generated Cypher queries in Text2CypherRetriever.
  • Added Neo4jMessageHistory for saving LLM chat message history to a Neo4j database.
  • Added InMemoryMessageHistory for storing LLM chat message history in memory.
  • Added example scripts and documentation for using the new message history classes.
  • Updated LLM and GraphRAG classes to support message history functionality.

Changed in 1.5.0

  • Added deprecation warnings to upsert_vector and upsert_vector_on_relationship, recommending migration to upsert_vectors.
  • Added deprecation warnings to async_upsert_vector and async_upsert_vector_on_relationship, notifying developers of their planned removal in a future release.
  • Added support for database, timeout, and sanitize arguments in schema retrieval functions. The sanitize option allows for the removal of large properties such as embeddings.

Fixed in 1.5.0

  • Fixed an issue where a node alias was incorrectly hardcoded in the _handle_field_filter function.

Neo4j GraphRAG Package for Python 1.4.3

05 Feb 12:21
Compare
Choose a tag to compare

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 using approximate=False.
  • Updates tests to work with new Neo4j calendar versioning
  • neo4j_schema is now used in custom prompt formatting in Text2CypherRetriever (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

Neo4j GraphRAG Package for Python 1.4.2

15 Jan 08:53
Compare
Choose a tag to compare

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

14 Jan 15:39
Compare
Choose a tag to compare

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 and fsspec are not optional anymore so that SimpleKGPipeline examples can run out of the box.

Neo4j GraphRAG Package for Python 1.4.0

14 Jan 09:35
Compare
Choose a tag to compare

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 a system_instruction parameter.

Changed in 1.4.0

KG Construction Pipeline

  • The id_prefix of LexicalGraphConfig 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

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.