refactor: composite retriever and make reranker optional #144
      
        
          +541
        
        
          −60
        
        
          
        
      
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This pull request introduces several improvements and updates across the infrastructure and core backend logic, focusing on standardizing configuration, enhancing retriever and reranker functionality, and modernizing cluster setup. The most significant changes include refactoring the retriever/reranker pipeline for better performance and configurability, switching to the official Kubernetes ingress-nginx controller, updating configuration files for clarity and consistency, and making the cluster setup script more robust and idempotent.
Retriever and Reranker Enhancements:
CompositeRetrieverto execute retriever calls concurrently usingasyncio.gather, reducing latency, and improved duplicate filtering to O(1) complexity. Added configuration for global document caps and reranker toggling. [1]R47, [2] [3] [4]dependency_container.pyto pass new reranker parameters (enabled,score_threshold,total_k_documents,k_documents) for finer control. [1] [2]Infrastructure and Helm Chart Updates:
nginx-ingress-controllerto the officialingress-nginxHelm chart with pinned versions for both the chart and controller image, ensuring alignment between scripts and Helm dependencies. [1] [2]Configuration Consistency and Clarity:
RETRIEVER_TOTAL_K_DOCUMENTS,RERANKER_ENABLED) in bothvalues.yamlandREADME.mdfor clarity and future-proofing. [1] [2] [3]Cluster Setup Script Improvements:
setup-k3d-cluster.shto be idempotent, check for existing clusters, fail fast on errors, and install/upgrade the official ingress-nginx chart with robust status checks.Build and Sync Ignore List Refactoring:
Tiltfileto reduce duplication and improve maintainability. [1] [2] [3] [4] [5] [6] [7]