forked from Marker-Inc-Korea/AutoRAG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compact_local.yaml
51 lines (51 loc) · 2.05 KB
/
compact_local.yaml
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
44
45
46
47
48
49
50
51
# In this yaml, we do not use tree_summarize for accuracy
# And did not use monoT5, because it can take too long.
node_lines:
- node_line_name: retrieve_node_line # Arbitrary node line name
nodes:
- node_type: retrieval
strategy:
metrics: [retrieval_f1, retrieval_recall, retrieval_precision]
top_k: 20
modules:
- module_type: bm25
- module_type: vectordb
embedding_model: huggingface_baai_bge_small
- module_type: hybrid_rrf
target_modules: ('bm25', 'vectordb')
rrf_k: [3, 5, 10]
- module_type: hybrid_cc
target_modules: ('bm25', 'vectordb')
weights:
- (0.5, 0.5)
- (0.3, 0.7)
- (0.7, 0.3)
- node_type: passage_reranker
strategy:
metrics: [retrieval_f1, retrieval_recall, retrieval_precision]
top_k: 3
modules:
- module_type: pass_reranker
- module_type: tart
- module_type: upr
- node_line_name: post_retrieve_node_line # Arbitrary node line name
nodes:
- node_type: prompt_maker
strategy:
metrics: [bleu, meteor, rouge, sem_score]
generator_modules:
- module_type: vllm
llm: mistralai/Mistral-7B-Instruct-v0.2
modules:
- module_type: fstring
prompt:
- "Answer to given questions with the following passage: {retrieved_contents} \n\n Question: {query} \n\n Answer:"
- "There is a passages related to user question. Please response carefully to the following question. \n\n Passage: {retrieved_contents} \n\n Question: {query} \n\n Answer the question. Think step by step." # Zero-shot CoT prompt
- "{retrieved_contents} \n\n Read the passage carefully, and answer this question. \n\n Question: {query} \n\n Answer the question. Be concise." # concise prompt
- node_type: generator
strategy:
metrics: [bleu, meteor, rouge, sem_score]
modules:
- module_type: vllm
llm: mistralai/Mistral-7B-Instruct-v0.2
temperature: [0.1, 0.5, 1.1]