File size: 961 Bytes
843035b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os

# Model configuration
EMBEDDING_MODEL = "sentence-transformers/all-MiniLM-L6-v2"
EMBEDDING_DIM = 384

# BM25 parameters
BM25_K1 = 1.5
BM25_B = 0.75

# Search parameters
DEFAULT_TOP_K = 5
DEFAULT_VECTOR_WEIGHT = 0.6
DEFAULT_BM25_WEIGHT = 0.4

# Knowledge base files
KNOWLEDGE_BASE_FILES = [
    'knowledge_base/about.md',
    'knowledge_base/research_details.md', 
    'knowledge_base/publications_detailed.md',
    'knowledge_base/skills_expertise.md',
    'knowledge_base/experience_detailed.md',
    'knowledge_base/statistics.md'
]

# File type mapping
FILE_TYPE_MAP = {
    'about.md': ('about', 10),
    'research_details.md': ('research', 9),
    'publications_detailed.md': ('publications', 8),
    'skills_expertise.md': ('skills', 7),
    'experience_detailed.md': ('experience', 8),
    'statistics.md': ('statistics', 9)
}

# Device configuration
def get_device():
    import torch
    return "cuda" if torch.cuda.is_available() else "cpu"