File size: 5,505 Bytes
d520909 |
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 |
# RAG (Retrieval-Augmented Generation) Configuration
# SPARKNET Document Intelligence Integration
# =============================================================================
# Vector Store Settings
# =============================================================================
vector_store:
# Store type: "chroma" (default) or "memory" (for testing)
type: chroma
# ChromaDB settings
chroma:
# Persistence directory for vector store
persist_directory: "./.sparknet/chroma_db"
# Collection name for document chunks
collection_name: "sparknet_documents"
# Distance metric: "cosine" (default), "l2", or "ip"
distance_metric: cosine
# Anonymized telemetry (set to false to disable)
anonymized_telemetry: false
# =============================================================================
# Embedding Settings
# =============================================================================
embeddings:
# Provider: "ollama" (default, local) or "openai" (cloud, requires API key)
provider: ollama
# Ollama settings (local, privacy-preserving)
ollama:
# Model name for embeddings
# Recommended: nomic-embed-text (768 dims) or mxbai-embed-large (1024 dims)
model: nomic-embed-text
# Ollama server URL
base_url: "http://localhost:11434"
# Request timeout in seconds
timeout: 30
# OpenAI settings (cloud, disabled by default)
openai:
# IMPORTANT: OpenAI is disabled by default for privacy
# Set to true only if you explicitly need cloud embeddings
enabled: false
# Model name (if enabled)
model: text-embedding-3-small
# API key (from environment variable OPENAI_API_KEY)
# Never store API keys in config files
api_key_env: OPENAI_API_KEY
# Caching settings
cache:
# Enable embedding cache for faster re-processing
enabled: true
# Maximum cache entries
max_entries: 10000
# =============================================================================
# Indexer Settings
# =============================================================================
indexer:
# Batch size for embedding generation
batch_size: 32
# Include bounding box metadata
include_bbox: true
# Include page numbers
include_page: true
# Include chunk type labels
include_chunk_type: true
# Skip empty chunks
skip_empty_chunks: true
# Minimum chunk text length (characters)
min_chunk_length: 10
# =============================================================================
# Retriever Settings
# =============================================================================
retriever:
# Default number of results to return
default_top_k: 5
# Maximum results to return
max_results: 20
# Minimum similarity score (0.0 - 1.0)
# Chunks below this threshold are filtered out
similarity_threshold: 0.5
# Enable result reranking (experimental)
enable_reranking: false
# Number of results to rerank
rerank_top_k: 10
# Include evidence references in results
include_evidence: true
# Maximum snippet length in evidence
evidence_snippet_length: 200
# =============================================================================
# Generator Settings (Answer Generation)
# =============================================================================
generator:
# LLM provider for answer generation: "ollama" (default) or "openai"
provider: ollama
# Ollama settings (local)
ollama:
# Model for answer generation
# Recommended: llama3.2, mistral, or phi3
model: llama3.2
# Ollama server URL
base_url: "http://localhost:11434"
# Request timeout in seconds
timeout: 60
# Generation parameters
temperature: 0.1
max_tokens: 1024
# OpenAI settings (cloud, disabled by default)
openai:
enabled: false
model: gpt-4o-mini
api_key_env: OPENAI_API_KEY
temperature: 0.1
max_tokens: 1024
# Confidence settings
min_confidence: 0.5
# Abstention policy
# When true, the system will refuse to answer if confidence is too low
abstain_on_low_confidence: true
abstain_threshold: 0.3
# Maximum context length for LLM
max_context_length: 8000
# Require citations in answers
require_citations: true
# =============================================================================
# Document Intelligence Integration
# =============================================================================
document_intelligence:
# Parser settings
parser:
render_dpi: 200
max_pages: null # null = no limit
# Extraction settings
extraction:
min_field_confidence: 0.5
abstain_on_low_confidence: true
# Grounding settings
grounding:
enable_crops: true
crop_output_dir: "./.sparknet/crops"
# =============================================================================
# Performance Settings
# =============================================================================
performance:
# Number of parallel workers for batch processing
num_workers: 4
# Chunk processing batch size
chunk_batch_size: 100
# Enable async processing where supported
async_enabled: true
# =============================================================================
# Logging Settings
# =============================================================================
logging:
# Log level: DEBUG, INFO, WARNING, ERROR
level: INFO
# Log RAG queries and results
log_queries: false
# Log embedding operations
log_embeddings: false
|