-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathragix.yaml
More file actions
269 lines (225 loc) · 9.12 KB
/
ragix.yaml
File metadata and controls
269 lines (225 loc) · 9.12 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# =============================================================================
# RAGIX Configuration File
# =============================================================================
#
# This file configures all RAGIX components in a unified format.
# Environment variables override these settings (see documentation).
#
# Author: Olivier Vitrac, PhD, HDR | [email protected] | Adservio | 2025-11-26
#
# =============================================================================
version: "0.7.1"
# Root directory for sandboxed operations (default: current directory)
sandbox_root: "."
# -----------------------------------------------------------------------------
# LLM Backend Configuration
# -----------------------------------------------------------------------------
llm:
# Backend: "ollama" (sovereign), "claude" (cloud), "openai" (cloud)
backend: ollama
# Model name (depends on backend)
# Ollama: mistral, granite3.1-moe:3b, qwen2.5, deepseek-coder
# Claude: claude-sonnet-4-20250514, claude-opus-4-20250514
# OpenAI: gpt-4, gpt-4-turbo, gpt-3.5-turbo
model: mistral
# Ollama server URL
base_url: "http://localhost:11434"
# API key for cloud backends (prefer environment variable)
# Set ANTHROPIC_API_KEY or OPENAI_API_KEY instead
# api_key: null
# Generation parameters
temperature: 0.1
max_tokens: 4096
timeout: 120
# -----------------------------------------------------------------------------
# MCP Server Configuration
# -----------------------------------------------------------------------------
mcp:
enabled: true
host: localhost
port: 5173
# Available MCP tools
tools:
- ragix_chat
- ragix_scan_repo
- ragix_read_file
- ragix_search
- ragix_workflow
- ragix_health
- ragix_templates
# -----------------------------------------------------------------------------
# Safety & Security Configuration
# -----------------------------------------------------------------------------
safety:
# Profile: "strict" (read-only), "dev" (default), "unsafe" (expert)
profile: dev
# Allow destructive git commands (reset --hard, clean -fd, push --force)
allow_git_destructive: false
# Additional command patterns to block (regex)
additional_denylist: []
# Example:
# additional_denylist:
# - "curl.*-X DELETE"
# - "wget.*--delete"
# Air-gapped mode: force local-only LLM (blocks Claude/OpenAI)
air_gapped: false
# Enable SHA256 hashing of log files for integrity verification
log_hashing: true
hash_algorithm: sha256
# -----------------------------------------------------------------------------
# Search & Retrieval Configuration
# -----------------------------------------------------------------------------
search:
enabled: true
# Embedding model for vector search
embedding_model: all-MiniLM-L6-v2
# Fusion strategy: rrf, weighted, interleave, bm25_only, vector_only
fusion_strategy: rrf
# Weights for hybrid search (when using "weighted" strategy)
bm25_weight: 0.5
vector_weight: 0.5
# Default number of results
top_k: 10
# Index storage path
index_path: ".ragix/index"
# RRF parameter controlling rank sensitivity (moved from hardcoded)
rrf_k: 60
# Chunking parameters for RAG indexing
chunk_size: 1000 # Default chunk size in characters
chunk_overlap: 200 # Default overlap between chunks
max_file_size_mb: 10 # Maximum file size for indexing
# -----------------------------------------------------------------------------
# Logging Configuration
# -----------------------------------------------------------------------------
logging:
# Log level: DEBUG, INFO, WARNING, ERROR
level: INFO
# Log directory
log_dir: ".agent_logs"
# Command log file
commands_log: commands.log
# Hash signature file
hash_log: commands.log.sha256
# Log rotation
max_log_size_mb: 100
backup_count: 5
# -----------------------------------------------------------------------------
# Web UI Configuration
# -----------------------------------------------------------------------------
webui:
enabled: true
host: localhost
port: 8501
theme: dark
# -----------------------------------------------------------------------------
# Multi-Agent LLM Configuration
# -----------------------------------------------------------------------------
# Planner-Worker-Verifier architecture with configurable models per agent
agents:
# Mode: "minimal" (all 3B), "strict" (7B+ Planner), "custom" (user-defined)
mode: minimal
# Strict mode enforces: planner ≥7B, worker/verifier ≥3B
strict_enforcement: false
# Per-agent model assignment (used in strict/custom modes)
models:
planner: granite3.1-moe:3b # Creates [PLAN] for complex tasks
worker: granite3.1-moe:3b # Executes atomic steps with tools
verifier: granite3.1-moe:3b # Validates results against rules
# Fallback if assigned model unavailable
fallback_model: granite3.1-moe:3b
# Hardware profile (used for auto-configuration)
hardware:
vram_gb: 8 # Available VRAM in GB (auto-detected if 0)
prefer_cpu: false # Force CPU inference
max_concurrent_models: 1 # Number of models loaded simultaneously
# -----------------------------------------------------------------------------
# File Conversion Configuration
# -----------------------------------------------------------------------------
# External tools for converting PDF, DOCX, and other document formats to text.
# These tools are used by the file drop zone feature in the Web UI.
converters:
# PDF to text converter (poppler-utils)
# Install: sudo apt install poppler-utils
pdftotext:
enabled: true
path: pdftotext # Use 'which pdftotext' to find full path
options: ["-layout"] # Preserve layout
# Universal document converter (pandoc)
# Install: sudo apt install pandoc
# Handles: docx, doc, odt, rtf, html, epub, etc.
pandoc:
enabled: true
path: pandoc
output_format: plain # Output format: plain, markdown, html
options: ["--wrap=none"]
# Maximum file size for conversion (in bytes)
max_file_size_mb: 10
# Conversion timeout (in seconds)
timeout: 30
# -----------------------------------------------------------------------------
# Document Kernels Configuration (v0.63)
# -----------------------------------------------------------------------------
# Configuration for document processing kernels (KOAS doc_* kernels)
# Includes chunking, quality scoring, and clustering parameters
doc_kernels:
# Chunking strategy for document processing
chunking:
strategy: semantic # semantic, fixed, hybrid
target_tokens: 250 # Target chunk size in tokens (200-300 recommended)
overlap: paragraph # paragraph, percentage, fixed
overlap_tokens: 50 # Overlap tokens when using "fixed"
preserve_bullets: true # Keep bullet lists intact
preserve_tables: true # Keep tables intact
# Quality scoring configuration
quality:
quality_threshold: 0.4 # Minimum quality score to accept (0-1)
base_score: 0.5 # Starting score for quality computation
truncation_penalty: 0.2 # Penalty for truncated sentences
artifact_penalty: 0.3 # Penalty for markdown artifacts
entity_bonus: 0.1 # Bonus for named entities
numbers_bonus: 0.1 # Bonus for numbers/metrics
action_verb_bonus: 0.15 # Bonus for action verbs
# LLM intent classification (optional)
enable_llm_intent: false # Enable LLM-based intent classification
llm_intent_model: granite3.1-moe:3b
# Readiness index thresholds
mri_auto_threshold: 0.75 # Minutes Readiness Index: auto-itemizable
mri_assisted_threshold: 0.45 # MRI: needs assistance
sri_auto_threshold: 0.70 # Summarization Readiness Index: auto-summarize
sri_assisted_threshold: 0.50 # SRI: needs review
# Clustering configuration (unified for hierarchical and Leiden)
clustering:
method: both # hierarchical, leiden, both
min_cluster_size: 2 # Minimum documents per cluster
resolutions: [0.1, 0.5, 1.0] # Multi-resolution for Leiden
similarity_metric: jaccard # jaccard, cosine
# Extraction parameters
sentences_per_concept: 5
sentences_per_file: 10
min_sentence_length: 40
max_sentence_length: 500
# =============================================================================
# Environment Variable Overrides
# =============================================================================
#
# The following environment variables override config file values:
#
# RAGIX_LLM_BACKEND -> llm.backend
# RAGIX_LLM_MODEL -> llm.model
# RAGIX_PROFILE -> safety.profile
# RAGIX_AIR_GAPPED -> safety.air_gapped
# RAGIX_MCP_ENABLED -> mcp.enabled
# RAGIX_MCP_PORT -> mcp.port
# RAGIX_LOG_HASHING -> safety.log_hashing
# RAGIX_SANDBOX_ROOT -> sandbox_root
#
# Legacy variables (backward compatibility):
# UNIX_RAG_MODEL -> llm.model
# UNIX_RAG_SANDBOX -> sandbox_root
# UNIX_RAG_PROFILE -> safety.profile
#
# API keys (never stored in config file):
# ANTHROPIC_API_KEY -> Claude API key
# OPENAI_API_KEY -> OpenAI API key
#
# =============================================================================