Skip to content

Commit 42aa07c

Browse files
Prepare release for experimental kg creation (#112)
* Update CHANGELOG * Update docs * Update docs * Update CHANGELOG --------- Co-authored-by: Alex Thomas <alexthomas93@users.noreply.github.com>
1 parent 378c98d commit 42aa07c

File tree

9 files changed

+15
-14
lines changed

9 files changed

+15
-14
lines changed

CHANGELOG.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
## Next
44

5+
### Added
6+
- PDF-to-graph pipeline for knowledge graph construction in experimental mode
7+
- Introduced support for Component/Pipeline flexible architecture.
8+
- Added new components for knowledge graph construction, including text splitters, schema builders, entity-relation extractors, and Neo4j writers.
9+
- Implemented end-to-end tests for the new knowledge graph builder pipeline.
10+
511
### Changed
612
- 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.
713

8-
## 0.5.0
9-
1014
### Fixed
1115
- Corrected the hybrid retriever query to ensure proper normalization of scores in vector search results.
1216

1317
## 0.4.0
1418

1519
### Added
1620
- Add optional custom_prompt arg to the Text2CypherRetriever class.
17-
- Introduced support for Component/Pipeline flexible architecture.
18-
- Added new components for knowledge graph construction, including text splitters, schema builders, entity-relation extractors, and Neo4j writers.
19-
- Implemented end-to-end tests for the new knowledge graph builder pipeline.
2021

2122
### Changed
2223
- `GraphRAG.search` method first parameter has been renamed `query_text` (was `query`) for consistency with the retrievers interface.

docs/source/user_guide_kg_builder.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ They can also be used within a pipeline:
6060
from neo4j_genai.experimental.components.pdf_loader import PdfLoader
6161
pipeline = Pipeline()
6262
my_component = PdfLoader()
63-
pipeline.add("component_name", my_component)
63+
pipeline.add_component(my_component, "component_name")
6464
6565
6666
Document Parser

docs/source/user_guide_pipeline.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ Here's how to create a simple pipeline and propagate results from one component
5757
from neo4j_genai.experimental.pipeline import Pipeline
5858
5959
pipe = Pipeline()
60-
pipe.add_component("a", ComponentAdd())
61-
pipe.add_component("b", ComponentAdd())
60+
pipe.add_component(ComponentAdd(), "a")
61+
pipe.add_component(ComponentAdd(), "b")
6262
6363
pipe.connect("a", "b", {"number2": "a.result"})
6464
asyncio.run(pipe.run({"a": {"number1": 10, "number2": 1}, "b": {"number1": 4}))

src/neo4j_genai/experimental/components/embedder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TextChunkEmbedder(Component):
3636
embedder = OpenAIEmbeddings(model="text-embedding-3-large")
3737
chunk_embedder = TextChunkEmbedder(embedder)
3838
pipeline = Pipeline()
39-
pipeline.add_component("chunk_embedder", chunk_embedder)
39+
pipeline.add_component(chunk_embedder, "chunk_embedder")
4040
4141
"""
4242

src/neo4j_genai/experimental/components/entity_relation_extractor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class LLMEntityRelationExtractor(EntityRelationExtractor):
297297
298298
extractor = LLMEntityRelationExtractor(llm=llm)
299299
pipe = Pipeline()
300-
pipe.add_component("extractor", extractor)
300+
pipe.add_component(extractor, "extractor")
301301
302302
"""
303303

src/neo4j_genai/experimental/components/kg_writer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Neo4jWriter(KGWriter):
8888
writer = Neo4jWriter(driver=driver, neo4j_database=DATABASE)
8989
9090
pipeline = Pipeline()
91-
pipeline.add_component("writer", writer)
91+
pipeline.add_component(writer, "writer")
9292
9393
"""
9494

src/neo4j_genai/experimental/components/schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class SchemaBuilder(Component):
145145
]
146146
pipe = Pipeline()
147147
schema_builder = SchemaBuilder()
148-
pipe.add_component("schema_builder", schema_builder)
148+
pipe.add_component(schema_builder, "schema_builder")
149149
pipe_inputs = {
150150
"schema": {
151151
"entities": entities,

src/neo4j_genai/experimental/components/text_splitters/langchain.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class LangChainTextSplitterAdapter(TextSplitter):
3737
3838
pipeline = Pipeline()
3939
text_splitter = LangChainTextSplitterAdapter(RecursiveCharacterTextSplitter())
40-
pipeline.add_component("text_splitter", text_splitter)
40+
pipeline.add_component(text_splitter, "text_splitter")
4141
4242
"""
4343

src/neo4j_genai/experimental/components/text_splitters/llamaindex.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class LlamaIndexTextSplitterAdapter(TextSplitter):
3737
3838
pipeline = Pipeline()
3939
text_splitter = LlamaIndexTextSplitterAdapter(SentenceSplitter())
40-
pipeline.add_component("text_splitter", text_splitter)
40+
pipeline.add_component(text_splitter, "text_splitter")
4141
4242
"""
4343

0 commit comments

Comments
 (0)