Spaces:
Sleeping
Sleeping
Commit History
-
Deploy: dashboard naive-vs-rigorous reveal + sync serving to origin/main
Single squashed deploy commit on top of hf/main. Brings the reveal (source-gated reveal_anchor.json, render-time injection, progressive- enhancement JS) and the accumulated origin/main serving/stats/docs work. HF frontmatter + Dockerfile (port 7860) preserved; README refreshed to the repositioned framing. Plot PNGs excluded (HF Xet policy; they live on GitHub and serve the README card there, not the running app).1c08abf
-
feat: expose reranker scores through retrieval pipeline
CrossEncoderReranker.rerank() now returns list[tuple[Chunk, float]] instead of list[Chunk]. Retriever.search() returns RetrievalResult with pre_rerank_count metadata. SearchResult gains rerank_score field. Prerequisite for SSE stage events. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>c5573d3
-
feat: add cross-encoder reranking with feature flag
CrossEncoderReranker (ms-marco-MiniLM-L-6-v2) reranks RRF-fused candidates to improve retrieval precision. Lazy-loads model on first use. Enabled by default; rag.reranker.enabled: false restores V1. - RerankerConfig extended with model_name and top_k (independent of retrieval.top_k) - Retriever passes all RRF candidates to reranker, preserves original RRF scores on reranked results (critical for refusal gate interaction) - Dockerfile pre-downloads cross-encoder model at build time - 6 new tests including score-preservation regression test (109 total) - DECISIONS.md entry with rationale - Benchmark comparison deferred pending eval sweep with API key Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>65d5480
-
feat: Day 6 — serving layer with FastAPI app, routes, middleware
Serving: - app.py: application factory initializing all singletons - routes.py: POST /ask, GET /health, GET /metrics - schemas.py: AskRequest/AskResponse, HealthResponse, MetricsResponse - middleware.py: X-Request-ID, structlog, provider timeout → 504, MetricsCollector (deque-based latency percentiles) Fixes from Day 5 audit: - Orchestrator passes top_k/strategy per-request via tool kwargs instead of mutating shared SearchTool state (no cross-request bleed) - SearchTool accepts _strategy kwarg from orchestrator - Retriever.search() widened to str | None for protocol compat 7 new tests (72 total): /ask 200, /ask 422, /health, /metrics, X-Request-ID header, provider timeout → 504. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>2d8989f -
fix: recursive chunker applies overlap, cache key includes model name
1. Recursive chunker now prepends previous segment's tail (up to chunk_overlap chars) to each chunk for boundary context recall. Overlap may push chunks slightly beyond chunk_size — this is intentional to avoid truncating source content. 2. Embedding disk cache key is now sha256(model_name:text) instead of sha256(text), preventing stale vector reuse when switching models. 60 tests, lint + mypy clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>77bdc95 -
feat: Day 3 — RAG pipeline with chunker, embedder, hybrid store, retriever
- Chunker: recursive (paragraph→newline→sentence→space) + fixed-size strategies - Embedder: sentence-transformers wrapper with disk cache, injectable mock model - HybridStore: FAISS IndexFlatIP + BM25Okapi with Reciprocal Rank Fusion - RRF: rrf_score(d) = Σ 1/(k + rank), k=60 - BM25 tokenizer: re.findall(r'\w+', text.lower()) - save/load: FAISS index + BM25 pickle + chunks JSON + embeddings npy - Retriever: thin async glue (embed query → store.search → results) - Chunk.source = bare filename matching golden dataset expected_sources - conftest: MockEmbeddingModel (seeded deterministic), sample_chunks, test_store, test_retriever fixtures 20 new tests (60 total): chunker size/preservation/empty, embedder shape/normalization/cache/batch, store semantic/keyword/hybrid/empty/ roundtrip/stats, retriever search/strategy-override. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>5be9616