Skip to content

Constants

gllm_retrieval.retriever.graph_retriever.constants

Constants used in graph retriever.

Authors

Douglas Raevan Faisal (douglas.r.faisal@gdplabs.id)

References

NONE

LightRAGRetrievalSection

Bases: StrEnum

Enum for LightRAG retrieval section.

DOCUMENT_CHUNKS = '-----Document Chunks(DC)-----' class-attribute instance-attribute

ENTITIES = '-----Entities(KG)-----' class-attribute instance-attribute

RELATIONSHIPS = '-----Relationships(KG)-----' class-attribute instance-attribute

ReturnType

Bases: StrEnum

Enum for return type of retrieve method.

The return type of retrieve method can be one of the following
  • CHUNKS: List of Chunk objects. Example: [Chunk(id="1", content="Text content", metadata={...}), ...]
  • STRINGS: List of content strings from chunks. Example: ["Text content 1", "Text content 2", ...]
  • DICT: Dictionary representation of the result. Example: {"chunks": [...], "nodes": [...], "edges": [...]}
  • STRING: Raw result string output. Useful when the library already includes a response synthesis process. Example: "Based on the information provided in the knowledge graph, the answer to the query is ..."

CHUNKS = 'chunks' class-attribute instance-attribute

DICT = 'dict' class-attribute instance-attribute

STRING = 'string' class-attribute instance-attribute

STRINGS = 'strings' class-attribute instance-attribute