Skip to content

Commit 4b6590f

Browse files
committed
Update line length
1 parent 87e34f0 commit 4b6590f

File tree

2 files changed

+28
-22
lines changed

2 files changed

+28
-22
lines changed

docs/source/api.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ PineconeNeo4jRetriever
131131
:members: search
132132

133133

134-
**********
134+
********
135135
Embedder
136-
**********
136+
********
137137

138138
.. autoclass:: neo4j_genai.embedder.Embedder
139139
:members:
140140

141141
SentenceTransformerEmbeddings
142-
================================
142+
=============================
143143

144144
.. autoclass:: neo4j_genai.embeddings.sentence_transformers.SentenceTransformerEmbeddings
145145
:members:
@@ -149,29 +149,35 @@ Generation
149149
**********
150150

151151
LLMInterface
152-
======================
152+
============
153153

154154
.. autoclass:: neo4j_genai.llm.LLMInterface
155155
:members:
156156

157157

158158
OpenAILLM
159-
======================
159+
=========
160160

161161
.. autoclass:: neo4j_genai.llm.OpenAILLM
162162
:members:
163163

164164

165165
PromptTemplate
166-
======================
166+
===============
167167

168168
.. autoclass:: neo4j_genai.generation.prompts.PromptTemplate
169169
:members:
170170

171171

172-
.. autoclass:: neo4j_genai.generation.prompts.RagPromptTemplate
172+
RagTemplate
173+
-----------
174+
175+
.. autoclass:: neo4j_genai.generation.prompts.RagTemplate
173176
:members:
174177

178+
ERExtractionTemplate
179+
--------------------
180+
175181
.. autoclass:: neo4j_genai.generation.prompts.ERExtractionTemplate
176182
:members:
177183

docs/source/user_guide_kg_builder.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _user-guide-kg-builder:
22

33
User Guide: Knowledge Graph Builder
4-
########################################
4+
###################################
55

66

77
This page provides information about how to create a Knowledge Graph from
@@ -14,9 +14,9 @@ unstructured data.
1414
It is not recommended to use it in production yet.
1515

1616

17-
******************************
17+
******************
1818
Pipeline structure
19-
******************************
19+
******************
2020

2121
A Knowledge Graph (KG) construction pipeline requires a few components:
2222

@@ -36,9 +36,9 @@ This package contains the interface and implementations for each of these compon
3636
To see an end-to-end example of a Knowledge Graph construction pipeline,
3737
refer to `this example <https://github.com/neo4j/neo4j-genai-python/blob/main/examples/pipeline/kg_builder.py>`_.
3838

39-
***************************************
39+
**********************************
4040
Knowledge Graph Builder Components
41-
***************************************
41+
**********************************
4242

4343
Below is a list of the different components available in this package, and how to use them.
4444

@@ -66,7 +66,7 @@ They can also be used within a pipeline:
6666
6767
6868
Document Parser
69-
========================
69+
===============
7070

7171
Document parsers start from a file path and return the text extracted from this file.
7272

@@ -95,7 +95,7 @@ To implement your own loader, use the `DataLoader` interface:
9595
9696
9797
Document Splitter
98-
========================
98+
=================
9999

100100
Document splitters, as the name indicate, are splitting documents into smaller chunks
101101
that can be processed within the LLM token limits. Wrappers for LangChain and LlamaIndex
@@ -137,7 +137,7 @@ To implement a custom text splitter, the `TextSplitter` interface can be used:
137137
138138
139139
Chunk Embedder
140-
===============================
140+
==============
141141

142142
In order to embed the chunks' texts (to be used in vector search RAG), one can use the
143143
`TextChunkEmbedder` component, which rely on the :ref:`Embedder` interface.
@@ -168,7 +168,7 @@ The embeddings are added to each chunk metadata, and will be saved as a Chunk no
168168

169169

170170
Schema Builder
171-
========================
171+
==============
172172

173173
The schema is used to try and ground the LLM to a list of possible entities and relations of interest.
174174
So far, schema must be manually created by specifying:
@@ -227,7 +227,7 @@ to the LLM.
227227

228228

229229
Entity and Relation Extractor
230-
===============================
230+
=============================
231231

232232
This component is responsible for extracting the relevant entities and relationships from each text chunk,
233233
using the schema as guideline.
@@ -259,7 +259,7 @@ It can be used in this way:
259259
The LLM to use can be customized, the only constraint is that it obeys the :ref:`LLMInterface <llminterface>`.
260260

261261
Error Behaviour
262-
-------------------------------
262+
---------------
263263

264264
By default, if the extraction fails for one chunk, it will be ignored and the non-failing chunks will be saved.
265265
This behaviour can be changed by using the `on_error` flag in the `LLMEntityRelationExtractor` constructor:
@@ -287,7 +287,7 @@ will be saved to Neo4j.
287287

288288

289289
Lexical Graph
290-
-------------------------------
290+
-------------
291291

292292
By default, the `LLMEntityRelationExtractor` adds some extra nodes and relationships to the extracted graph:
293293

@@ -306,7 +306,7 @@ If this 'lexical graph' is not desired, set the `created_lexical_graph` to `Fals
306306
307307
308308
Customizing the Prompt
309-
----------------------------------------
309+
----------------------
310310

311311
The default prompt uses the :ref:`erextractiontemplate`. It is possible to provide a custom prompt as string:
312312

@@ -325,7 +325,7 @@ The following variables can be used in the prompt:
325325

326326

327327
Subclassing the EntityRelationExtractor
328-
----------------------------------------
328+
---------------------------------------
329329

330330
If more customization is needed, it is possible to subclass the `EntityRelationExtractor` interface:
331331

@@ -360,7 +360,7 @@ See :ref:`entityrelationextractor`.
360360

361361

362362
Knowledge Graph Writer
363-
===============================
363+
======================
364364

365365
KG writer are used to save the results of the `EntityRelationExtractor`.
366366
The main implementation is the `Neo4jWriter` that will write nodes and relationships

0 commit comments

Comments
 (0)