WalkXR-AI / src / walkxr_ai / rag / rag_config.yaml
rag_config.yaml
Raw
# -----------------------------------------------------------------------------
# WalkXR-AI RAG Pipeline Configuration
#
# This file controls the behavior of the Retrieval-Augmented Generation (RAG)
# system. It allows for easy modification of models, paths, and strategies
# without changing the core application code.
# -----------------------------------------------------------------------------

# The root directory containing the knowledge base documents (e.g., .md, .txt files).
data_dir: "docs/"

# Embedding and Language Model settings from Ollama.
embed_model: "nomic-embed-text"  # Model for creating vector embeddings.
llm_model: "llama3"              # Model for generating responses (used by agents).

# Vector Database (ChromaDB) storage configuration.
storage:
  persist_dir: "vector_store/"     # Standardized directory to save the vector database.
  collection_name: "walkxr_knowledge_base" # Name of the collection within ChromaDB.

# Document chunking configuration. This is critical for RAG performance.
chunking:
  # Strategy can be 'sentence' or 'semantic'.
  # 'sentence': Fast, simple, based on fixed sizes.
  # 'semantic': Slower but more context-aware, uses the embedding model to find logical breaks.
  strategy: "semantic"

  sentence: # Settings for the 'sentence' strategy
    chunk_size: 512
    chunk_overlap: 50

  semantic: # Settings for the 'semantic' strategy
    buffer_size: 1
    breakpoint_percentile_threshold: 95 # Lower for smaller chunks, higher for larger chunks.

# Retrieval configuration.
retrieval:
  similarity_top_k: 3 # Number of the most similar chunks to retrieve for a given query.