--- license: apache-2.0 language: - en tags: - rag - retrieval - semantic-search - faiss - bm25 - cross-encoder - sentence-transformers - hybrid-search - dense-retrieval - ai - search pipeline_tag: sentence-similarity library_name: sentence-transformers --- # ApexRetriever A lightweight hybrid retrieval system designed for fast semantic search and RAG pipelines. Built for: - semantic search - lightweight RAG - AI assistants - retrieval systems - local document QA --- # Architecture ## Stage ① — BM25 Sparse Retrieval Keyword-based retrieval for fast lexical matching. ## Stage ② — Dense Semantic Search Powered by: - `BAAI/bge-small-en-v1.5` Uses FAISS vector indexing. ## Stage ③ — CrossEncoder Reranking Final neural reranking using: - `cross-encoder/ms-marco-MiniLM-L-6-v2` --- # Features - Hybrid retrieval - Fast indexing - Dense semantic search - Neural reranking - Lightweight deployment - GPU acceleration - FAISS support - Easy integration --- # Repository Structure ```text ApexRetriever/ │ ├── bi_encoder/ ├── reranker/ ├── pipeline.py └── README.md ```` --- # Installation ```bash pip install -U \ sentence-transformers \ transformers \ faiss-cpu \ rank-bm25 \ torch ``` --- # Quick Start ```python from pipeline import ApexRetriever retriever = ApexRetriever(model_dir=".") # Example documents docs = [ "Python was created by Guido van Rossum.", "Paris is the capital of France." ] retriever.index_documents(docs) results = retriever.retrieve( "Who created Python?", top_k=3 ) print(results) ``` --- # Use Cases * RAG systems * Semantic search * AI chatbots * Knowledge retrieval * Local search engines * Memory systems --- # Performance Recommended: * CUDA GPU * 8GB+ RAM * Python 3.10+ --- # Components | Component | Model | | ------------- | ------------------------------------ | | Dense Encoder | BAAI/bge-small-en-v1.5 | | Reranker | cross-encoder/ms-marco-MiniLM-L-6-v2 | | Vector Engine | FAISS | | Sparse Search | BM25 | --- # License Apache 2.0 --- > QuantaSparkLabs