File size: 1,218 Bytes
8e874f5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | """
Answering module for QAFD-RAG.
This module handles the query-time operations: from user question to final answer.
It coordinates keyword extraction, entity retrieval, graph traversal, context assembly,
and response generation.
Submodules:
-----------
- handler: Main query entry point (kg_query)
- context: Context building based on query modes
- clusters: Flow diffusion cluster operations
- text_units: Text chunk retrieval
Note: Evaluation functions have been moved to src/evaluation.py
"""
from .handler import kg_query
from .context import build_query_context
from .clusters import (
get_embeddings_for_flow_diffusion,
convert_subgraph_to_json,
find_flow_diffusion_clusters_and_summarize,
summarize_clusters_batch_with_llm,
summarize_cluster_with_llm,
)
from .text_units import find_most_related_text_unit_from_entities
__all__ = [
# Handler
"kg_query",
# Context
"build_query_context",
# Clusters
"get_embeddings_for_flow_diffusion",
"convert_subgraph_to_json",
"find_flow_diffusion_clusters_and_summarize",
"summarize_clusters_batch_with_llm",
"summarize_cluster_with_llm",
# Text units
"find_most_related_text_unit_from_entities",
]
|