Skip to content

Neo4j GraphRAG package for Python 0.7.0

Compare
Choose a tag to compare
@willtai willtai released this 02 Oct 12:40
· 59 commits to main since this release

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.