Repository navigation
Readable answers, a layout that uses the screen, a reachable graph, and the README charts back - #139
Conversation
…nd the charts back - Without a model, answers used to paste three raw packed windows (headings, fences and callouts as text). Now they quote the sentences that answer, under the API name they belong to, each cited, with the best-matching code example fenced; a condition right after a point travels with it. - Answers render lists, code blocks and a quiet provenance note. - Wide screens open sources (left) and evidence (right) by default; the conversation and composer widen; full-bleed grid. - Graph button opens the knowledge graph in a wide panel (it was only at the bottom of Lab view). New brand mark. - README: walkthrough, pipeline diagram, current evidence-recall chart with every question, stage timings and a learning chart, regenerated from the frozen runs; the September before/after charts are kept in the eval write-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D3gm7sJERkZTxCR1BAcsgW
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30460ac173
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const s of body.split(/(?<=[.!?])\s+(?=[A-Z`(])/)) { | ||
| const t = s.trim(); | ||
| // Code that slipped outside a fence isn't a sentence. | ||
| if (t.length >= 12 && /[a-z]{3}/i.test(t) && !CODEISH.test(t) && /\s/.test(t)) out.push({ kind: 'sentence', text: t, heading, source, order: order++ }); |
There was a problem hiding this comment.
Preserve sentences written in non-Latin scripts
When a retrieved passage is written entirely in Hindi, Arabic, Chinese, or another non-Latin script, the new /[a-z]{3}/i requirement discards it even when it directly matches the question. For example, a Hindi question and matching Hindi sentence produce only “The closest passages, quoted:” and the footer, with no evidence. This regresses the previous verbatim excerpts despite the Unicode-aware retrieval supported by text.ts and token-marks.test.ts. Use Unicode-aware prose detection or retain a literal fallback when no sentences survive.
Useful? React with 👍 / 👎.
| if (!line.trim()) { flush(); continue; } | ||
| // Bullets and table rows read as their own sentences. | ||
| if (/^\s*([-*+]|\d+[.)])\s+/.test(line)) { flush(); para.push(line.replace(/^\s*([-*+]|\d+[.)])\s+/, '')); flush(); continue; } | ||
| if (/^\s*\|/.test(line)) continue; |
There was a problem hiding this comment.
Retain evidence contained in Markdown tables
When the answer is contained in a Markdown table, this unconditional continue removes every relevant row before scoring or fallback selection. A packed passage containing | Option | Default | and | timeout | 5000 milliseconds | now returns no quoted evidence for “What is the timeout default?”, whereas the previous implementation displayed the value. Convert data rows into selectable units, or preserve the original passage as a fallback instead of silently discarding table evidence.
Useful? React with 👍 / 👎.
| const words = new Set(contentTokens(x.u.text)); | ||
| return !all.slice(0, i).some((y) => { const o = contentTokens(y.u.text).filter((t) => words.has(t)).length; return o >= 0.7 * Math.min(words.size, new Set(contentTokens(y.u.text)).size); }); |
There was a problem hiding this comment.
Keep distinct values and scopes during sentence deduplication
For comparison questions, the token-overlap rule treats materially different facts as duplicates because it ignores headings and permits differing values. With a Development section saying “The default request timeout is 1000 milliseconds.” and a Production section saying “The default request timeout is 5000 milliseconds.”, asking for both defaults returns only the Development value. Both sentences pass scoring, but this filter deletes the Production fact. Preserve sentences with different section scopes or factual values rather than deduplicating them solely by shared vocabulary.
Useful? React with 👍 / 👎.
| s | ||
| .replace(/!\[[^\]]*\]\([^)]*\)/g, '') | ||
| .replace(/\[([^\]]+)\]\((?:#|https?:)[^)]*\)/g, '$1') | ||
| .replace(/<[^>]+>/g, '') |
There was a problem hiding this comment.
Protect literal angle-bracket content from HTML cleanup
For technical documentation containing placeholders or generic types, this regex deletes source content rather than just presentation markup, including content inside inline code. For example, “Use <limit> to set the worker limits.” becomes “Use `` to set the worker limits.”, and Promise<void> loses its type argument. The previous excerpt renderer escaped and preserved these literals. Shield inline code before cleanup and distinguish actual HTML tags from literal angle-bracket text so the displayed quotations retain the source's meaning.
Useful? React with 👍 / 👎.
| const code = example.text.split('\n').slice(0, 14).join('\n'); | ||
| lines.push('', `Example${example.heading ? ` from ${example.heading}` : ''} [Source ${example.source}]:`, '```', code, '```'); |
There was a problem hiding this comment.
Avoid silently cutting code examples at an arbitrary line
When the selected code example exceeds 14 lines, this slice presents an incomplete program as a complete fenced example without indicating omitted content. Reproducing this with the signal section of eval/repo-support/fixtures/p-queue.md cuts the cancellation example immediately after the abort listener, leaving the surrounding try and queue.add callback unclosed and removing the error handling. Preserve the selected code unit, or explicitly present a truncated excerpt with a way to inspect the full example rather than supplying silently broken code.
Useful? React with 👍 / 👎.
| className="text-base leading-relaxed text-fg [&_a.cite-chip]:mx-0.5 [&_a.cite-chip]:rounded-sm [&_a.cite-chip]:bg-raised [&_a.cite-chip]:px-1.5 [&_a.cite-chip]:py-0.5 [&_a.cite-chip]:text-xs [&_a.cite-chip]:text-primary [&_code]:rounded-xs [&_code]:bg-raised [&_code]:px-1" | ||
| dangerouslySetInnerHTML={{ __html: message.answerKind === "source_excerpts" && message.chunks ? formatSourceExcerptsHtml(message.chunks) : formatAnswerHtml(message.text, message.citations ?? []) }} | ||
| className="ir-answer text-[15px] leading-[1.7] text-fg [&_a.cite-chip]:mx-0.5 [&_a.cite-chip]:rounded-sm [&_a.cite-chip]:bg-raised [&_a.cite-chip]:px-1.5 [&_a.cite-chip]:py-0.5 [&_a.cite-chip]:text-xs [&_a.cite-chip]:text-primary [&_code]:rounded-xs [&_code]:bg-raised [&_code]:px-1" | ||
| dangerouslySetInnerHTML={{ __html: message.answerKind === "source_excerpts" && message.chunks && /^Relevant source excerpts/.test(message.text) ? formatSourceExcerptsHtml(message.chunks) : formatAnswerHtml(message.text, message.citations ?? []) }} |
There was a problem hiding this comment.
Keep source-authored citation markers separate from answer citations
When a quoted source sentence contains a literal marker such as [Source 2], routing new extractive answers through formatAnswerHtml interprets that source text as an application citation. For example, a sentence from document A saying “The retry policy is documented in [Source 2].” gains a clickable citation to unrelated retrieved document B, alongside the actual citation to A. The previous formatSourceExcerptsHtml path deliberately preserved source-like markers literally. Render quoted text separately from generated citation metadata so source content cannot create false evidence links.
Useful? React with 👍 / 👎.
The fidelity contract stands: every packed window is still in the answer, cited, so conditions, unknowns and retractions selection might miss are never lost. The app shows them folded under 'Full passages, verbatim'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D3gm7sJERkZTxCR1BAcsgW
What you'll see:
####headings, code fences and> [!NOTE]shown as text. Now it quotes only the sentences that answer the question, each labelled with the API name it belongs to (e.g..timeout) and cited. It adds the code example that matches best as a real code block, and a condition right after a point is never dropped.README charts are back:
eval/repo-support/README.md, which is what they describe.Tests: extractive and answer-format tests are updated for the new behaviour. The rag suite fails the same 21 environment-only tests as main.
Generated by Claude Code