Once a GPU became available, switched the default model from llama3.2:3b (CPU) to qwen2.5:14b (GPU): added an NVIDIA GPU reservation to the ollama service in docker-compose.yml and updated the default OLLAMA_MODEL in config.py/.env.example. Re-running the eval surfaced a new regression: the out-of-scope "weather" question got classified as policy_question by the new model. Fixed by adding an explicit negative example to _CLASSIFY_PROMPT. Archived the llama3.2:3b eval/load-test reports under eval/results/llama3.2-3b/ and re-ran both suites against qwen2.5:14b, documenting the comparison in the README (accuracy 11/16 -> 12/16, ~4.3x latency improvement, see sections 5.1/6.1). Refs #13
26 lines
944 B
Python
26 lines
944 B
Python
"""Central, environment-driven configuration for the agent."""
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
PROJECT_ROOT = Path(__file__).resolve().parent.parent
|
|
|
|
OLLAMA_MODEL = os.getenv("OLLAMA_MODEL", "qwen2.5:14b")
|
|
OLLAMA_BASE_URL = os.getenv("OLLAMA_BASE_URL", "http://localhost:11434")
|
|
|
|
EMBEDDING_MODEL = os.getenv("EMBEDDING_MODEL", "sentence-transformers/all-MiniLM-L6-v2")
|
|
|
|
POLICY_DOCS_DIR = Path(os.getenv("POLICY_DOCS_DIR", PROJECT_ROOT / "app" / "data" / "policies"))
|
|
INDEX_DIR = Path(os.getenv("INDEX_DIR", PROJECT_ROOT / "app" / "data" / "index"))
|
|
TICKETS_DB_PATH = Path(os.getenv("TICKETS_DB_PATH", PROJECT_ROOT / "app" / "data" / "tickets.db"))
|
|
|
|
RAG_TOP_K = int(os.getenv("RAG_TOP_K", "4"))
|
|
RAG_MAX_REWRITES = int(os.getenv("RAG_MAX_REWRITES", "2"))
|
|
|
|
CHUNK_SIZE = int(os.getenv("CHUNK_SIZE", "500"))
|
|
CHUNK_OVERLAP = int(os.getenv("CHUNK_OVERLAP", "50"))
|