----------------------
The
kg_triple_extract_template
is a parameter that you can pass when creating an instance of
KnowledgeGraphIndex
. This parameter is used to specify the prompt for extracting triplets.
You can modify your code to include this parameter as shown below:
kg_triple_extract_template = BasePromptTemplate(...) # replace ... with your template
index = KnowledgeGraphIndex.from_documents(
documents,
kg_triple_extract_template=kg_triple_extract_template,
max_triplets_per_chunk=3,
service_context=service_context,
include_embeddings=True
)
Please replace
BasePromptTemplate(...)
with your actual template.
For more details, you can refer to the
LlamaIndex documentation ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------