--- license: cc-by-nc-4.0 task_categories: - text-retrieval - question-answering language: - en tags: - rag - retrieval-augmented-generation - biomedical - neuroscience - rare-disease - STXBP1 - epilepsy - chromadb - vector-database - sentence-transformers - bge size_categories: - 100K 💡 **This is the lightweight version** — BGE-base runs efficiently on **CPU/system RAM** without requiring a GPU, making it ideal for free-tier deployments and local development. For maximum retrieval quality with NVIDIA's state-of-the-art 2048-dimensional embeddings (requires GPU with 2-4GB VRAM), see our premium database: **[STXBP1-RAG-Nemotron](https://huggingface.co/datasets/SkyWhal3/STXBP1-RAG-Nemotron)** ## 🆕 What's New in v9 | Feature | v8 (Previous) | v9 (Current) | |---------|---------------|--------------| | **Embedding Model** | all-MiniLM-L6-v2 | **BGE-base-en-v1.5** | | **Dimensions** | 384 | **768** | | **Model Params** | 22M | **110M** | | **MTEB Score** | ~56 | **~63** | | **Corpus** | 31,786 papers (unfiltered) | **~17,000 papers (curated)** | | **Chunks** | 1.19M (58% noise) | **~570K (high relevance)** | | **Quality Focus** | Quantity | **Precision** | ### Why BGE? - **2x embedding dimensions** = finer semantic distinctions - **5x larger model** = better understanding of biomedical terminology - **Curated corpus** = removed irrelevant papers, kept STXBP1-focused content - **MTEB benchmark leader** = proven retrieval performance ## 📊 Dataset Statistics | Metric | Value | |--------|-------| | **Total Chunks** | ~570,000 | | **Source Papers** | ~17,000 PMC articles | | **Database Size** | ~8-10 GB | | **Embedding Model** | `BAAI/bge-base-en-v1.5` (768 dimensions) | | **Chunk Size** | ~1500 chars with 200 char overlap | | **Index Type** | ChromaDB with HNSW | | **Build Date** | January 2026 | ## 🎯 Purpose This database powers the **STXBP1-ARIA** therapeutic discovery system, enabling: - **Literature-grounded responses** with PMC citations - **Semantic search** across decades of research - **Real-time retrieval** for AI-assisted variant analysis - **Evidence-based therapeutic recommendations** ## 📁 Contents ``` STXBP1-RAG-Database/ ├── chroma.sqlite3 # Main database ├── metadata.json # Build info └── [uuid]/ # HNSW index files ├── data_level0.bin # Vector index ├── header.bin ├── index_metadata.pickle ├── length.bin └── link_lists.bin ``` ## 🔧 Usage ### Quick Start ```python from huggingface_hub import snapshot_download import chromadb from chromadb.config import Settings from sentence_transformers import SentenceTransformer # Download database db_path = snapshot_download( repo_id="SkyWhal3/STXBP1-RAG-Database", repo_type="dataset" ) # Load embedding model (MUST match indexing model!) embedder = SentenceTransformer("BAAI/bge-base-en-v1.5") # Connect to ChromaDB client = chromadb.PersistentClient( path=db_path, settings=Settings(anonymized_telemetry=False) ) # Get collection collection = client.get_collection("stxbp1_papers") print(f"Loaded {collection.count():,} chunks") # Search (BGE recommends query prefix for retrieval) query = "STXBP1 dominant negative mechanism therapeutic approaches" query_embedding = embedder.encode(query, normalize_embeddings=True).tolist() results = collection.query( query_embeddings=[query_embedding], n_results=10, include=["documents", "metadatas", "distances"] ) for doc, meta, dist in zip( results['documents'][0], results['metadatas'][0], results['distances'][0] ): pmcid = meta.get('pmcid', meta.get('pmc_id', 'Unknown')) print(f"[{pmcid}] (distance: {dist:.3f})") print(f"{doc[:200]}...\n") ``` ### With ARIA Integration See the full retriever implementation at: [STXBP1-Variant-Lookup Space](https://huggingface.co/spaces/SkyWhal3/STXBP1-Variant-Lookup) ## 📚 Curated Corpus Unlike v8's broad collection, v9 uses a **curated corpus** filtered for STXBP1 relevance: ### Primary Keywords (Auto-include) - STXBP1, Munc18-1, Munc18, syntaxin binding protein - UNC-18, N-Sec1 ### Related Keywords (Relevance filtered) - **Epilepsy**: epileptic encephalopathy, Ohtahara, West syndrome, Dravet, infantile spasms - **Synaptic**: SNARE complex, syntaxin-1, synaptic vesicle, exocytosis, neurotransmitter release - **Genetics**: haploinsufficiency, dominant negative, nonsense/missense/frameshift mutations - **Therapeutics**: gene therapy, AAV, ASO, CRISPR, base editing, prime editing - **Chaperones**: 4-PBA, phenylbutyrate, protein folding, proteostasis - **Neurodevelopment**: intellectual disability, developmental delay, autism ### Curated Entries Includes 24 hand-curated entries covering: - Key primary research (Guiberson 2018, Kovacevic 2018, etc.) - Therapeutic mechanism summaries - Variant-specific knowledge - Clinical trial information ## 🏗️ How It Was Built ### 1. Corpus Curation - Filtered 27,000 multimodal PMC papers by relevance keywords - Kept ~17,000 papers with direct STXBP1 relevance - Added 41 targeted high-value papers - Included 24 curated expert entries ### 2. Text Processing - Chunked documents into ~1500 character segments - 200 character overlap between chunks - Preserved document metadata (PMC ID, title) ### 3. Embedding Generation - Used `BAAI/bge-base-en-v1.5` (768 dimensions) - Normalized embeddings for cosine similarity - GPU-accelerated batch processing ### 4. Index Building - ChromaDB with persistent storage - HNSW index optimized for semantic search - Built on RTX 3080 in ~55 minutes ## 📋 Metadata Schema Each chunk includes: ```json { "pmcid": "PMC1234567", "title": "Paper title", "chunk_idx": 0, "source": "multimodal_corpus" } ``` Source types: - `multimodal_corpus` - Papers from curated PMC collection - `targeted_paper` - High-priority STXBP1 papers - `curated` - Hand-written expert entries ## 🔬 Use Cases 1. **Therapeutic Research** - Find evidence for treatment approaches 2. **Variant Analysis** - Locate papers discussing specific mutations 3. **Mechanism Understanding** - Search for molecular pathway details 4. **Clinical Context** - Find case reports and trial results 5. **Literature Review** - Rapid survey of research landscape ## ⚡ Performance Notes - **Free Tier Compatible**: BGE-base runs on CPU or minimal GPU - **Query Time**: <100ms typical retrieval - **Memory**: ~1-2GB RAM for embedding model ## 🔗 Related Resources - **STXBP1-ARIA MAX** (Nemotron embeddings): Coming soon - **STXBP1-Variant-Lookup**: [HuggingFace Space](https://huggingface.co/spaces/SkyWhal3/STXBP1-Variant-Lookup) - **STXBP1 Foundation**: [stxbp1disorders.org](https://www.stxbp1disorders.org/) - **ClinVar STXBP1**: [NCBI ClinVar](https://www.ncbi.nlm.nih.gov/clinvar/?term=STXBP1) ## 📄 Citation ```bibtex @dataset{stxbp1_rag_database_2026, author = {Freygang, Adam}, title = {STXBP1-ARIA RAG Database v9: BGE-Embedded Biomedical Literature for Therapeutic Discovery}, year = {2026}, publisher = {HuggingFace}, url = {https://huggingface.co/datasets/SkyWhal3/STXBP1-RAG-Database} } ``` ## 📧 Contact **Adam Freygang** AI/ML Engineer & STXBP1 Parent Researcher [SkyWhal3 on HuggingFace](https://huggingface.co/SkyWhal3) --- *Built with ❤️ for the STXBP1 community* *Part of the NeuroSenpai + STXBP1-ARIA therapeutic discovery system*