|
2 | 2 |
|
3 | 3 | ## Next |
4 | 4 |
|
| 5 | +### Added |
| 6 | + |
| 7 | +- Added GoogleGenAI (via `google-genai` SDK): includes `GeminiLLM` (generation/tool calling), `GeminiEmbedder` (embeddings), and integration examples/docs. |
| 8 | + |
5 | 9 | ## 1.13.0 |
6 | 10 |
|
7 | 11 | ### Added |
|
19 | 23 | - **Breaking**: `RelationshipType` with empty properties and `additional_properties=False` is now auto-corrected to `additional_properties=True` to prevent pruning of LLM-extracted properties. |
20 | 24 | - Introduced `Pattern` Pydantic model for internal storage of graph patterns, replacing tuple format. Public APIs maintain backward compatibility by accepting both tuples and `Pattern` objects. |
21 | 25 |
|
22 | | - |
23 | 26 | ## 1.12.0 |
24 | 27 |
|
25 | 28 | ## Added |
|
32 | 35 | - Switched project/dependency management from Poetry to uv. |
33 | 36 | - Dropped support for Python 3.9 (EOL) |
34 | 37 |
|
35 | | - |
36 | 38 | ## 1.11.0 |
37 | 39 |
|
38 | 40 | ### Added |
|
61 | 63 |
|
62 | 64 | - Fixed an edge case where the LLM can output a property with type 'map', which was causing errors during import as it is not a valid property type in Neo4j. |
63 | 65 |
|
64 | | - |
65 | 66 | ### Added |
66 | 67 |
|
67 | 68 | - Document node is now always created when running SimpleKGPipeline, even if `from_pdf=False`. |
68 | 69 | - Document metadata is exposed in SimpleKGPipeline run method. |
69 | 70 |
|
70 | | - |
71 | 71 | ## 1.9.1 |
72 | 72 |
|
73 | 73 | ### Fixed |
|
119 | 119 | - The `chunk_index` property on `__Entity__` nodes is removed. Use the `FROM_CHUNK` relationship instead. |
120 | 120 | - The `__entity__id` index is not used anymore and can be dropped from the database (it has been replaced by `__entity__tmp_internal_id`). |
121 | 121 |
|
122 | | - |
123 | 122 | ## 1.7.0 |
124 | 123 |
|
125 | 124 | ### Added |
|
134 | 133 |
|
135 | 134 | - Improved log output readability in Retrievers and GraphRAG and added embedded vector to retriever result metadata for debugging. |
136 | 135 | - Switched from pygraphviz to neo4j-viz |
137 | | - - Renders interactive graph now on HTML instead of PNG |
138 | | - - Removed `get_pygraphviz_graph` method |
| 136 | + - Renders interactive graph now on HTML instead of PNG |
| 137 | + - Removed `get_pygraphviz_graph` method |
139 | 138 |
|
140 | 139 | ### Fixed |
141 | 140 |
|
142 | 141 | - Fixed a bug where the `$nin` operator for metadata pre-filtering in retrievers would create an invalid Cypher query. |
143 | 142 |
|
144 | | - |
145 | 143 | ## 1.6.1 |
146 | 144 |
|
147 | 145 | ### Added |
|
152 | 150 |
|
153 | 151 | - Added `enforce_schema` parameter to `SimpleKGPipeline` for optional schema enforcement. |
154 | 152 |
|
155 | | - |
156 | 153 | ## 1.6.0 |
157 | 154 |
|
158 | 155 | ### Added |
|
170 | 167 | - Qdrant retriever now fallbacks on the point ID if the `external_id_property` is not found in the payload. |
171 | 168 | - Updated a few dependencies, mainly `pypdf`, `anthropic` and `cohere`. |
172 | 169 |
|
173 | | - |
174 | 170 | ## 1.5.0 |
175 | 171 |
|
176 | 172 | ### Added |
|
233 | 229 | ## 1.4.0 |
234 | 230 |
|
235 | 231 | ### Added |
| 232 | + |
236 | 233 | - Support for conversations with message history, including a new `message_history` parameter for LLM interactions. |
237 | 234 | - Ability to include system instructions in LLM invoke method. |
238 | 235 | - Summarization of chat history to enhance query embedding and context handling in GraphRAG. |
239 | 236 |
|
240 | 237 | ### Changed |
| 238 | + |
241 | 239 | - Updated LLM implementations to handle message history consistently across providers. |
242 | 240 | - The `id_prefix` parameter in the `LexicalGraphConfig` is deprecated. |
243 | 241 |
|
244 | 242 | ### Fixed |
| 243 | + |
245 | 244 | - IDs for the Document and Chunk nodes in the lexical graph are now randomly generated and unique across multiple runs, fixing issues in the lexical graph where relationships were created between chunks that were created by different pipeline runs. |
246 | 245 | - Improve logging for a better debugging experience: long lists and strings are now truncated. The max length can be controlled using the `LOGGING__MAX_LIST_LENGTH` and `LOGGING__MAX_STRING_LENGTH` env variables. |
247 | 246 |
|
248 | 247 | ## 1.3.0 |
249 | 248 |
|
250 | 249 | ### Added |
| 250 | + |
251 | 251 | - Integrated `json-repair` package to handle and repair invalid JSON generated by LLMs. |
252 | 252 | - Introduced `InvalidJSONError` exception for handling cases where JSON repair fails. |
253 | 253 | - Ability to create a Pipeline or SimpleKGPipeline from a config file. See [the example](examples/build_graph/from_config_files/simple_kg_pipeline_from_config_file.py). |
254 | 254 | - Added `OllamaLLM` and `OllamaEmbeddings` classes to make Ollama support more explicit. Implementations using the `OpenAILLM` and `OpenAIEmbeddings` classes will still work. |
255 | 255 |
|
256 | 256 | ### Changed |
| 257 | + |
257 | 258 | - Updated LLM prompt for Entity and Relation extraction to include stricter instructions for generating valid JSON. |
258 | 259 |
|
259 | 260 | ### Fixed |
| 261 | + |
260 | 262 | - Added schema functions to the documentation. |
261 | 263 |
|
262 | 264 | ## 1.2.1 |
263 | 265 |
|
264 | 266 | ### Added |
| 267 | + |
265 | 268 | - Introduced optional lexical graph configuration for `SimpleKGPipeline`, enhancing flexibility in customizing node labels and relationship types in the lexical graph. |
266 | 269 | - Introduced optional `neo4j_database` parameter for `SimpleKGPipeline`, `Neo4jChunkReader`and `Text2CypherRetriever`. |
267 | 270 | - Ability to provide description and list of properties for entities and relations in the `SimpleKGPipeline` constructor. |
268 | 271 |
|
269 | 272 | ### Fixed |
| 273 | + |
270 | 274 | - `neo4j_database` parameter is now used for all queries in the `Neo4jWriter`. |
271 | 275 |
|
272 | 276 | ### Changed |
| 277 | + |
273 | 278 | - Updated all examples to use `neo4j_database` parameter instead of an undocumented neo4j driver constructor. |
274 | 279 | - All `READ` queries are now routed to a reader replica (for clusters). This impacts all retrievers, the `Neo4jChunkReader` and `SinglePropertyExactMatchResolver` components. |
275 | 280 |
|
276 | | - |
277 | 281 | ## 1.2.0 |
278 | 282 |
|
279 | 283 | ### Added |
| 284 | + |
280 | 285 | - Made `relations` and `potential_schema` optional in `SchemaBuilder`. |
281 | 286 | - Added a check to prevent the use of deprecated Cypher syntax for Neo4j versions 5.23.0 and above. |
282 | 287 | - Added a `LexicalGraphBuilder` component to enable the import of the lexical graph (document, chunks) without performing entity and relation extraction. |
283 | 288 | - Added a `Neo4jChunkReader` component to be able to read chunk text from the database. |
284 | 289 |
|
285 | 290 | ### Changed |
| 291 | + |
286 | 292 | - Vector and Hybrid retrievers used with `return_properties` now also return the node labels (`nodeLabels`) and the node's element ID (`id`). |
287 | 293 | - `HybridRetriever` now filters out the embedding property index in `self.vector_index_name` from the retriever result by default. |
288 | 294 | - Removed support for neo4j.AsyncDriver in the KG creation pipeline, affecting Neo4jWriter and related components. |
289 | 295 | - Updated examples and unit tests to reflect the removal of async driver support. |
290 | 296 |
|
291 | 297 | ### Fixed |
| 298 | + |
292 | 299 | - Resolved issue with `AzureOpenAIEmbeddings` incorrectly inheriting from `OpenAIEmbeddings`, now inherits from `BaseOpenAIEmbeddings`. |
293 | 300 |
|
294 | 301 | ## 1.1.0 |
295 | 302 |
|
296 | 303 | ### Added |
| 304 | + |
297 | 305 | - Introduced a `fail_if_exist` option to index creation functions to control behavior when an index already exists. |
298 | 306 | - Added Qdrant retriever in neo4j_graphrag.retrievers. |
299 | 307 |
|
300 | 308 | ### Changed |
| 309 | + |
301 | 310 | - Comprehensive rewrite of the README to improve clarity and provide detailed usage examples. |
302 | 311 |
|
303 | 312 | ## 1.0.0 |
304 | 313 |
|
305 | 314 | ### Fixed |
| 315 | + |
306 | 316 | - Fix a bug where `openai` Python client and `numpy` were required to import any embedder or LLM. |
307 | 317 |
|
308 | 318 | ### Changed |
| 319 | + |
309 | 320 | - The value associated to the enum field `OnError.IGNORE` has been changed from "CONTINUE" to "IGNORE" to stick to the convention and match the field name. |
310 | 321 |
|
311 | 322 | ### Added |
| 323 | + |
312 | 324 | - Added `SinglePropertyExactMatchResolver` component allowing to merge entities with exact same property (e.g. name) |
313 | 325 | - Added the `SimpleKGPipeline` class, a simplified abstraction layer to streamline knowledge graph building processes from text documents. |
314 | 326 |
|
|
317 | 329 | ## 1.0.0a0 |
318 | 330 |
|
319 | 331 | ### Added |
| 332 | + |
320 | 333 | - Added `SinglePropertyExactMatchResolver` component allowing to merge entities with exact same property (e.g. name) |
321 | 334 |
|
322 | 335 | ## 0.7.0 |
323 | 336 |
|
324 | 337 | ### Added |
| 338 | + |
325 | 339 | - Added AzureOpenAILLM and AzureOpenAIEmbeddings to support Azure served OpenAI models |
326 | 340 | - Added `template` validation in `PromptTemplate` class upon construction. |
327 | 341 | - Examples demonstrating the use of Mistral embeddings and LLM in RAG pipelines. |
|
336 | 350 | - Added support for Qdrant - added optional dependency to `qdrant-client`. |
337 | 351 |
|
338 | 352 | ### Fixed |
| 353 | + |
339 | 354 | - Resolved import issue with the Vertex AI Embeddings class. |
340 | 355 | - Fixed bug in `Text2CypherRetriever` using `custom_prompt` arg where the `search` method would not inject the `query_text` content. |
341 | 356 | - `custom_prompt` arg is now converted to `Text2CypherTemplate` class within the `Text2CypherRetriever.get_search_results` method. |
|
345 | 360 | - Improved query performance in Neo4jWriter: created nodes now have a generic `__KGBuilder__` label and an index is created on the `__KGBuilder__.id` property. Moreover, insertion queries are now batched. Batch size can be controlled using the `batch_size` parameter in the `Neo4jWriter` component. |
346 | 361 |
|
347 | 362 | ### Changed |
| 363 | + |
348 | 364 | - Moved the Embedder class to the neo4j_graphrag.embeddings directory for better organization alongside other custom embedders. |
349 | 365 | - Removed query argument from the GraphRAG class' `.search` method; users must now use `query_text`. |
350 | 366 | - Neo4jWriter component now runs a single query to merge node and set its embeddings if any. |
351 | 367 | - Nodes created by the `Neo4jWriter` now have an extra `__KGBuilder__` label. Nodes from the entity graph also have an `__Entity__` label. |
352 | 368 | - Dropped support for Python 3.8 (end of life). |
353 | 369 |
|
354 | 370 | ## 0.6.3 |
| 371 | + |
355 | 372 | ### Changed |
| 373 | + |
356 | 374 | - Updated documentation links in README. |
357 | 375 | - Renamed deprecated package references in documentation. |
358 | 376 |
|
359 | 377 | ### Added |
| 378 | + |
360 | 379 | - Introduction page to the documentation content tree. |
361 | 380 | - Introduced a new Vertex AI embeddings class for generating text embeddings using Vertex AI. |
362 | 381 | - Updated documentation to include OpenAI and Vertex AI embeddings classes. |
363 | 382 | - Added google-cloud-aiplatform as an optional dependency for Vertex AI embeddings. |
364 | 383 |
|
365 | 384 | ### Fixed |
| 385 | + |
366 | 386 | - Make `pygraphviz` an optional dependency - it is now only required when calling `pipeline.draw`. |
367 | 387 |
|
368 | 388 | ## 0.6.2 |
369 | 389 |
|
370 | 390 | ### Fixed |
| 391 | + |
371 | 392 | - Moved pygraphviz to optional dependencies under [tool.poetry.extras] in pyproject.toml to resolve an issue where pip install neo4j-graphrag incorrectly required pygraphviz as a mandatory dependency. |
372 | 393 |
|
373 | 394 | ## 0.6.1 |
374 | 395 |
|
375 | 396 | ### Changed |
| 397 | + |
376 | 398 | - Officially renamed neo4j-genai to neo4j-graphrag. For the final release version of neo4j-genai, please visit https://pypi.org/project/neo4j-genai/. |
377 | 399 |
|
378 | 400 | ## 0.6.0 |
379 | 401 |
|
380 | 402 | ### IMPORTANT NOTICE |
| 403 | + |
381 | 404 | - The `neo4j-genai` package is now deprecated. Users are advised to switch to the new package `neo4j-graphrag`. |
| 405 | + |
382 | 406 | ### Added |
| 407 | + |
383 | 408 | - Ability to visualise pipeline with `my_pipeline.draw("pipeline.png")`. |
384 | 409 | - `LexicalGraphBuilder` component to create the lexical graph without entity-relation extraction. |
385 | 410 |
|
386 | 411 | ### Fixed |
| 412 | + |
387 | 413 | - Pipelines now return correct results when the same pipeline is run in parallel. |
388 | 414 |
|
389 | 415 | ### Changed |
| 416 | + |
390 | 417 | - Pipeline run method now return a PipelineResult object. |
391 | 418 | - Improved parameter validation for pipelines (#124). Pipeline now raise an error before a run starts if: |
392 | | - - the same parameter is mapped twice |
393 | | - - or a parameter is defined in the mapping but is not a valid component input |
394 | | - |
| 419 | + - the same parameter is mapped twice |
| 420 | + - or a parameter is defined in the mapping but is not a valid component input |
395 | 421 |
|
396 | 422 | ## 0.5.0 |
397 | 423 |
|
398 | 424 | ### Added |
| 425 | + |
399 | 426 | - PDF-to-graph pipeline for knowledge graph construction in experimental mode |
400 | 427 | - Introduced support for Component/Pipeline flexible architecture. |
401 | 428 | - Added new components for knowledge graph construction, including text splitters, schema builders, entity-relation extractors, and Neo4j writers. |
402 | 429 | - Implemented end-to-end tests for the new knowledge graph builder pipeline. |
403 | 430 |
|
404 | 431 | ### Changed |
| 432 | + |
405 | 433 | - When saving the lexical graph in a KG creation pipeline, the document is also saved as a specific node, together with relationships between each chunk and the document they were created from. |
406 | 434 |
|
407 | 435 | ### Fixed |
| 436 | + |
408 | 437 | - Corrected the hybrid retriever query to ensure proper normalization of scores in vector search results. |
409 | 438 |
|
410 | 439 | ## 0.4.0 |
411 | 440 |
|
412 | 441 | ### Added |
| 442 | + |
413 | 443 | - Add optional custom_prompt arg to the Text2CypherRetriever class. |
414 | 444 |
|
415 | 445 | ### Changed |
| 446 | + |
416 | 447 | - `GraphRAG.search` method first parameter has been renamed `query_text` (was `query`) for consistency with the retrievers interface. |
417 | 448 | - Made `GraphRAG.search` method backwards compatible with the query parameter, raising warnings to encourage using query_text instead. |
418 | 449 |
|
419 | 450 | ## 0.3.1 |
420 | 451 |
|
421 | 452 | ### Fixed |
422 | | -- Corrected initialization to allow specifying the embedding model name. |
423 | | -- Removed sentence_transformers from embeddings/__init__.py to avoid ImportError when the package is not installed. |
| 453 | + |
| 454 | +- Corrected initialization to allow specifying the embedding model name. |
| 455 | +- Removed sentence_transformers from embeddings/**init**.py to avoid ImportError when the package is not installed. |
424 | 456 |
|
425 | 457 | ## 0.3.0 |
426 | 458 |
|
427 | 459 | ### Added |
428 | | -- Stopped embeddings from being returned when searching with `VectorRetriever`. Added `nodeLabels` and `id` to the metadata of `VectorRetriever` results. |
429 | | -- Added `upsert_vector` utility function for attaching vectors to node properties. |
430 | | -- Introduced `Neo4jInsertionError` for handling insertion failures in Neo4j. |
431 | | -- Included Pinecone and Weaviate retrievers in neo4j_graphrag.retrievers. |
432 | | -- Introduced the GraphRAG object, enabling a full RAG (Retrieval-Augmented Generation) pipeline with context retrieval, prompt formatting, and answer generation. |
433 | | -- Added PromptTemplate and RagTemplate for customizable prompt generation. |
434 | | -- Added LLMInterface with implementation for OpenAI LLM. |
435 | | -- Updated project configuration to support multiple Python versions (3.8 to 3.12) in CI workflows. |
436 | | -- Improved developer experience by copying the docstring from the `Retriever.get_search_results` method to the `Retriever.search` method |
437 | | -- Support for specifying database names in index handling methods and retrievers. |
438 | | -- User Guide in documentation. |
439 | | -- Introduced result_formatter argument to all retrievers, allowing custom formatting of retriever results. |
| 460 | + |
| 461 | +- Stopped embeddings from being returned when searching with `VectorRetriever`. Added `nodeLabels` and `id` to the metadata of `VectorRetriever` results. |
| 462 | +- Added `upsert_vector` utility function for attaching vectors to node properties. |
| 463 | +- Introduced `Neo4jInsertionError` for handling insertion failures in Neo4j. |
| 464 | +- Included Pinecone and Weaviate retrievers in neo4j_graphrag.retrievers. |
| 465 | +- Introduced the GraphRAG object, enabling a full RAG (Retrieval-Augmented Generation) pipeline with context retrieval, prompt formatting, and answer generation. |
| 466 | +- Added PromptTemplate and RagTemplate for customizable prompt generation. |
| 467 | +- Added LLMInterface with implementation for OpenAI LLM. |
| 468 | +- Updated project configuration to support multiple Python versions (3.8 to 3.12) in CI workflows. |
| 469 | +- Improved developer experience by copying the docstring from the `Retriever.get_search_results` method to the `Retriever.search` method |
| 470 | +- Support for specifying database names in index handling methods and retrievers. |
| 471 | +- User Guide in documentation. |
| 472 | +- Introduced result_formatter argument to all retrievers, allowing custom formatting of retriever results. |
440 | 473 |
|
441 | 474 | ### Changed |
442 | | -- Refactored import paths for retrievers to neo4j_graphrag.retrievers. |
443 | | -- Implemented exception chaining for all re-raised exceptions to improve stack trace readability. |
444 | | -- Made error messages in `index.py` more consistent. |
445 | | -- Renamed `Retriever._get_search_results` to `Retriever.get_search_results` |
446 | | -- Updated retrievers and index handling methods to accept optional database names. |
| 475 | + |
| 476 | +- Refactored import paths for retrievers to neo4j_graphrag.retrievers. |
| 477 | +- Implemented exception chaining for all re-raised exceptions to improve stack trace readability. |
| 478 | +- Made error messages in `index.py` more consistent. |
| 479 | +- Renamed `Retriever._get_search_results` to `Retriever.get_search_results` |
| 480 | +- Updated retrievers and index handling methods to accept optional database names. |
447 | 481 |
|
448 | 482 | ## 0.2.0 |
449 | 483 |
|
450 | 484 | ### Fixed |
451 | 485 |
|
452 | | -- Removed Pinecone and Weaviate retrievers from **init**.py to prevent ImportError when optional dependencies are not installed. |
453 | | -- Moved few-shot examples in `Text2CypherRetriever` to the constructor for better initialization and usage. Updated unit tests and example script accordingly. |
454 | | -- Fixed regex warnings in E2E tests for Weaviate and Pinecone retrievers. |
455 | | -- Corrected HuggingFaceEmbeddings import in E2E tests. |
456 | | - |
| 486 | +- Removed Pinecone and Weaviate retrievers from **init**.py to prevent ImportError when optional dependencies are not installed. |
| 487 | +- Moved few-shot examples in `Text2CypherRetriever` to the constructor for better initialization and usage. Updated unit tests and example script accordingly. |
| 488 | +- Fixed regex warnings in E2E tests for Weaviate and Pinecone retrievers. |
| 489 | +- Corrected HuggingFaceEmbeddings import in E2E tests. |
457 | 490 |
|
458 | 491 | ## 0.2.0a5 |
459 | 492 |
|
460 | 493 | ## 0.2.0a3 |
461 | 494 |
|
462 | 495 | ### Added |
463 | 496 |
|
464 | | -- Introduced custom exceptions for improved error handling, including `RetrieverInitializationError`, `SearchValidationError`, `FilterValidationError`, `EmbeddingRequiredError`, `RecordCreationError`, `Neo4jIndexError`, and `Neo4jVersionError`. |
465 | | -- Retrievers that integrates with a Weaviate vector database: `WeaviateNeo4jRetriever`. |
466 | | -- New return types that help with getting retriever results: `RetrieverResult` and `RetrieverResultItem`. |
467 | | -- Supported wrapper embedder object for sentence-transformers embeddings: `SentenceTransformerEmbeddings`. |
468 | | -- `Text2CypherRetriever` object which allows for the retrieval of records from a Neo4j database using natural language. |
| 497 | +- Introduced custom exceptions for improved error handling, including `RetrieverInitializationError`, `SearchValidationError`, `FilterValidationError`, `EmbeddingRequiredError`, `RecordCreationError`, `Neo4jIndexError`, and `Neo4jVersionError`. |
| 498 | +- Retrievers that integrates with a Weaviate vector database: `WeaviateNeo4jRetriever`. |
| 499 | +- New return types that help with getting retriever results: `RetrieverResult` and `RetrieverResultItem`. |
| 500 | +- Supported wrapper embedder object for sentence-transformers embeddings: `SentenceTransformerEmbeddings`. |
| 501 | +- `Text2CypherRetriever` object which allows for the retrieval of records from a Neo4j database using natural language. |
469 | 502 |
|
470 | 503 | ### Changed |
471 | 504 |
|
472 | | -- Replaced `ValueError` with custom exceptions across various modules for clearer and more specific error messages. |
| 505 | +- Replaced `ValueError` with custom exceptions across various modules for clearer and more specific error messages. |
473 | 506 |
|
474 | 507 | ### Fixed |
475 | 508 |
|
476 | | -- Updated documentation to include new custom exceptions. |
477 | | -- Improved the use of Pydantic for input data validation for retriever objects. |
| 509 | +- Updated documentation to include new custom exceptions. |
| 510 | +- Improved the use of Pydantic for input data validation for retriever objects. |
0 commit comments