-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.template
More file actions
85 lines (67 loc) · 5.53 KB
/
Copy path.env.template
File metadata and controls
85 lines (67 loc) · 5.53 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
## Core API Keys
OPENAI_API_KEY="" # Used for LLM (GPT-4o) and text embeddings via OpenAI.
HUGGING_FACE_TOKEN="" # Used for Named Entity Recognition (NER) to extract location names.
OPENWEATHER_API_KEY="" # Used to fetch weather data from OpenWeatherMap.
## Optional Integrations
LITERAL_API_KEY="" # (Optional) For observability with Literal.dev. Along with Authentication Enabled, User can maintain chat persistence. Remove this key to disable chat persistence.
## Chainlit Authentication (JWT-based)
ENABLE_AUTH=False # Set to true to require login (username=admin/password=1234); false for public access.
CHAINLIT_AUTH_SECRET="" # Used to sign JWT tokens in Chainlit for user sessions.
## OAuth2 via Auth0 (Optional - enable if using Auth0 login)
OAUTH_AUTH0_CLIENT_ID="" # Auth0 client ID for OAuth login.
OAUTH_AUTH0_CLIENT_SECRET="" # Auth0 client secret.
OAUTH_AUTH0_DOMAIN="" # Auth0 domain (e.g., your-tenant.auth0.com).
## ChromaDB Group Preview (Startup Logs)
GROUP_PREVIEW_ENABLED=True # Whether to display grouped document summary when app starts.
GROUP_PREVIEW_LIMIT=5 # Max number of document groups to preview (e.g., 5 manuals).
## Top-K Retrieval Results
TOP_K_RETRIEVAL_RESULTS=3 # Number of top similar chunks to log after retrieval (terminal log only)
## Image Base Path for Reference Previews
IMAGE_BASE_PATH=./data/images # Base folder for reference page images. Format: ./base/{doc_id}/{page_id}.png
## Toggle whether to display reference previews after answering.
SHOW_REFERENCES=True
## If True, expects OPENAI_API_KEY via Chainlit `user_env`.
ENABLE_USER_ENV=False # NOTE: This must be synced with your config.toml's [user_env] block.
## Decoupled Retrieval & Synthesis Feature Toggle
ENABLE_DECOUPLED_SYNTHESIS=True # Enable/disable the feature entirely
## Chunk Grouping Parameters
CHUNK_GROUP_FIELD=parent_id # Field to use for grouping chunks (default: parent_id)
CHUNK_SYNTHESIS_MIN=1 # Minimum number of chunks required for synthesis
CHUNK_SYNTHESIS_MAX=6 # Maximum number of chunks to group together
CHUNK_SYNTHESIS_ORDERED=True # Whether to sort chunks by chunk_index before synthesis
## Short-Term Chat Context
ENABLE_CHAT_HISTORY_CONTEXT=True # Enable short-term memory using cl.user_session
MAX_CHAT_TURNS=3 # Number of recent user/assistant turns to include (each turn = 2 messages)
## Weather Bot
WEATHER_KEYWORD_THRESHOLD=1 # Minimum keyword hits before triggering weather query detection
## Session-Based Evaluation
ENABLE_SESSION_EVAL=True # Whether to enable session-based evaluation logging for RAG queries
EVAL_TRIGGER_KEYWORD="!freeze_eval" # Keyword the user can send to freeze the evaluation and save logs/metrics
EVAL_OUTPUT_DIR=./evals # Directory where evaluation logs and metrics will be stored
EVAL_OUTPUT_FORMAT=json # File format for saved logs: json | csv | both
EVAL_MAX_LOGGED_QUERIES=0 # Max number of queries to retain in memory (0 = unlimited)
EVAL_ZIP_EXPORT=True # Optional zip export of evaluation sessions
## Evaluation Replay Settings
EVAL_REPLAY_ENABLED=True # Enables !replay_eval <filename> command to replay saved sessions
EVAL_REPLAY_TOP_K=3 # Number of top-k chunks to show per query during replay
EVAL_REPLAY_TRIGGER="!replay_eval" # Trigger keyword to initiate a replay command
## Evaluation List Settings
EVAL_LIST_ENABLED=True # Enables !list_evals command to list available evaluation logs
EVAL_LIST_TRIGGER="!list_evals" # Trigger to list all saved evaluation sessions in the ./evals folder
EVAL_LIST_LIMIT=10 # Max number of evaluation logs to show when listing sessions
EVAL_LIST_FORMAT=both # File format to display summaries when listing evaluations: json, csv, or both
## Evaluation Comparison Settings
EVAL_COMPARE_ENABLED=True # Enables !compare_eval <file1> <file2> to compare two evaluation logs
EVAL_COMPARE_TRIGGER="!compare_eval" # Trigger keyword for comparison
# Whether to offer download button after evaluation zip is created
EVAL_OFFER_DOWNLOAD=True
## QA Dataset Generation Settings
ENABLE_QA_DATASET_GENERATION=False # Enable or disable synthetic QA dataset generation (used for retrieval evaluation)
QA_NUM_QUESTIONS=1 # Number of questions to generate per chunk for synthetic QA dataset
QA_SOURCE_FILE_FILTER="MF-194" # Optional filter to restrict QA generation to a specific manual (e.g., MF-194)
QA_EMBEDDING_MODE_FILTER="full" # Optional filter for embedding mode ("chunked" or "full")
# WARNING: If left empty or set to "chunked" on large chunked+full collections, synthetic QA generation may trigger more OpenAIAPI calls and hit rate limits.
# To reduce load, set to "full" or filter by a smaller manual.
QA_MATCH_THRESHOLD=0.15 # Minimum semantic similarity (cosine) to match user query with synthetic QA (used in fuzzy matching for retrieval metrics)
# Lower values allow looser matches (e.g., paraphrased questions); higher values enforce stricter alignment.
RETRIEVAL_DEBUG_MODE=False # TODO