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.