blob: 54677f34f077a42c91fc440185877fcaf52f6f3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
from dataclasses import dataclass
from src.utils import LLM_Model
@dataclass
class LinearRAGConfig:
dataset_name: str
embedding_model: str = "all-mpnet-base-v2"
llm_model: LLM_Model = None
chunk_token_size: int = 1000
chunk_overlap_token_size: int = 100
spacy_model: str = "en_core_web_trf"
working_dir: str = "./import"
batch_size: int = 128
max_workers: int = 16
retrieval_top_k: int = 5
max_iterations: int = 3
top_k_sentence: int = 1
passage_ratio: float = 1.5
passage_node_weight: float = 0.05
damping: float = 0.5
iteration_threshold: float = 0.5
use_vectorized_retrieval: bool = False # True for vectorized matrix computation, False for BFS iteration
|