Spaces:
Running
Running
Commit History
-
docs: record the cold-start churn design and the trending recency bug
siddhm11 +1: Claude Opus 5Adds §3.4b to the rulebook (impression memory, why propensity must never go back to 1.0 on a randomised tier, why epsilon-greedy over Plackett-Luce here) and two dated entries to doc 06's changelog, including the Phase 9 scope tension and the measured before/after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>c95cd95
-
docs: record the RRF decision and the shard gap instead of re-deciding them
siddhm11 +1: Claude Opus 5Two open questions from the audit, logged per CLAUDE.md §6.2/§6.3 so they are not re-litigated from scratch next session. RRF: keep it, but stop calling it settled. OpenSearch's BEIR comparison puts rank-based RRF 3.86% below tuned score normalization on average and 4.81% below on SciDocs, the closest dataset to this corpus, and the "RRF is cheaper" defence does not survive the same table (1.62% at p50, -0.033% CPU). That is not enough to switch: normalization only wins *tuned*, and the only ground truth here is a 60-query known-item set, so tuning now would overfit to 60 queries. Section 3.1 keeps the rule and loses the claim that it is the higher-relevance choice. The sharper reading of that table is recorded too: search runs the dense arm alone today, and dense-only scores 0.1075 on SciDocs against 0.1602 for the best hybrid. The missing sparse arm is a much bigger lever than the fusion strategy, so PHASE8's [PENDING] 3b comes first and fusion is settled on our own data after an e…5e0a14c -
docs: correct the Space metadata and the drift between the docs and production
siddhm11 +1: Claude Opus 5Space README frontmatter had five keys and no short_description, so the Space card showed no caption to anyone finding the project. Adds short_description plus explicit models/datasets links, and records why app_port, storage and license are deliberately absent (app_port defaults to 7860; persistent storage no longer exists and `suggested_storage` "will be ignored" per the HF docs; there is no LICENSE file yet, so there is nothing to declare). CLAUDE.md described one Qdrant collection, arxiv_bgem3_dense. Production runs three sharded collections with fanout, verified against /healthz/shards. Correcting this matters more than a typo: the rulebook is what every future session reads first. PHASE8 stated SEARCH_RERANK_TOP_N = 50 as current and called a window of 10 "worse than useless" -- superseded by 082e383 six days later. The rule is marked superseded with the measured sweep, plus the part the original reading missed: hybrid_search_svc truncates with fused[:top_n] and ARXIV_MAX_RESUL…a4e5676
-
docs: exact search and recommendation pipeline specification
siddhm11 +1: Claude Opus 5Consolidates both pipelines into one reference: every stage, every constant, measured latency, and whether each piece is live or pending. Records the rules that must not change and why each has already been violated once: * RRF for search, quota for recommendations. Search fuses many retrievers over one query; recommendations fuse many queries for one user. Using RRF on the recommendation side lets the dominant cluster win on rank alone and reintroduces the interest collapse the product exists to prevent. * The rerank window must exceed the result count. At SEARCH_RERANK_TOP_N=10 the cross-encoder re-ordered exactly the set already being returned. * Rescore stays on. rescore=False is no faster (615ms vs 608ms) and drops recall@10 from 100% to 57%. * Suppression on arXiv codes, not primary_topic's ~15 coarse buckets. * Title boost uses the original query, never the rewrite. * Stage timings no longer sum -- groq_time_ms overlaps encode_time_ms. Also doc…ae8d54a -
docs: Phase 7 plan — data freshness and free-tier capacity
siddhm11 +1: Claude Opus 5Consolidates the measurements taken against the live deployment on 2026-07-29/30 into a plan, and logs two decisions in the doc 06 changelog per CLAUDE.md 6.2. Findings: corpus newest publication 2025-05 (today 2026-07) missing from live arXiv 290,672 unique papers across 43 categories abstracts at the 500 cap 1,437,656 (90.0%), mean live abstract 1,244 chars measured per-point cost ~2,574 bytes (2048 vector + 128 payload + 128 BQ + ~270 graph) Two things the plan deliberately blocks on: 1. A disk-usage discrepancy. This document computes ~4.1 GB against a 4 GB free tier; the console reportedly shows 400-500 MB. The latter cannot be on-disk total, since 1,596,587 float16 vectors are 3.27 GB uncompressed and are not compressed on disk -- but it matches memory_resident_bytes (529,870,848) almost exactly, suggesting the panel reports RAM. The two branches lead to opposite actions, so nothing is deleted until it is settle…9495dc3
-
feat: Cross-encoder search reranking with MiniLM-L-6
siddhm11- Add cross-encoder reranker service (app/reranker_bge_svc.py) using cross-encoder/ms-marco-MiniLM-L-6-v2 (22M params, ~200-400ms on CPU) - Integrate reranking as Step 4.5 in hybrid search pipeline (after RRF fusion, before title-match boost) for top-10 candidates - Eagerly load reranker model at startup with graceful fallback - Display BGE Rerank timing in search results UI - Fix Unicode charmap encoding crashes on Windows console (replace emoji/em-dash with ASCII in all print statements) - Fix pre-existing test bug: update search router mocks to return (ids, meta_dict) tuples matching return_meta=True contract - Fix UnboundLocalError from shadowed asyncio import in search function - Add unit tests for reranker service (3 tests) - Update CLAUDE.md and docs with architectural decision 207 tests pass, 0 failures.6ae50db
-
Phase 6.5: Pipeline telemetry, search UX fixes, latency profiling
siddhm11- Instrumented search pipeline: Groq rewrite, BGE-M3 encode, Qdrant+Zilliz retrieval, RRF fusion, title rerank with per-stage timing - Instrumented recommendation pipeline: clustering, ANN retrieval, metadata fetch, LightGBM rerank, MMR diversity - Split Title+Citation Rerank into Turso fetch vs compute time (exposed hidden 1.5s network call) - Added search loading overlay with pipeline stage labels - Fixed HTMX search: recommendations now hide when search starts - Fixed paper card: truncate authors (max 3 + et al), hard-truncate abstract to 500 chars - Show Groq rewrite status (skipped/rewritten/error) in both banner and breakdown - Added Groq heuristic visibility: shows skip reason (query too short, looks academic) - Added parallel task count to retrieval breakdown - New evaluation and diagnostic scripts - Removed deprecated s2_svc.pyec67b2f
-
Phase 6.5: Documentation finalization
siddhm11- CLAUDE.md: Add Rule 3.11 (interaction instrumentation invariants), update phase status to 6.5 COMPLETE, bump last-updated date - TASK-TRACKER.md: Add full Phase 6.5 section with all completed items - recommendations.py: Bump _RANKER_VERSION to v6.5_lightgbm_real_cosines Tests: 203 passed, 0 failuresd2f0bed
-
Phase 6.5 Day 1: Real Qdrant cosine scores (A1) + verification timestamp (A2)
siddhm11A1 — Feature 0 fix (qdrant_cosine_score): - recommendations.py: Switch search_by_vector() -> search_by_vector_with_scores() in both per-cluster and short-term supplement paths - Build qdrant_score_map from actual cosine scores in same pass as paper_cluster_map - Delete fake rank-decay approximation (1.0 - rank * 0.01) - Feature 0 now receives real cosines instead of synthetic linear sequence A2 — Live verification: - PHASE6-Reranker-Framing.md: Tick all 6.3 checklist items, add verification timestamp (2026-05-03: model_loaded=true, n_trees=141, fallback_active=false) Test fix: - test_integration.py: Update quota pipeline test mock from search_by_vector to search_by_vector_with_scores (returns list[dict] not list[str]) Tests: 203 passed, 0 failures3f58d41
-
Phase 6.3: Bug B fix + documentation finalization
siddhm11Bug B fix (medoid zero-vector fallback): - db.py: Add medoid_embedding_blob BLOB to user_clusters table + migration - clustering.py: Persist medoid embedding as BLOB in save_clusters_to_db() - recommendations.py: Fall back to persisted blob when paper vector missing from Qdrant, instead of zero vector that breaks Hungarian assignment Documentation updates: - CLAUDE.md: Update Phase 6 status to COMPLETE, add 37-feature schema details, add health.py to file tree, update test counts to 203+, add last updated date - TASK-TRACKER.md: Add Phase 6.3 section with all completed items, Phase 6.4 retraining deferral statement, update test appendix - Both docs updated to reflect Phase 7 as next Tests: 203 passed, 0 failures (no regressions from DB schema change)19ccf32 -
Phase 6.1+6.2+6.3: Wire all 37 features into caller + health endpoint
siddhm11Phase 6.1+6.2 (feature wiring): - recommendations.py: Replace legacy 6-arg rerank_candidates() with full 37-feature call - Per-candidate cluster_importance (N,) and cluster_medoid (N,1024) from paper_cluster_map - Pre-compute is_suppressed_category and onboarding_category_match arrays - Pass qdrant_scores, user_total_saves, user_total_dismissals to reranker - Move suppression loading BEFORE rerank call (now a model feature + safety net filter) reranker.py: - compute_features() accepts per-candidate arrays (np.ndarray) for slots 23-26 - Slot 24 supports both broadcast (1D) and per-candidate (2D) medoid paths - Add is_model_loaded(), get_loaded_model_path(), get_num_trees() accessors - Add per-request feature activation logging Phase 6.3 (deployment verification): - New /healthz/reranker endpoint (app/routers/health.py) - Reports model_loaded, n_trees, feature_schema_hash, fallback_active - Wired into main.py router registration Infrastructure: - qdrant_svc.py: Add search_by_vector_wi…5856b85 -
Phase 6: LightGBM reranker integration (37-feature schema, 141-tree model)
siddhm11- Rewrote app/recommend/reranker.py: 5-feature heuristic -> 37-feature LightGBM LambdaRank with permanent heuristic fallback - Added lightgbm>=4.0,<5.0 to requirements.txt - Added production model (reranker_v1.txt, 974KB, trained on 242K citation edges) - Model repo: models/reranker-phase6/ (cloned from HF siddhm11/researchit-reranker-phase6) - Training pipeline: 3 scripts (fetch citations, generate triples, train LightGBM) - Integration tests: 7/7 passing (smoke, features, E2E, latency 0.14ms, backward compat) - Fixed 3 tests in test_reranker_diversity.py (5->37 feature schema update) - Full pytest suite: 121/121 passing, 0 regressions - Complete documentation: PHASE6-HANDOFF.md, README.md with full infra schemas - Fixed corrupted .gitignore, removed nested .git from model dir - ML Intern conversation logs preserved in docs/ML Intern docs/63b37fd
-
Phase 5: Cold-Start Onboarding + UI Redesign
siddhm11NEW FEATURES: - 2-step onboarding wizard (category select → seed paper search) - 20 curated arXiv category groups with friendly names + icons - Dark mode default with theme toggle (localStorage persistence) - Glassmorphism navbar, Inter font, brand rename to ResearchIT - Tier 0 popularity fallback: trending papers filtered by categories - Auto-mark existing users as onboarded (no disruption) NEW FILES: - app/routers/onboarding.py (5 endpoints: page, save, search, complete, skip) - app/templates/onboarding.html (standalone wizard, no base.html) - app/templates/partials/seed_search.html (embedded search for seeds) - app/static/styles.css (animations, hover effects, category badges) - docs/phases/PHASE5-Cold-Start-Onboarding-And-UI.md (design doc) - tests/test_onboarding.py (11 tests) MODIFIED: - base.html: dark theme, glassmorphism, theme toggle, Inter font - config.py: CATEGORY_GROUPS taxonomy, expand_category_groups() - db.py: user_onboarding table, 4 new functions - main.py: onboard…7106701 -
Phase 4 complete + Phase 4.5 instrumentation foundation
siddhm11Phase 4 (Recommendation Pipeline Fixes) - all implemented: - 4.1: Importance-weighted quota fusion (fusion.py, 20 tests) - 4.2: Turso metadata (done in Phase 3.5) - 4.3: Hungarian matching for cluster stability (10 tests) - 4.4: Category-level negative suppression (8 tests) Phase 4.5 (Instrumentation Foundation) - NEW: - Added ranker_version, candidate_source, cluster_id to interactions table - ALTER TABLE migration for existing DBs (idempotent) - Pipeline tagging: Tier 1 papers tagged by cluster/exploration - End-to-end flow: recommendations.py -> templates -> events.py -> db.py - 5 dedicated instrumentation tests TASK-TRACKER: Phase 4 marked COMPLETE, Phase 4.5 added, Phase 8 expanded Test count: 123 -> 176 (175 passing, 1 pre-existing flaky)61d5f0d
-
docs: Update tracker - Phase 3.5 fully complete, all integration done
siddhm1110fbe3b -
docs: Add Phase 3.5 Turso ArXiv Metadata DB, update infra status
siddhm11b4d17db
-
Phase 3 complete: Hybrid Semantic Search pipeline
siddhm11- BGE-M3 encoding (dense + sparse) via embed_svc.py - Qdrant dense search + Zilliz sparse search (parallel) - Groq LLM query rewriter with academic heuristic bypass - RRF fusion (K=60) + recency reranking (0.80/0.20) - Graceful degradation: each service can fail independently - arXiv API fallback when hybrid search returns nothing - Dockerfile for HF Spaces deployment (Docker SDK, port 7860) - 123 tests passing (88 original + 35 new, zero regressions) - All secrets via env vars only (.env.example provided)d5a6f3e