tool(labfinder): rank labs for a project description, emitted as a forester tree - #46
Open
zubyul wants to merge 1 commit into
Open
tool(labfinder): rank labs for a project description, emitted as a forester tree#46zubyul wants to merge 1 commit into
zubyul wants to merge 1 commit into
Conversation
Ranks PI x institution rather than papers, so a project described in conversation can be routed to a lab that could actually host it. - faceted retrieval: one long phrase ANDs to ~32 works; four facets fuse to 1592 - coverage bonus (facets^1.5): the right lab is at the intersection of facets - senior/corresponding author = PI, 3y recency half-life, evidence floor - --trace reconstructs forward lineage from publications, since neurotree sits behind a validation wall and Wikidata has identity but not lineage Offline analysis, outside the 4.0ms decode path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Someone describes a project at an event — the example that prompted this was unexpected death in prion proteomics — and the useful question isn't "what is known about this" but "whose lab could run it, is running it now, and would take it". Paper search answers the first.
labfinderanswers the second: it ranks labs (PI × institution), not papers.What's here
bci/tools/labfinder/labfinder.ml— one file of plain OCaml. No dune, no libraries, no build step.trees/lf-0001.tree— a worked result, committed as forest content.trees/bcf-0074.tree— the tool's rationale; linked from the hub inbcf-0001.It emits
.treesource. A ranking is forest content, not a web widget — no JavaScript is added, and the site stays static XML + XSLT. It also compiles if you want a binary (ocamlc290 KB,ocamlopt1.6 MB); nothing else is required, the JSON reader is in the file.Three decisions that carry the ranking
h=1, works=1as a "lab". Four facets searched separately and fused give 798 unique works.(facets matched)^1.5. The best lab sits at the intersection of a project's facets, not at the most-cited lab touching one of them. This is what puts Devinsky (SUDC/SUDEP and hippocampal proteomics) above labs with far more citations.Result for the prion case: Devinsky (NYU) 10.98 → Seyfried (Emory) 5.56 → Johnson (Emory) 4.95 → Bennett (Rush) 3.22 → Levey (Emory) 3.14.
Things a reviewer should know
CONTRIBUTING.mdframes contributions as four factory stages; a lab-routing tool doesn't map onto any of them. It's offline analysis outside the 4.0ms decode path — no critical-path latency, no trit-parity obligation. Reject on scope if that's the call.curldependency. OpenAlex is HTTPS-only and the forester opam switch hascohttp-eiobut notls/ca-certs, so the raw GET is delegated tocurl. Parsing, scoring, forester-escaping and emission are all OCaml. Addingtls ca-certsto the switch would close this.%, backslashes,#and unbalanced parens — each a fatal parse error. The emitter escapes all of them; that's whyescapelooks paranoid.build-bci.shcalls./forester build --config "$FORESTER_CONFIG", but forester 4.3.1 dropped--config(it's positional now). It fails identically on untouchedmain, producing zero output files. One-line fix:./forester build "$FORESTER_CONFIG". Happy to send separately.Verified: builds green via
bci-forest.tomlwith the opam forester (41,686 files);lf-0001.xmlrenders and resolves as a first-class addressed tree with backlinks.