93 lines
2.9 KiB
YAML
93 lines
2.9 KiB
YAML
vectordb:
|
|
- name: chroma_dragonkue2
|
|
db_type: chroma
|
|
client_type: persistent
|
|
embedding_model: huggingface_drangonku-v2-ko
|
|
collection_name: huggingface_drangonku-v2-ko
|
|
path: ${PROJECT_DIR}/resources/chroma
|
|
|
|
node_lines:
|
|
- node_line_name: retrieve_node_line # Arbitrary node line name
|
|
nodes:
|
|
- node_type: retrieval
|
|
strategy:
|
|
metrics: [ retrieval_f1, retrieval_recall, retrieval_precision,
|
|
retrieval_ndcg, retrieval_map, retrieval_mrr ]
|
|
speed_threshold: 10
|
|
top_k: 10
|
|
modules:
|
|
- module_type: bm25
|
|
bm25_tokenizer: [ ko_kiwi, ko_okt ]
|
|
- module_type: vectordb
|
|
vectordb: chroma_dragonkue2 # chromadb
|
|
- module_type: hybrid_cc
|
|
normalize_method: [ mm, tmm, z, dbsf ]
|
|
target_modules: ('bm25', 'vectordb')
|
|
weight_range: (0.6, 0.4)
|
|
test_weight_size: 101
|
|
- node_type: passage_reranker # re-ranker
|
|
strategy:
|
|
metrics:
|
|
- retrieval_recall
|
|
- retrieval_precision
|
|
- retrieval_map
|
|
modules:
|
|
- module_type: dragonkue2
|
|
top_k: 5
|
|
|
|
- node_line_name: post_retrieve_node_line # 생성노드
|
|
nodes:
|
|
- node_type: prompt_maker
|
|
strategy:
|
|
metrics:
|
|
- metric_name: bleu
|
|
- metric_name: meteor
|
|
- metric_name: rouge
|
|
- metric_name: sem_score
|
|
embedding_model: huggingface_drangonku-v2-ko # raise ValueError("Only one embedding model is supported")
|
|
lang: ko
|
|
generator_modules:
|
|
- module_type: llama_index_llm
|
|
llm: ollama
|
|
model: [ gemma3:12b, phi4, deepseek-r1:14b, aya-expanse:8b ]
|
|
request_timeout: 3000.0
|
|
modules:
|
|
- module_type: fstring
|
|
prompt:
|
|
- |
|
|
### Task:
|
|
Respond to the user query using the provided context.
|
|
|
|
### Guidelines:
|
|
- If you don't know the answer, clearly state that.
|
|
- If uncertain, ask the user for clarification.
|
|
- Respond in the same language as the user's query.
|
|
- If the context is unreadable or of poor quality, inform the user and provide the best possible answer.
|
|
- If the answer isn't present in the context but you possess the knowledge, explain this to the user and provide the answer using your own understanding.
|
|
- Do not use XML tags in your response.
|
|
|
|
### Output:
|
|
Provide a clear and direct response to the user's query.
|
|
|
|
<context>
|
|
{retrieved_contents}
|
|
</context>
|
|
|
|
<user_query>
|
|
{query}
|
|
</user_query>
|
|
- node_type: generator # Gen-LLM
|
|
strategy:
|
|
metrics:
|
|
- metric_name: bleu
|
|
- metric_name: meteor
|
|
- metric_name: rouge
|
|
- metric_name: sem_score
|
|
modules:
|
|
- module_type: llama_index_llm
|
|
llm: ollama
|
|
model: gemma3:12b # phi4, deepseek-r1:14b, aya-expanse:8b
|
|
temperature: 0.0
|
|
request_timeout: 30000.0
|
|
batch: 4
|