fix: audit remediation Wave 3 — M-1, MED/LOW sweep, ingest robustness + D-1 close-out #14
@@ -102,7 +102,8 @@ def search_paper(
|
|||||||
cite_boost: bool = typer.Option(
|
cite_boost: bool = typer.Option(
|
||||||
False,
|
False,
|
||||||
"--cite-boost",
|
"--cite-boost",
|
||||||
help="Weight results by citation PageRank (F-15). Graceful when corpus < 5 papers.",
|
help="Re-rank the top results by citation PageRank — a within-page "
|
||||||
|
"tie-breaker, not a hard re-ranking (F-15). Graceful when corpus < 5 papers.",
|
||||||
),
|
),
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Semantic similarity search over paper abstracts."""
|
"""Semantic similarity search over paper abstracts."""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""Hybrid dense + sparse embeddings via BGE-M3 (ADR-0002).
|
"""Dense (+ optional sparse) embeddings via BGE-M3 (ADR-0002).
|
||||||
|
|
||||||
Uses :class:`FlagEmbedding.BGEM3FlagModel` for encoding because the
|
Uses :class:`FlagEmbedding.BGEM3FlagModel` for encoding because the
|
||||||
``return_dense`` / ``return_sparse`` kwargs are part of the FlagEmbedding
|
``return_dense`` / ``return_sparse`` kwargs are part of the FlagEmbedding
|
||||||
@@ -7,6 +7,11 @@ vanilla ``SentenceTransformer`` load of ``BAAI/bge-m3`` (same weights,
|
|||||||
same model); sparse output is a list of ``{token_id: weight}`` dicts per
|
same model); sparse output is a list of ``{token_id: weight}`` dicts per
|
||||||
text.
|
text.
|
||||||
|
|
||||||
|
Status: only the **dense** path is wired into ingest/search today; the search
|
||||||
|
"hybrid" is dense + Postgres FTS. :meth:`Embedder.encode_sparse` / :meth:`encode`
|
||||||
|
are provided for a future sparse-retrieval layer but are not yet consumed by the
|
||||||
|
pipeline (audit C-14).
|
||||||
|
|
||||||
Notes for callers
|
Notes for callers
|
||||||
-----------------
|
-----------------
|
||||||
* Empty input is handled explicitly — no model call is issued.
|
* Empty input is handled explicitly — no model call is issued.
|
||||||
|
|||||||
Reference in New Issue
Block a user