stackfix / README.md
korunil's picture
Update README.md
6e738cc verified
|
Raw
History Blame Contribute Delete
3.22 kB
---
license: apache-2.0
---
---
language:
- en
tags:
- nlp
- retrieval
- rag
- faiss
- bm25
- semantic-search
- stackoverflow
- code-generation
- information-retrieval
size_categories:
- 10M<n<100M
pretty_name: StackFix Indexes (Pre-Built)
---
# ๐Ÿ“š StackFix Indexes (Pre-Built)
Pre-built FAISS and BM25 indexes for high-quality StackOverflow retrieval.
Designed for:
- RAG systems
- Agentic debugging
- Code retrieval
- LLM augmentation
- Semantic search pipelines
These indexes were generated using the top-scoring 1.1 million StackOverflow Q&A pairs and optimized for programming-related retrieval tasks.
---
# ๐Ÿ“Š Dataset Statistics
| Metric | Value |
|---|---|
| Total Documents | 1,102,568 Q&A pairs |
| Selection Strategy | Highest-scored answer per question |
| Average StackOverflow Score | 3.31 |
| Embedding Model | `BAAI/bge-base-en-v1.5` |
| Embedding Dimensions | 768 |
| Similarity Metric | Cosine Similarity |
| Vector Normalization | Enabled |
# ๐Ÿท๏ธ Top 10 Tags / Languages
| Tag | Question Count |
|---|---:|
| javascript | 108,637 |
| java | 100,781 |
| c# | 90,035 |
| php | 87,354 |
| android | 74,596 |
| jquery | 70,002 |
| python | 57,082 |
| html | 53,261 |
| c++ | 43,040 |
| ios | 39,329 |
---
# ๐Ÿง  Embedding Architecture
## Dense Retrieval
- Model: `BAAI/bge-base-en-v1.5`
- FAISS-based vector search
- Normalized embeddings for cosine similarity
## Sparse Retrieval
- BM25 keyword index
- Optimized for hybrid retrieval workflows
## Retrieval Text Construction
Questions, accepted/highest-scored answers, and code blocks were merged into a unified `retrieval_text` field during preprocessing.
This structure improves:
- semantic debugging retrieval
- code-aware search
- agentic reasoning pipelines
- long-context augmentation
---
# ๐Ÿ“ฆ Included Files
| File | Description |
|---|---|
| `faiss_index/` | Pre-built FAISS vector index |
| `bm25_index.pkl` | Serialized BM25 retrieval index |
---
# ๐Ÿ“ฅ Usage
1. Download the files from this repository.
2. Place them inside:
```bash
./model_cache/
```
3. Launch your application:
```bash
chainlit run app.py
```
The system will automatically detect and load the indexes.
---
# ๐Ÿ“š Source Dataset
The indexes were built using the public StackSample dataset hosted on Kaggle:
https://www.kaggle.com/datasets/stackoverflow/stacksample/data
The original data contains StackOverflow question-answer pairs and metadata.
---
# โš–๏ธ Licensing & Attribution
This repository distributes derived retrieval indexes and preprocessing artifacts under the Apache 2.0 license.
Original StackOverflow content and associated rights belong to their respective owners.
Please ensure appropriate attribution when redistributing derived works or generated datasets.
---
# ๐Ÿš€ Recommended Use Cases
- Retrieval-Augmented Generation (RAG)
- AI coding assistants
- StackOverflow semantic search
- Agentic debugging systems
- Code question answering
- Hybrid retrieval pipelines
---
# โŒ Not Recommended For
- Exact code formatting retrieval
- Production-grade syntax reconstruction
- Legal/compliance-sensitive archival applications
---
# ๐Ÿ™Œ Acknowledgements
- StackOverflow
- BAAI
- FAISS
- Hugging Face