# Advanced Template for multi-project configuration # For a simpler setup, see config.simplified.template.yaml # # Copy this file to config.yaml and customize it for your needs # Environment variables can be used with ${VARIABLE_NAME} syntax # Configuration Notes: # # 1. Project Structure: # - Each project has a unique project_id # - All projects use the global collection_name defined in global_config.qdrant.collection_name # - Each project defines its own sources configuration # # 2. Collection Strategy: # - All projects share the same Qdrant collection # - Project isolation is achieved through project_id metadata # - Simplifies collection management and cross-project search # # 3. Source Configuration: # - Each project can use any combination of source types # - Source configurations are project-specific # - Same source type can be used multiple times with different names # # 4. Environment Variables: # - Use ${VARIABLE_NAME} syntax for sensitive information # - Recommended for tokens, passwords, and URLs # - Set environment variables before running the application # # 5. Simplified Format: # - For single-project use, you can use top-level 'sources' instead of 'projects' # - See config.simplified.template.yaml for examples # - The system auto-wraps top-level sources into a default project # Global configuration shared across all projects global: # Qdrant vector database configuration qdrant: url: "${QDRANT_URL}" api_key: "${QDRANT_API_KEY}" # Optional API key for Qdrant Cloud collection_name: "${QDRANT_COLLECTION_NAME}" # Collection name used by all projects # Default chunking configuration # Controls how documents are split into chunks for processing chunking: chunk_size: 1500 # Maximum number of characters per chunk. Be careful not to set it too high to prevent token limits. chunk_overlap: 200 # Number of characters to overlap between chunks max_chunks_per_document: 500 # Maximum number of chunks per document (safety limit) enable_semantic_analysis: true # Master switch for NLP enrichment (spaCy + LDA) across all strategies. Disable for faster ingestion. enable_enhanced_semantic_analysis: false # Opt-in: pos_tags, dependencies, document_similarity. Requires enable_semantic_analysis: true. # Strategy-specific configurations for different content types strategies: # Default text chunking strategy configuration default: min_chunk_size: 100 # Minimum chunk size in characters enable_entity_extraction: true # Enable entity extraction from text # HTML content chunking strategy configuration html: simple_parsing_threshold: 100000 # Size threshold for simple vs complex HTML parsing (bytes) max_html_size_for_parsing: 500000 # Maximum HTML size for complex parsing (bytes) max_sections_to_process: 200 # Maximum number of sections to process max_chunk_size_for_nlp: 20000 # Maximum chunk size for NLP processing (characters) preserve_semantic_structure: true # Preserve HTML semantic structure in chunks # Code file chunking strategy configuration code: max_file_size_for_ast: 75000 # Maximum file size for AST parsing (characters) max_elements_to_process: 800 # Maximum number of code elements to process max_recursion_depth: 8 # Maximum AST recursion depth max_element_size: 20000 # Maximum size for individual code elements (characters) enable_ast_parsing: true # Enable AST parsing for code analysis enable_dependency_analysis: true # Enable dependency analysis for code # JSON file chunking strategy configuration json: max_json_size_for_parsing: 1000000 # Maximum JSON size for parsing (bytes) max_objects_to_process: 200 # Maximum number of JSON objects to process max_chunk_size_for_nlp: 20000 # Maximum chunk size for NLP processing (characters) max_recursion_depth: 5 # Maximum recursion depth for nested structures max_array_items_per_chunk: 50 # Maximum array items to include per chunk max_object_keys_to_process: 100 # Maximum object keys to process enable_schema_inference: true # Enable JSON schema inference # Markdown file chunking strategy configuration markdown: min_content_length_for_nlp: 100 # Minimum content length for NLP processing (characters) min_word_count_for_nlp: 20 # Minimum word count for NLP processing min_line_count_for_nlp: 3 # Minimum line count for NLP processing min_section_size: 500 # Minimum characters for a standalone section max_chunks_per_section: 1000 # Maximum chunks per section (prevents runaway chunking) max_overlap_percentage: 0.25 # Maximum overlap between chunks as percentage (0.25 = 25%) max_workers: 4 # Maximum worker threads for parallel processing estimation_buffer: 0.2 # Buffer factor for chunk count estimation (0.2 = 20%) words_per_minute_reading: 200 # Words per minute for reading time estimation header_analysis_threshold_h1: 3 # H1 header count threshold for split level decisions header_analysis_threshold_h3: 8 # H3 header count threshold for split level decisions enable_hierarchical_metadata: true # Enable extraction of hierarchical section metadata # Docling structure-aware chunking strategy (used for files converted by the # docling engine, i.e. file_conversion.engine: docling). Sizes chunks by a TOKEN # budget aligned to the embedding tokenizer — not the character chunk_size above. docling: # max_tokens: 512 # Per-chunk token budget. Omit to inherit embedding.max_tokens_per_chunk. include_context_in_embed: false # true => prepend the heading breadcrumb to each chunk's content (and its embedding) table_serialization: "triplets" # how tables become chunk text: "triplets" ('row, column = value' — embedding-friendly) or "markdown" (pipe rows — LLM/display-friendly) # Default embedding configuration # Controls how text is converted to vectors embedding: endpoint: "${LLM_BASE_URL}" # Ollama: Local Ollama OpenAI-compatible endpoint # OpenAI equivalent: https://api.openai.com/v1 model: "${LLM_EMBEDDING_MODEL}" # Ollama: Local embedding model name # OpenAI equivalent: text-embedding-3-small (1536 dimensions, cheaper) api_key: "${LLM_API_KEY}" # Ollama: Use the fixed value "ollama" (no real auth) # OpenAI: Your real API key (e.g. sk-xxxx) batch_size: 100 vector_size: ${VECTOR_SIZE} # MUST match model output dimension # OpenAI: text-embedding-3-small → 1536 tokenizer: "none" # Ollama: "none" # OpenAI: "cl100k_base" max_tokens_per_request: 8000 max_tokens_per_chunk: 8000 min_request_interval: 0.5 # Minimum seconds between embedding API requests, enforced across all # concurrent embed workers (see concurrency.max_embed_workers below). # Guards against provider rate limits (HTTP 429). # Ollama/local models: safe to lower to 0 # OpenAI/hosted providers: raise if you see 429s, lower if you have headroom # Unified LLM configuration (provider-agnostic) # New preferred configuration block; legacy embedding/markitdown fields still work llm: provider: "${LLM_PROVIDER}" # openai | ollama | azure_openai | custom base_url: "${LLM_BASE_URL}" # OpenAI: https://api.openai.com/v1 api_key: "${LLM_API_KEY}" # Ollama: Use "ollama", OpenAI: real API key api_version: null # Required for azure_openai (e.g., 2024-05-01-preview) headers: {} models: embeddings: "${LLM_EMBEDDING_MODEL}" #OpenAI equivalent: text-embedding-3-small chat: "${LLM_CHAT_MODEL}" #OpenAI equivalent: gpt-4o or gpt-3.5-turbo tokenizer: "none" # OpenAI: "cl100k_base" request: timeout_s: 30 max_retries: 3 backoff_s_min: 1 backoff_s_max: 30 rate_limits: rpm: 1800 tpm: 2000000 concurrency: 5 embeddings: vector_size: ${VECTOR_SIZE} # MUST match model output dimension # OpenAI: text-embedding-3-small → 1536 # Hybrid retrieval config. The `sparse` key name reflects that this block # is only consulted when sparse vectors are in play — once `enabled: true`, # Qdrant requires every vector slot in the collection to be named, so the # dense vector also needs a name here. In dense-only mode (enabled: false) # both names are ignored and the loader uses Qdrant's unnamed vector slot. sparse: enabled: false # Opt-in: enable dense+sparse collection schema and sparse upserts to turn on hybrid retrieval model: "bm25" # Sparse model family (default: bm25) dense_vector_name: "dense" # Named dense vector key in Qdrant (only consulted when sparse.enabled=true) sparse_vector_name: "sparse" # Named sparse vector key in Qdrant (only consulted when sparse.enabled=true) retrieval: use_qdrant_hybrid: false # MCP retrieval: requires sparse.enabled=true; set to true to use Qdrant fusion (dense+sparse) # Optional provider-specific options provider_options: # For Azure: set azure_endpoint explicitly if different from base_url azure_endpoint: null # For Ollama native servers: force endpoint behavior (auto|embed|embeddings) native_endpoint: auto # For Bedrock: configure AWS region and Titan model id # aws_region: "us-east-1" # model_id: "amazon.titan-embed-text-v2:0" # provisioned_throughput_arn: null # Semantic analysis configuration # Controls text processing and topic extraction semantic_analysis: num_topics: 3 # Number of topics to extract using LDA lda_passes: 10 # Number of passes for LDA training spacy_model: "en_core_web_md" # spaCy model for text processing # Options: en_core_web_sm (15MB, no vectors) # en_core_web_md (50MB, 20k vectors) - recommended # en_core_web_lg (750MB, 514k vectors) # Cross-encoder re-ranking configuration # Controls fine-grained re-ranking using cross-encoders for improved precision reranking: enabled: true # Enable cross-encoder re-ranking (improves precision) model: "cross-encoder/ms-marco-MiniLM-L-12-v2" # Cross-encoder model to use # Other options: # - cross-encoder/ms-marco-TinyBERT-L-2-v2 (ultra-fast, low quality) # - cross-encoder/ms-marco-MiniLM-L-12-v2 (fast, good quality) - recommended # - cross-encoder/ms-marco-MiniLM-L-6-v2 (faster, slightly lower quality) # - cross-encoder/qnli-distilroberta-base (very fast) device: "cpu" # Cross-encoder device to use # Other options: # - cpu: slow, stable, no GPU required # - cuda: fastest, requires NVIDIA GPU # - mps: medium speed, Apple Silicon (M1/M2/M3) batch_size: 32 # Batch size for scoring (higher = faster but more memory) # State management configuration # Controls how document ingestion state is tracked state_management: database_path: "${STATE_DB_PATH}" # Path to SQLite database file, ignored in workspace mode table_prefix: "qdrant_loader_" # Prefix for database tables connection_pool: # Connection pool settings size: 5 # Maximum number of connections timeout: 30 # Connection timeout in seconds # File conversion configuration # Controls how non-text files (PDF, Office docs, etc.) are converted to text file_conversion: # Maximum file size for conversion (in bytes) max_file_size: 52428800 # 50MB # Timeout for conversion operations (in seconds) conversion_timeout: 300 # 5 minutes # Conversion engine: "markitdown" (default) or "docling". # Docling converts files into a structured document (headings, tables, pages, # bounding boxes) that flows into the structure-aware docling chunking strategy # (see chunking.strategies.docling above). MarkItDown produces plain markdown. # NOTE: the docling engine currently applies to the localfile connector only; # other connectors (git, confluence, jira, publicdocs) still use MarkItDown # regardless of this setting. engine: "markitdown" # Docling engine settings (used when engine: docling) docling: # Baseline cost/fidelity bundle: "fast" (no OCR, fast tables), "accurate" # (accurate table structure), or "scanned" (full-page OCR, longer timeout). profile: "fast" # Optional overrides — omit to inherit from the profile baseline: # max_file_size: 52428800 # Maximum file size in bytes (50MB) # document_timeout: 300 # Per-document wall-clock timeout in seconds # enabled_formats: [pdf, docx, pptx, xlsx, image, csv] # Input formats to convert # device: "auto" # Inference device: auto, cpu, cuda, mps # num_threads: 4 # CPU threads for model inference # compile_models: false # torch.compile the models (slower start, faster runs) # artifacts_path: null # Pre-downloaded model dir (air-gapped/read-only deploys) # API image captioning (off by default). When enabled, docling sends each # picture to an OpenAI-compatible chat endpoint and the description flows # into the converted document (and into docling chunk text). picture: enabled: false # url: "https://api.openai.com/v1/chat/completions" # OpenAI-compatible endpoint # model: "gpt-4o-mini" # api_key: "${OPENAI_API_KEY}" # prompt: "Describe this image in a few sentences." # timeout: 60.0 # Per-image request timeout in seconds # concurrency: 1 # Parallel captioning requests # MarkItDown specific settings markitdown: # Enable LLM integration for image descriptions enable_llm_descriptions: false # LLM model for image descriptions (when enabled) llm_model: "gpt-4o" # LLM endpoint (when enabled) llm_endpoint: "https://api.openai.com/v1" # API key for LLM service (required when enable_llm_descriptions is True) llm_api_key: "${OPENAI_API_KEY}" # Worker queue runtime and scheduling configuration # Controls concurrent workers, retry behavior, and periodic incremental jobs workers: runtime: # Number of concurrent workers draining the queue worker_count: 4 # Visibility lease duration in seconds when a job is claimed lease_seconds: 60 # Maximum claim attempts before marking a job failed max_attempts: 3 # Exponential retry base in seconds (0 disables backoff) retry_backoff_base_seconds: 5 schedules: incremental_pull: # Set true to enable scheduler-driven periodic incremental jobs in serve mode enabled: false # Supports integer seconds or duration strings (e.g., 5s, 5m, 1h) interval: 5s # Ingestion pipeline concurrency configuration # Controls how many chunk/embed/upsert operations run in parallel during ingestion. # Unrelated to `workers` above, which governs the job-scheduling queue. concurrency: # Maximum number of documents chunked concurrently max_chunk_workers: 10 # Maximum number of embedding batch requests in flight concurrently max_embed_workers: 4 # Maximum number of Qdrant upsert batch requests in flight concurrently max_upsert_workers: 4 # Advisory queue size hint passed to pipeline workers queue_size: 1000 # Chunks per Qdrant upsert batch; omit to default to the embedding batch size # upsert_batch_size: 100 # Multi-project configuration # Define multiple projects, each with their own sources and settings # All projects use the global collection_name defined above projects: # Example project: Documentation docs-project: project_id: "docs-project" display_name: "Documentation Project" description: "Company documentation and guides" # Project-specific source configurations sources: # Public documentation sources (websites, documentation) publicdocs: # Example configuration for a documentation source # Note: Currently only crawls one level deep (links found on the base page) # Recursive crawling is not yet implemented company-docs: # Base URL of the documentation website (should be a directory, not a specific file) # Good: "https://docs.example.com/" or "https://docs.example.com/v1/" # Bad: "https://docs.example.com/index.html" (specific file) base_url: "https://docs.example.com/" # Specific version of the documentation to fetch version: "1.0" # Content type of the documentation content_type: "html" # Options: html, markdown, etc. # Optional: Specific path pattern to match documentation pages # Uses glob syntax: ** matches any directory, * matches any file # Pattern is matched against the path portion after base_url # Example: if base_url is "https://docs.example.com/" and full URL is # "https://docs.example.com/guide/intro.html", then path is "guide/intro.html" path_pattern: "*.html" # Match all HTML files # Optional: List of paths to exclude from processing exclude_paths: - "/docs/{version}/api-reference" - "/docs/{version}/changelog" # Optional: CSS selectors for content extraction # Helps identify and extract relevant content from HTML selectors: # Main content container selector content: "article.main-content" # Elements to remove (navigation, headers, footers) remove: - "nav" - "header" - "footer" - ".sidebar" # Code blocks to preserve (will be kept in the content) code_blocks: "pre code" # File conversion settings for this source # Enable file conversion for this connector enable_file_conversion: true # Download and process attachments download_attachments: true # Git repository sources git: # Example configuration for a documentation repository docs-repo: base_url: "https://github.com/example/docs.git" # Repository URL branch: "main" # Branch to process include_paths: # Paths to include (glob patterns) - "docs/**" - "README.md" exclude_paths: # Paths to exclude (glob patterns) - "docs/archive/**" - "node_modules/**" file_types: # File extensions to process - "*.md" - "*.rst" - "*.txt" max_file_size: 1048576 # Maximum file size in bytes (1MB) depth: 1 # Maximum directory depth to process token: "${DOCS_REPO_TOKEN}" # GitHub Personal Access Token or none # File conversion settings for this source # Enable file conversion for this connector enable_file_conversion: true # Example project: Code Repository code-project: project_id: "code-project" display_name: "Code Repository Project" description: "Source code and technical documentation" sources: git: # Example configuration for a code repository main-repo: base_url: "${CODE_REPO_URL}" # Use environment variable branch: "main" token: "${CODE_REPO_TOKEN}" # GitHub Personal Access Token or none include_paths: - "src/**" - "docs/**" - "README.md" exclude_paths: - "src/test/**" - "node_modules/**" - "venv/**" file_types: - "*.py" - "*.js" - "*.ts" - "*.java" - "*.go" - "*.md" - "*.rst" # File conversion settings for this source # Enable file conversion for this connector enable_file_conversion: true # Example project: Knowledge Base kb-project: project_id: "kb-project" display_name: "Knowledge Base Project" description: "Internal knowledge base and wiki" sources: # Confluence documentation sources confluence: # Example configuration for Confluence Cloud company-wiki: base_url: "https://mycompany.atlassian.net/wiki" # Confluence Cloud URL deployment_type: "cloud" # Deployment type: cloud, datacenter, or server space_key: "${CONFLUENCE_SPACE_KEY}" # Space to process content_types: # Types of content to process - "page" - "blogpost" include_labels: [] # Only process content with these labels exclude_labels: [] # Skip content with these labels token: "${CONFLUENCE_TOKEN}" # Confluence API token (from id.atlassian.com) email: "${CONFLUENCE_EMAIL}" # Confluence user email # File conversion settings for this source # Enable file conversion for this connector enable_file_conversion: true # Download and process attachments download_attachments: true # JIRA issue tracking sources jira: # Example configuration for Jira Cloud support-project: base_url: "https://mycompany.atlassian.net" # Jira Cloud URL deployment_type: "cloud" # Deployment type: cloud, datacenter, or server project_key: "${JIRA_PROJECT_KEY}" # Project to process requests_per_minute: 60 # Rate limit for API calls page_size: 50 # Number of issues per API request track_last_sync: true # Track last sync time for incremental updates token: "${JIRA_TOKEN}" # Jira API token (from id.atlassian.com) email: "${JIRA_EMAIL}" # Jira user email # File conversion settings for this source # Enable file conversion for this connector enable_file_conversion: true # Download and process attachments download_attachments: true # Example project: Local Files local-project: project_id: "local-project" display_name: "Local Files Project" description: "Local documentation and files" sources: # Local file sources localfile: # Example configuration for a local file source local-docs: base_url: "file:///path/to/local/files" # Base directory to scan include_paths: - "docs/**" - "README.md" exclude_paths: - "docs/archive/**" - "tmp/**" file_types: - "*.md" - "*.txt" - "*.py" - "*.json" - "*.yaml" max_file_size: 1048576 # Maximum file size in bytes (1MB) # File conversion settings for this source # Enable file conversion for this connector enable_file_conversion: true