Downloads · 30 days
4
14% of all-time downloads
alirezaaminzadeh/or-knowledge-copilot-retriever
or-knowledge-copilot-retriever is a machine learning model from alirezaaminzadeh. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for scikit-learn. The card lists the license as apache-2.0.
Hybrid BM25 + word TF-IDF + character TF-IDF index for multi-layer operations-research knowledge (formulation, code, solver traces).
Downloads · 30 days
4
14% of all-time downloads
All-time downloads
28
Public
Repo size
737 KB
Likes
0
Public
Click a slice to open those files.
.joblib369 KB · 99%
From the Hugging Face model README
Hybrid BM25 + word TF-IDF + character TF-IDF index for multi-layer operations-research knowledge (formulation, code, solver traces).
This artifact is a fitted lexical index, not a fine-tuned transformer. It is intended for CPU Spaces and on-prem retrieval without GPU.
| File | Role |
|---|---|
hybrid_index.joblib | Vectorizers, TF-IDF matrices, BM25 statistics |
config.json | Vocabulary sizes and chunk count |
from ragkit.pipeline import RAGPipeline
from domain.corpus import SYNONYMS, router, PRODUCT
pipe = RAGPipeline(
chunks_path="dataset/chunks.jsonl",
model_path="model/hybrid_index.joblib",
synonyms=SYNONYMS,
product=PRODUCT,
router=router,
)
print(pipe.ask("What spinning reserve does GridWest unit commitment enforce?").answer)
See eval_results.json on the companion dataset alirezaaminzadeh/or-knowledge-copilot-corpus.