Class Introduction

Function

knowledge graph Chain, which is inherited from SingleText2TextChain. For details about how to call this class, see Example.

Prototype

from mx_rag.chain.single_text_to_text import GraphRagText2TextChain
GraphRagText2TextChain(llm, retriever, reranker)

Parameters

Parameter

Data Type

Required/Optional

Description

llm

Text2TextLLM

Required

LLM object. For details, see Text2TextLLM.

retriever

GraphRetriever

Required

GraphRetriever object, which is returned by the as_retriever method of GraphRAGPipeline.

reranker

Reranker

Optional

Reranker object, which is used to re-rank the retrieved documents. The default value is None. For details, see Reranker.

For details about other parameters, see the parent class.