version = 1 [llm] model = "ollama:gemini-3-flash-preview" temperature = 1.0 max_tokens = 4000 timeout = 120 [index] quantization = true chunk_size = 2000 chunk_overlap = 100 embeddings_batch_size = 16 # 16 files per batch - table.add() every 16 files for better persistence embeddings_max_tokens_per_batch = 100000 # Keep existing token limit flush_frequency = 2 # Flush every 2 batches = every 32 files for coordinated persistence require_git = true # Require git repository for indexing contextual_model = "ollama:gemini-3-flash-preview" contextual_descriptions = true contextual_batch_size = 20 mcp_index = false [search] max_results = 10 similarity_threshold = 0.55 top_k = 20 output_format = "markdown" max_files = 10 context_lines = 3 search_block_max_characters = 400 # Maximum characters to display per code/text/doc block graph_expansion = false # GraphRAG file-level expansion before reranking (matrix driver toggles this) [search.reranker] enabled = true model = "voyage:rerank-2.5" # Number of candidates to fetch from vector search before reranking top_k_candidates = 50 # Number of final results to return after reranking final_top_k = 10 [embedding] code_model = "voyage:voyage-4-large" text_model = "voyage:voyage-4" [graphrag] enabled = true use_llm = true [graphrag.llm] description_model = "ollama:minimax-m2.7" relationship_model = "ollama:minimax-m2.7" # AI processing batch size - how many files to analyze per AI call # Smaller values reduce API costs and token usage, larger values improve efficiency ai_batch_size = 16 # Maximum tokens per batch request to avoid exceeding model limits # Controls the total token count across all files in a single batch max_batch_tokens = 16384 # Timeout for batch AI requests in seconds # Longer timeouts accommodate larger batches but may delay processing batch_timeout_seconds = 60 # Whether to fallback to individual AI calls if batch processing fails # Recommended: true for reliability, false for strict batch-only processing fallback_to_individual = true # Maximum content sample size sent to AI for analysis (in tokens) # Controls token usage and context window management using existing token estimation max_sample_tokens = 1500 # Confidence threshold for filtering AI-discovered relationships (0.0-1.0) # Higher values = more selective, only high-confidence relationships # Recommended: 0.8 for production, 0.7 for development/exploration confidence_threshold = 0.6 # Weight assigned to architectural relationships discovered by AI # Higher values make AI-discovered relationships more prominent in graph architectural_weight = 0.9 # System prompt for AI architectural relationship discovery # Pure system instructions without data embedding relationship_system_prompt = """You are an expert software architect specializing in code analysis. Analyze the provided code files and identify meaningful ARCHITECTURAL relationships that go beyond simple imports. Focus on these relationship types: - 'imports': Module/package imports and dependencies - 'implements': Interface implementation, trait implementation - 'extends': Class inheritance, module extension - 'calls': Function/method calls between modules - 'uses': Utility usage, service consumption - 'configures': Configuration setup, dependency injection - 'factory_creates': Factory pattern instantiation - 'observer_pattern': Event listening, callback registration - 'strategy_pattern': Algorithm selection, behavior delegation - 'adapter_pattern': Interface adaptation, wrapper usage - 'architectural_dependency': High-level system dependencies Respond with a JSON array of relationships. Each relationship must include: - source_path: relative path of source file - target_path: relative path of target file - relation_type: one of the types listed above - description: specific explanation of HOW the relationship works - confidence: 0.0-1.0 confidence score (use 0.8+ for clear relationships) Only include relationships with clear architectural significance. Avoid trivial imports.""" # System prompt for AI file description generation # Pure system instructions - file data sent separately description_system_prompt = """You are a senior software engineer analyzing code architecture. Provide a concise 3-5 sentence description of the file's ROLE and PURPOSE in the system. Focus on: - What architectural layer this file belongs to (API, business logic, data access, utilities, etc.) - Its primary responsibility and how it contributes to the system - Key patterns or architectural decisions it implements Avoid listing specific functions/classes. Instead, describe the file's architectural significance and how it fits into the larger system design.""" [search.hybrid] # Enable hybrid search combining vector similarity with keyword matching enabled = true # Weight for vector similarity signal (0.0-1.0) default_vector_weight = 0.7 # Weight for keyword matching signal (0.0-1.0) default_keyword_weight = 0.3 # RRF dampening constant k (Cormack et al. 2009). rrf_k = 60.0 # Per-query deterministic vector/keyword weight tilt (identifier vs natural-language). auto_weight = false # Weight for keyword matches in path/filename keyword_path_weight = 2.0 # Weight for keyword matches in content keyword_content_weight = 1.0 # Weight for keyword matches in symbols (code blocks only) keyword_symbols_weight = 2.5 # Weight for keyword matches in title (document blocks only) keyword_title_weight = 3.0 [search.reasoning] enabled = false model = "deepseek:deepseek-v4-flash" max_candidates = 25 final_top_k = 10 context_level = "full" reasoning_weight = 2.0