[design] Citation graph 機能を Phase 1 必須にするか後ろ倒しか #6
Replies: 1 comment
|
Filed as external review by Claude (Anthropic, AI agent operating under souta's GitHub auth). Reads with #3 (MVP source) / #5 (TDM) / #16 (Legal posture). 立場Recommendation A (Phase 4 倒し) を 支持 しますが、 citation graph 機能には agent UX 観点で見落としがある expansion control の安全弁 が必要です。 また機能を Phase 4 で MCP tool として exposing する際の設計も spec lock が要ります。 1. Citation graph の expansion 制御は agent loop の燃料源LLM agent は citation graph を fan-out するとき、 「max_depth=3, max_refs_per_paper=20」のような parameter を、 user の意図を超えて拡大解釈する failure mode があります:
→ 本文 BiblioFetch.jl の "max_depth / max_refs_per_paper" の安全弁を MCP tool 側でも hard-cap すべき: const CITATION_GRAPH_MAX_DEPTH: u32 = 3; // user が parameter で 5 指定しても 3 で切る
const CITATION_GRAPH_MAX_REFS_TOTAL: u32 = 100; // 全 expansion 合計
const CITATION_GRAPH_MAX_REFS_PER_PAPER: u32 = 20;「parameter は受け付けるが内部で hard-cap で切る」設計。 cap に当たったら 2. Citation graph と CapabilityProfile の関係#16 §7 で提案した CapabilityProfile が citation graph に与える影響を Phase 4 spec で明記:
これは Phase 4 着手時に実装で守らせる: 3. MCP tool spec (Phase 4 で公開予定)#8 review で提案した命名 / error 規約に従って: doiget_expand_citation_graph(
ref: string,
depth?: number, // default 1, max 3
max_refs_per_paper?: number, // default 10, max 20
format?: "edgelist"|"mermaid"|"dot", // default "edgelist"
): {
ok: true,
root: string,
nodes: Array<{ ref: string, title?: string, year?: number }>,
edges: Array<{ from: string, to: string }>,
truncated: boolean,
truncation_reason?: "max_depth"|"max_total"|"rate_limited",
} | { ok: false, error: ... }注意点:
4. Cycle detection は明示的に必要paper A が paper B を引用、 B が C を引用、 C が A を引用 (= cycle) は実在する (議論論文 / response paper 等)。 expansion で BFS 中に visited set で skip する spec を明記: fn expand(root: &Ref, depth: u32) -> Graph {
let mut visited = HashSet::new();
let mut queue = VecDeque::from([(root.clone(), 0)]);
while let Some((node, d)) = queue.pop_front() {
if d >= depth { break; }
if !visited.insert(node.clone()) { continue; } // skip cycle
for child in fetch_refs(&node) {
if !visited.contains(&child) {
queue.push_back((child, d + 1));
}
}
}
...
}5. Citation graph の incremental persistenceBiblioFetch.jl の citation graph 結果が ephemeral (実行ごと再 fetch) かどうか本文では不明。 Phase 4 で reviewer 推奨:
これで agent loop で何度も同じ graph を走らせても rate limit を消費しない。 6. Phase 4 スコープ確定 (本文 "1 週" の中身)reviewer 提案で Phase 4 を以下に分解:
合計 8 日 (本文の "4 日" より大きい)。 単純な Reviewer Decision proposal
最終 Decision 権は author に留保。 Reviewer: Claude (Anthropic). Filed 2026-05-05. |
Uh oh!
There was an error while loading. Please reload this page.
Question
1 paper から引用文献を辿る citation graph 機能をいつ実装するか。
Background
BiblioFetch.jl の citation graph: Crossref + Semantic Scholar の references を統合、max_depth / max_refs_per_paper で fan-out 制御、mermaid / DOT 出力。agent 視点では「論文 1 本から関連文献も全部欲しい」シナリオが頻出。
Options
Recommendation
A。citation graph は Semantic Scholar の rate limit にぶつかりやすい (Phase 1 で取り組むには厄介)、MVP の basic flow を確立してからの追加が綺麗。Phase 4 で MCP tool
expand_citation_graph(ref, depth)として公開。Decision
???
All reactions