Skip to content

Commit f86b91a

Browse files
committed
docs: position quorabust as semantic matching service
1 parent 532d6b3 commit f86b91a

3 files changed

Lines changed: 100 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- `POST /predict?explain=true` feature-value explanations for scored pairs.
1313
- `quorabust-train --metadata-out` for JSON metadata sidecars.
1414
- Thresholded `/predict` decisions with artifact/env defaults and per-request override.
15+
- Enterprise product-positioning guide for semantic matching use cases and production gaps.
1516

1617
### Fixed
1718
- Capped NumPy below 2.5 so Mypy can parse dependency stubs with the configured

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ operational shape of an ML-backed backend service.
1010

1111
📐 **Architecture & diagrams:** [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — component
1212
overview, training pipeline, train-vs-serve sequence, and the artifact/registry contract.
13+
**Enterprise positioning:** [docs/PRODUCT.md](docs/PRODUCT.md) — product surface,
14+
buyer-facing use cases, method strategy, and production gaps.
1315

1416
## What it demonstrates
1517

@@ -124,7 +126,8 @@ pytest -q --cov=quorabust --cov-fail-under=70
124126
pre-commit run --all-files # optional
125127
```
126128

127-
Design notes: [docs/NOTES.md](docs/NOTES.md). Contributing: [CONTRIBUTING.md](CONTRIBUTING.md).
129+
Design notes: [docs/NOTES.md](docs/NOTES.md). Enterprise positioning:
130+
[docs/PRODUCT.md](docs/PRODUCT.md). Contributing: [CONTRIBUTING.md](CONTRIBUTING.md).
128131

129132
## Enterprise / operations
130133

docs/PRODUCT.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Enterprise Product Positioning
2+
3+
Quorabust is a compact semantic matching service for teams that need to score pairs of
4+
short texts, apply a reviewed threshold, and operate the model behind a normal backend
5+
contract.
6+
7+
The public dataset is Quora Question Pairs, but the useful enterprise pattern is broader:
8+
deduplicate support questions, route knowledge-base suggestions, catch duplicate tickets,
9+
flag near-identical marketplace listings, or review repeated customer feedback.
10+
11+
## Buyer-Facing Promise
12+
13+
Quorabust answers one operational question:
14+
15+
> Given two short text records, how likely are they to mean the same thing, and should the
16+
> system treat them as a duplicate under the current policy?
17+
18+
It does this with:
19+
20+
- Reproducible offline training.
21+
- A deployable FastAPI scoring service.
22+
- Thresholded decisions, not only raw probabilities.
23+
- Model-card reporting with threshold sweeps.
24+
- Artifact metadata, JSON sidecars, and safe public model metadata.
25+
- Prometheus metrics, A/B model routing, drift helpers, and load-test assets.
26+
27+
## Method Strategy
28+
29+
The TF-IDF + XGBoost backend is the baseline/control model. It is fast, cheap, inspectable,
30+
and easy to serve. That makes it valuable for production comparisons even when a stronger
31+
NLP model exists.
32+
33+
The modern path is:
34+
35+
1. **TF-IDF + XGBoost baseline** for speed, explainable feature values, and cheap serving.
36+
2. **Sentence-transformer embeddings + XGBoost** for better semantic recall when wording
37+
differs.
38+
3. **Cross-encoder reranker** for the highest-accuracy pair scoring when latency and
39+
compute budget allow it.
40+
41+
Do not claim state-of-the-art quality from the checked-in smoke model. Use a real held-out
42+
dataset or customer-domain labels before making performance claims.
43+
44+
## API Contract
45+
46+
`POST /predict` accepts aligned `question1[]` and `question2[]` arrays. It returns:
47+
48+
- `proba_duplicate`: raw duplicate probability per pair.
49+
- `is_duplicate`: thresholded decision per pair.
50+
- `decision_threshold`: threshold used for the decision.
51+
- `variant`: active model variant, useful during A/B rollout.
52+
- `features`: optional input feature values when `?explain=true`.
53+
54+
Decision threshold precedence:
55+
56+
1. Request query parameter: `?threshold=0.7`.
57+
2. Artifact metadata: `decision_threshold`.
58+
3. Environment: `QUORABUST_DECISION_THRESHOLD`.
59+
4. Default: `0.5`.
60+
61+
## Enterprise Readiness
62+
63+
What is already in-repo:
64+
65+
- Health and readiness probes.
66+
- Prometheus metrics.
67+
- OpenAPI docs.
68+
- Docker build.
69+
- k6 load test.
70+
- Grafana dashboard starter.
71+
- JSONL registry.
72+
- Drift mean-shift helpers.
73+
- Model-card report generation.
74+
- Dependency audit workflow.
75+
- Safe `/models` metadata endpoint.
76+
77+
What should be added before a serious production deployment:
78+
79+
- Real domain-specific benchmark and model card.
80+
- Probability calibration and recommended threshold persistence.
81+
- Non-pickle artifact format for untrusted distribution.
82+
- Authentication and rate limiting at the gateway.
83+
- A production model registry such as MLflow or an internal equivalent.
84+
- Structured request IDs and centralized logs.
85+
86+
## Portfolio Story
87+
88+
Quorabust should be presented as an ML-backed backend/platform project, not as a Kaggle
89+
notebook. The strongest story is operational:
90+
91+
> I built a deployable semantic matching service with reproducible training, model
92+
> lineage, model-card reporting, thresholded API decisions, observability, A/B routing,
93+
> and drift hooks.
94+
95+
That is more marketable than claiming a single algorithm is impressive.

0 commit comments

Comments
 (0)