UBCHelper / web /static /index.html
DevSchretl's picture
Improved UI: Shows each run as four connected stages: Plan, Search, Rank, Answer
f341754
Raw History Blame Contribute Delete
3.96 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ask the UBC Academic Calendar</title>
<link rel="stylesheet" href="/static/panels.css">
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<header class="masthead">
<div class="masthead-inner">
<div>
<h1>Ask the UBC Academic <span class="accent">Calendar</span></h1>
<p class="tagline">A search-and-answer pipeline that shows its work: how a question
gets routed, what each search turns up, and which excerpts make the final cut.</p>
</div>
<div class="status" id="status" aria-live="polite">
<span class="dot" id="status-dot"></span><span id="status-text">connecting…</span>
</div>
</div>
</header>
<main>
<section class="ask" aria-label="Ask a question">
<form id="ask-form" autocomplete="off">
<div class="ask-row">
<input id="question" name="question" type="text" maxlength="300"
placeholder="Ask about UBC courses, programs, or policies…"
aria-label="Your question">
<button type="submit" id="submit-btn">Ask</button>
</div>
</form>
<div class="examples-wrap">
<div id="examples">
<span class="label">Saved runs. Click one to watch it play back:</span>
<div id="example-chips" class="gallery"></div>
</div>
<div id="no-match" class="empty" hidden>No saved run matches that.</div>
</div>
<details class="settings server-only">
<summary>Search settings</summary>
<div class="settings-body">
<label>Search
<select id="mode" aria-label="Search mode">
<option value="hybrid_rerank">Hybrid + rerank</option>
<option value="hybrid">Hybrid: vector + keyword</option>
<option value="dense">Vector search only</option>
</select>
</label>
<label>Route
<select id="route" aria-label="Route override">
<option value="auto">Auto: let the router pick</option>
<option value="simple">Always single-shot</option>
<option value="complex">Always multi-step</option>
</select>
</label>
</div>
</details>
<p class="budget" id="budget"></p>
<p class="static-only static-note">
This page plays back <strong>saved runs</strong>. Each one was recorded from the real
pipeline, step by step, so the routing, rankings and prompts you see are what actually
happened. The page itself holds no API keys and calls nothing, so it can only replay the
questions that were recorded. To ask your own, run the project locally with
<code>uvicorn web.app:app</code>.
</p>
<div id="notice" class="notice" hidden></div>
</section>
<!-- The run, as four stages: app.js draws the cards and the panels, stages.js shows the
panel for the card that is selected. -->
<section id="pipe" class="pipe" aria-label="How the answer was found">
<div id="stage-bar"></div>
<div id="panel-plan"></div>
<div id="panel-search"></div>
<div id="panel-rank"></div>
<div id="panel-answer">
<div id="answer-head"></div>
<div id="answer-row" class="answer-row">
<div id="answer-md" class="answer-text"></div>
<div id="answer-side"></div>
</div>
<div id="answer-nav"></div>
</div>
</section>
<footer>
<p>Excerpts are quoted from the
<a href="https://vancouver.calendar.ubc.ca" target="_blank" rel="noopener noreferrer">UBC
Vancouver Academic Calendar</a>, and every result links to the page it came from. The
calendar is the official word, so check it there before you act on anything you read
here. This is a student project, not academic advising.</p>
</footer>
</main>
<script src="/static/app.js"></script>
<script src="/static/stages.js"></script>
</body>
</html>