muttsurini's picture
Adding MetaQA + cache support
8b39f58 verified
Raw History Blame Contribute Delete
9.66 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="color-scheme" content="dark">
<meta name="description" content="Try knowledge graph question answering yourself. Follow relation–entity edges on Kinship, MQuAKE-ST, and MetaQA without being told the number of hops.">
<title>KG Navigation Challenge · THESEUS</title>
<link rel="stylesheet" href="style.css?v=4">
<script src="app.js?v=4.1" defer></script>
</head>
<body>
<header class="topbar"><div class="wrap nav-wrap">
<a class="identity" href="#top" aria-label="Go to top"><span class="brand-icon">⌘</span><span>THESEUS <small>/ KG navigation challenge</small></span></a>
<nav aria-label="Links"><a href="https://github.com/HalcyonSolutions/THESEUS" target="_blank" rel="noopener noreferrer">Project ↗</a><a href="#instructions">How to play</a></nav>
</div></header>
<main id="top" class="wrap">
<section class="hero">
<div class="eyebrow"><span class="pulse"></span> STATIC · MANUAL REASONING · NO MODEL REQUIRED</div>
<h1>Navigate the graph.<br><span>Find the answer.</span></h1>
<p>Read a multi-hop question, start at its topic entity, and choose each relation and neighbor yourself. The number of hops, reference path, and answers remain hidden until you finish.</p>
<div class="hero-pills"><span>Real benchmark questions</span><span>Directed KG edges</span><span>Your route, your decision</span></div>
</section>
<section class="panel setup" aria-labelledby="start-heading">
<div class="section-head"><div><div class="kicker">01 / CHOOSE A CHALLENGE</div><h2 id="start-heading">Select a dataset</h2></div><span class="muted small">One question at a time</span></div>
<fieldset class="dataset-choice"><legend class="sr-only">Choose a dataset</legend>
<label class="dataset-card"><input type="radio" name="dataset" value="kinship" checked><span class="tag">HUMAN-READABLE</span><strong>Kinship</strong><span>Family relations · readable names</span></label>
<label class="dataset-card"><input type="radio" name="dataset" value="sa"><span class="tag">WIKIDATA KG</span><strong>MQuAKE-ST</strong><span>Single Answer · Wikidata</span></label>
<label class="dataset-card"><input type="radio" name="dataset" value="ma"><span class="tag">MULTIPLE VALID ANSWERS</span><strong>MQuAKE-ST</strong><span>Multi Answer · Wikidata</span></label>
<label class="dataset-card"><input type="radio" name="dataset" value="metaqa"><span class="tag">ENCODED · GCS</span><strong>MetaQA</strong><span>Multi Answer · reverse traversal</span></label>
</fieldset>
<div class="setup-bottom"><div class="setup-options">
<label class="split-field" for="split">Question partition <select id="split"><option value="test" selected>Test</option><option value="dev">Development</option><option value="train">Training</option><option value="all">Any split</option></select></label>
<label class="split-field" for="wording">Question wording <select id="wording"><option value="canonical" selected>Canonical question</option><option value="paraphrase">Random paraphrase · harder</option></select></label>
</div><button type="button" class="btn primary" id="new-question">Get random question <span aria-hidden="true">↗</span></button></div>
<p id="setup-status" class="status" role="status" aria-live="polite">Choose a dataset, then start a challenge.</p>
</section>
<section class="panel play hidden" id="play" aria-labelledby="play-heading">
<div class="section-head play-head"><div><div class="kicker">02 / NAVIGATE</div><h2 id="play-heading">Your challenge</h2></div><div class="play-meta"><span class="chip" id="dataset-chip">Kinship</span><span class="chip" id="split-chip">Test partition</span><span class="chip" id="wording-chip">Canonical</span><span class="chip" id="steps-chip">0 steps taken</span></div></div>
<div class="question-box"><span class="small muted">QUESTION</span><p id="question-text"></p><div class="wording-note" id="wording-note"></div><div class="start-note">Starting entity: <b id="question-source"></b></div></div>
<div class="download-box" id="graph-prompt"><div class="download-icon" aria-hidden="true">⇩</div><div class="download-copy"><strong>Prepare the navigation graph</strong><p id="graph-help">Loading a public directed graph into your browser enables edge-by-edge choices.</p></div><button id="load-graph" class="btn primary" type="button">Load graph</button></div>
<div id="game-content" class="hidden">
<div class="statebar"><div><span class="small muted">CURRENT ENTITY</span><div id="current-entity" class="current-entity"></div></div><div class="statebar-actions"><button class="btn secondary" id="undo" type="button">↶ Undo</button><button class="btn secondary" id="restart" type="button">Restart</button></div></div>
<div class="play-columns"><section class="action-panel" aria-labelledby="actions-heading"><div class="subheading"><h3 id="actions-heading">Available relations</h3><span class="muted small" id="action-total"></span></div><label class="sr-only" for="relation-search">Filter relations</label><input id="relation-search" type="search" placeholder="Find a relation or property ID…" autocomplete="off"><div id="relation-list" class="relation-list" aria-live="polite"></div>
<div class="neighbors hidden" id="neighbor-box"><div class="subheading"><h3 id="neighbor-heading">Choose a neighbor</h3><button id="close-neighbors" class="plain" type="button" aria-label="Close neighbor selection">✕</button></div><p class="muted small">You may follow only an existing edge from the current entity.</p><input id="neighbor-search" type="search" placeholder="Filter neighboring entities…" autocomplete="off"><div id="neighbor-list" class="neighbor-list"></div><div class="pager"><button type="button" id="neighbor-prev" class="btn secondary compact">Previous</button><span id="neighbor-count" class="muted small"></span><button type="button" id="neighbor-next" class="btn secondary compact">Next</button></div></div></section>
<aside class="journey"><div class="subheading"><h3>Your route</h3><span class="muted small">No target length shown</span></div><ol id="route-list" class="route-list"></ol><div class="journey-hint">Not sure? Explore a relation, go back a step, or finish when you think you have reached an answer.</div></aside></div>
<div class="finish-row"><p id="navigation-status" class="status" role="status" aria-live="polite">Choose a relation, then an entity.</p><div class="finish-buttons"><button type="button" id="give-up" class="btn secondary">Reveal / give up</button><button type="button" id="submit" class="btn primary">Submit answer ✓</button></div></div>
</div>
<div id="result" class="result hidden" aria-live="polite"><div class="result-top"><div><div class="kicker">03 / RESULTS</div><h3 id="result-heading"></h3></div><span id="answer-badge" class="result-badge"></span></div><p id="result-description"></p><div class="result-grid"><div><span class="small muted">YOUR TERMINAL ENTITY</span><div id="result-terminal" class="result-value"></div></div><div><span class="small muted">RELEASED ANSWER(S)</span><div id="result-answers" class="result-value"></div></div></div><div id="path-assessment" class="path-assessment"></div><details class="reference-details"><summary>Show released reference evidence and hop count</summary><div id="reference-content"></div></details><div class="result-footer"><button id="retry" class="btn secondary" type="button">Try again</button><button id="another" class="btn primary" type="button">Next random question →</button></div></div>
</section>
<section class="info-grid" id="instructions"><div class="info-card"><div class="kicker">HOW TO PLAY</div><h2>You are the navigator</h2><p>This challenge tests human navigation through a knowledge graph, not pretrained MINERVA. At each step, pick a relation and one of the entity neighbors reachable along that edge. Submit when you think the current node answers the question.</p><p>Select <strong>Canonical question</strong> for the original wording or <strong>Random paraphrase</strong> for a randomly chosen alternative from the released <code>Question-Paraphrased</code> column. The wording stays fixed for the entire attempt, including retries.</p><p>There is no required number of steps displayed. A 12-step safety limit prevents endless wandering.</p></div><div class="info-card"><div class="kicker">ABOUT THE DATA</div><h2>Real edges. Hidden references.</h2><p>Kinship and MQuAKE-ST load their graph from Hugging Face. The encoded MetaQA dataset loads from the public GCS ZIP archive. Metadata labels are shown when available. MetaQA navigation allows inverse edges and provides answer checking without reference-path scoring.</p><p><strong>Note:</strong> MQuAKE-ST and MetaQA can require sizable downloads and browser memory. The graph and MetaQA archive are reused while the page stays open. Kinship and MQuAKE-ST also cache sampled QA rows to reduce repeated Dataset Viewer requests. MetaQA has no released reference paths or paraphrases.</p></div></section>
</main>
<footer class="footer"><div class="wrap footer-flex"><span>THESEUS · Question-conditioned KG navigation</span><div><a href="https://huggingface.co/spaces/muttsurini/Kinship-Quickstart" target="_blank" rel="noopener noreferrer">Kinship quickstart ↗</a><a href="https://huggingface.co/spaces/muttsurini/MQuAKE-ST-Quickstart" target="_blank" rel="noopener noreferrer">MQuAKE-ST quickstart ↗</a></div></div></footer>
</body>
</html>