# Vector DB 통합 시스템 설정

# PostgreSQL (용어집)
postgres:
  host: ${POSTGRES_HOST}
  port: ${POSTGRES_PORT}
  database: ${POSTGRES_DATABASE}
  user: ${POSTGRES_USER}
  password: ${POSTGRES_PASSWORD}
  pool_size: 10
  max_overflow: 20

# Azure OpenAI (Embedding)
azure_openai:
  api_key: ${AZURE_OPENAI_API_KEY}
  endpoint: ${AZURE_OPENAI_ENDPOINT}
  embedding_model: text-embedding-ada-002
  embedding_dimension: 1536
  api_version: "2023-05-15"

# Azure AI Search (관련자료)
azure_search:
  endpoint: ${AZURE_SEARCH_ENDPOINT}
  api_key: ${AZURE_SEARCH_API_KEY}
  index_name: meeting-minutes-index
  api_version: "2023-11-01"

# Claude AI
claude:
  api_key: ${CLAUDE_API_KEY}
  model: claude-3-5-sonnet-20241022
  max_tokens: 1024
  temperature: 0.3

# Redis (캐싱)
redis:
  host: redis
  port: 6379
  db: 0
  password: ${REDIS_PASSWORD}
  decode_responses: true

# Azure Event Hub
eventhub:
  connection_string: ${EVENTHUB_CONNECTION_STRING}
  name: ${EVENTHUB_NAME}
  consumer_group: ${AZURE_EVENTHUB_CONSUMER_GROUP}
  storage:
    connection_string: ${AZURE_STORAGE_CONNECTION_STRING}
    container_name: ${AZURE_STORAGE_CONTAINER_NAME}

# Application Settings
app:
  name: "RAG Service"
  version: "1.0.0"
  debug: true
  log_level: INFO

# 용어집 설정
term_glossary:
  # 검색 설정
  search:
    top_k: 5
    confidence_threshold: 0.7
    keyword_weight: 0.6
    vector_weight: 0.4

  # 캐싱 설정
  cache:
    ttl: 3600  # 1시간
    prefix: "term:"

# 관련자료 설정
related_documents:
  # 검색 설정
  search:
    top_k: 3
    relevance_threshold: 0.70
    folder_weight_boost: 0.20
    semantic_ranking: true

  # 캐싱 설정
  cache:
    ttl: 3600  # 1시간
    prefix: "doc:"

# RAG 회의록 설정
rag_minutes:
  # 검색 설정
  search:
    top_k: 5
    similarity_threshold: 0.7

  # 캐싱 설정 (full_content 조회 결과 캐싱)
  cache:
    ttl: 1800  # 30분 (회의록은 변경이 적으므로 짧게 설정)
    prefix: "minutes:"
    related_ttl: 3600  # 연관 회의록 검색 결과는 1시간

# 데이터 로딩
data:
  terms_dir: design/aidata
  terms_files:
    - terms-01.json
    - terms-02.json
    - terms-03.json
    - terms-04.json
  documents_file: design/aidata/meet-ref.json
