Skip to content

Route agents to the guides that answer study, cancer-type and subtype questions - #159

Merged
inodb merged 1 commit into
mainfrom
guide-routing
Sep 27, 2026
Merged

inodb merged 1 commit into
mainfrom
guide-routing

Conversation

@inodb

@inodb inodb commented Sep 27, 2026

Copy link
Copy Markdown
Member

Summary

The guide fixes in #150 had no effect on the benchmark questions they targeted, because agents never opened those guides. Evidence from cbioportal-mcp-qa run 20260926-1634 (claude-code runner, beta prompt, this server at 07ffe44), both Haiku and Sonnet:

Q Question What the agents did Guide with the answer
77 minerva viewer for the OHSU HTAN sample list_studies("OHSU HTAN") → [], then list_studies("HTAN") listed brca_hta9_htan_2022 but neither mapped it to OHSU; one read only external-resources-guide. Both said the study doesn't exist. study-resolution-guide (HTAN atlas codes, hta9 = OHSU)
107 What kind of cancer are there in the database? Queried type_of_cancer / OncoTree directly; read no guide. faq-guide (count cancer_study.type_of_cancer_id)
103 adenoid cystic carcinoma: expected drivers Read mutation-frequency / common-pitfalls, then ran top_mutated_genes_in_study('acc_2019') on the whole mixed study. sample-filtering-guide (filter ONCOTREE_CODE = 'ACYC')

LibreChat agents only see tool and guide descriptions (the server's system-prompt.md doesn't reach them), so the routing goes there:

  • list_guides descriptions now name the questions they answer:
    • study-resolution-guide: "when list_studies finds nothing (e.g. HTAN centers such as OHSU, which appear only as atlas codes in study ids)"
    • faq-guide: "what cancer types, data types and studies the database has … germline support"
    • sample-filtering-guide: "a subtype inside a multi-subtype study (e.g. adenoid cystic carcinoma in acc_2019: filter by ONCOTREE_CODE)"
  • clickhouse_run_select_query guide list adds faq-guide and the same triggers for study-resolution and sample-filtering.
  • list_studies: a search with no matches returns a single {"note": …} pointing to study-resolution-guide (HTAN atlas codes, fewer words, other instances) instead of [], matching the tool's existing [{"error": …}] shape.

Tests: 128 pass (new: no-match note; guide descriptions and the query tool name the triggers). Ruff: no new findings beyond line length, consistent with the file's existing long description strings.

Targets cbioportal-mcp-qa benchmark Q77, Q107, Q103; verify with the next claude-code run after this deploys.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NEwSZhYcMhmj5d8J4o7Jft

… questions

In benchmark run 20260926-1634 the guide fixes from #150 had no effect on
the questions they targeted because agents never opened those guides:
- Q77 (Minerva viewer for the OHSU HTAN sample): list_studies("OHSU HTAN")
  returned [] and both models concluded the study doesn't exist; neither
  read study-resolution-guide, which maps HTAN atlas codes (hta9 = OHSU).
- Q107 (what cancer types are in the database): neither model read any
  guide; faq-guide has the type_of_cancer recipe.
- Q103 (adenoid cystic carcinoma drivers): both queried all of acc_2019;
  sample-filtering-guide has the ONCOTREE_CODE subtype filter.

LibreChat agents only see tool and guide descriptions, so the triggers go
there: list_guides descriptions for study-resolution, faq and
sample-filtering name the questions they answer; the
clickhouse_run_select_query guide list adds faq-guide and the triggers;
list_studies returns a note pointing to study-resolution-guide when a
search matches nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEwSZhYcMhmj5d8J4o7Jft
@inodb
inodb merged commit 68381e7 into main Sep 27, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants