@@ -20,12 +20,12 @@ Pipeline structure
20
20
21
21
A Knowledge Graph (KG) construction pipeline requires a few components:
22
22
23
- - A document **parser **: extract text from files (PDFs, ...)
24
- - A document **chunker **: split the text into smaller pieces of text, manageable by the LLM context window (token limit).
25
- - A chunk ** embeder ** (optional): compute and store the chunk embeddings
26
- - A ** schema builder **: provide a schema to ground the LLM extracted entities and relations and obtain an easily navigable KG.
27
- - An ** entity and relation extractor **: extract relevant entities and relations from the text.
28
- - A **Knowledge Graph writer **: write the identified entities and relations to a Neo4j database.
23
+ - Document **parser **: extract text from files (PDFs, ...)
24
+ - Document **chunker **: split the text into smaller pieces of text, manageable by the LLM context window (token limit).
25
+ - Chunk ** embedder ** (optional): compute and store the chunk embeddings
26
+ - ** Schema builder **: provide a schema to ground the LLM extracted entities and relations and obtain an easily navigable KG.
27
+ - ** Entity and relation extractor **: extract relevant entities and relations from the text.
28
+ - **Knowledge Graph writer **: write the identified entities and relations to a Neo4j database.
29
29
30
30
.. image :: images/kg_builder_pipeline.png
31
31
:alt: KG Builder pipeline
@@ -47,7 +47,6 @@ Each of these components can be run individually:
47
47
.. code :: python
48
48
49
49
import asyncio
50
- # replace `PdfLoader` by a real component name
51
50
from neo4j_genai.experimental.components.pdf_loader import PdfLoader
52
51
my_component = PdfLoader()
53
52
asyncio.run(my_component.run(" my_file.pdf" ))
@@ -58,7 +57,6 @@ They can also be used within a pipeline:
58
57
.. code :: python
59
58
60
59
from neo4j_genai.experimental.pipeline import Pipeline
61
- # replace `PdfLoader` by a real component name
62
60
from neo4j_genai.experimental.components.pdf_loader import PdfLoader
63
61
pipeline = Pipeline()
64
62
my_component = PdfLoader()
0 commit comments