Add latex-vs-slogan retrieval experiment - #14
Open
Vilin97 wants to merge 1 commit into
Open
Conversation
Compares embedding a verbatim raw-LaTeX theorem statement vs. an LLM-generated slogan for natural-language retrieval, on 100 theorems from 10 papers (one per arXiv math tag). The slogan is closer to the NL query in 87% of cases under the deployed asymmetric prompts (90% under symmetric-query prompts), mean cosine gap +0.061 (slogan 0.806 vs raw 0.745). The advantage grows with the notation density of the raw statement (Pearson r = +0.28): symbol-dense statements embed poorly against NL and the slogan recovers them. Raw LaTeX wins only a 13% minority, concentrated in already-prose statements or where the generated slogan drifted into higher-abstraction jargon. Adds experiments/latex_vs_slogan/ with the pipeline (fetch_theorems, run_experiment, analyze, plot), the frozen corpus + results, the figure, and an analysis README. Scripts read the embedding key from NEBIUS_API_KEY/TOKENFACTORY_API_KEY; no secrets are committed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HqhLKdyxACFbErUP4vDpM1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
experiments/latex_vs_slogan/— a controlled test of whether we should index atheorem's verbatim raw-LaTeX statement or an LLM slogan for natural-language
retrieval. Corroborates the "raw LaTeX underperforms" decision and explains the apparent
counterexamples.
Setup
data/papers.json).Qwen3-235B-A22B-Instruct-2507.gap = cos(query, slogan) − cos(query, raw)under the deployed asymmetric prompts and a symmetric-query variant.Result
Full write-up, per-tag tables, minority-case breakdown, and caveats (chiefly: query and slogan share a source, so the +0.06 is an upper-ish bound) are in
experiments/latex_vs_slogan/README.md.Notes
NEBIUS_API_KEY/TOKENFACTORY_API_KEY(or a repo-root.env); no secrets are committed..gitignoregains two!allow-rules for this experiment'sdata/*.jsonand figure, matching the existing per-experiment convention.pip install -r requirements.txtthenrun_experiment.py/analyze.py/plot.py(corpus is committed;fetch_theorems.pyre-fetches).🤖 Generated with Claude Code
https://claude.ai/code/session_01HqhLKdyxACFbErUP4vDpM1