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
AzureOpenAILLMandAzureOpenAIEmbeddingsfor seamless use of Azure-hosted OpenAI models. - Vertex AI Integration: Introduced the
VertexAILLMclass 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
PromptTemplateclass 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_textplaceholder, 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
VertexAIEmbeddingsclass, ensuring smooth integration.
Text2CypherRetriever Bugs:
- Fixed a bug where the
searchmethod failed to injectquery_textfrom thecustom_promptargument. - Converted the
custom_promptargument to theText2CypherTemplateclass within theget_search_resultsmethod for better consistency.
Prompt Template Requirements:
- Enforced the presence of the
query_textargument inText2CypherTemplateandRAGTemplateprompt 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
Embedderclass to theneo4j_graphrag.embeddingsdirectory 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.