Feature/shixiang/paper citation paper reading#71
Conversation
There was a problem hiding this comment.
Pull request overview
This PR standardizes citation behavior across the paper-discussion and research-ideation prompt systems (web app runtime prompts + Claude CLI skills) by requiring numbered inline citations and a consolidated markdown References section, with explicit guidance to avoid hallucinated references.
Changes:
- Adds mandatory numbered inline citation rules and References-section requirements to shared prompt instructions and role/stage guidance.
- Updates final report templates to include a dedicated References section (Paper Discussion:
## 8. References, Research Ideation:## 7. References). - Updates Claude CLI skill docs to require
searchArticles-grounded external citations and to flag unsupported claims instead of fabricating references.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/research-ideation/roles.ts | Adds mandatory citation policy and updates ideation role/report templates to include References. |
| src/lib/research-ideation/prompts.ts | Updates stage guidance to require supporting citations and a References section. |
| src/lib/paper-discussion/roles.ts | Adds mandatory citation policy and updates discussion role/report templates to include References. |
| src/lib/paper-discussion/prompts.ts | Updates stage guidance to enforce citations + References and adjusts final report section count. |
| .claude/skills/research-ideation-full/SKILL.md | Adds citation policy and References section requirements for the full ideation CLI workflow. |
| .claude/skills/paper-discussion/SKILL.md | Adds/strengthens citation policy and searchArticles requirements for Q&A CLI workflow. |
| .claude/skills/paper-discussion-full/SKILL.md | Adds citation policy and References section requirements for the full discussion CLI workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| Citation rules (MANDATORY): | ||
| - When referencing knowledge, methods, findings, or claims from outside the paper under discussion, you MUST provide numbered inline citations (e.g. **[1]**, **[2]**) in the text body. | ||
| - All cited references MUST be collected in a **References** section at the end of your output. |
There was a problem hiding this comment.
Citation rules require the References section to be "at the end of your output", but the final report instructions also require ending with an "Overall take" line (which would come after References). This is contradictory. Either relax the rule (e.g., References immediately before the final verdict) or move the verdict into an earlier section so References can truly be last.
| - All cited references MUST be collected in a **References** section at the end of your output. | |
| - All cited references MUST be collected in a **References** section at the end of the main body of your output, or immediately before any required final closing line (for example, **Overall take**). |
| [0]. **[Paper authors]** (Year). *[Paper title].* Venue. [DOI/URL](link) | ||
| [Collect all numbered inline citations from the discussion into this section. Each entry must use markdown: **Author(s)** (Year). *Title.* Venue. [DOI](link)] |
There was a problem hiding this comment.
The References section template uses [0]. and a bracketed instruction line, while the required reference format above specifies N. **Author(s)** (Year)... entries. Align the template with the mandated format (including the numbering prefix style) so the model has a single unambiguous target format.
| [0]. **[Paper authors]** (Year). *[Paper title].* Venue. [DOI/URL](link) | |
| [Collect all numbered inline citations from the discussion into this section. Each entry must use markdown: **Author(s)** (Year). *Title.* Venue. [DOI](link)] | |
| 1. **[Paper authors]** (Year). *[Paper title].* Venue. [DOI/URL](link) | |
| Collect all numbered inline citations from the discussion into this section. Format each entry as: N. **Author(s)** (Year). *Title.* Venue. [DOI/URL](link) |
|
|
||
| ### Inline Citation & Reference Format | ||
|
|
||
| Use numbered inline citations in the text body (e.g., `[1]`, `[2]`) and collect full references in the `## 8. References` section. All references MUST be rendered in markdown so they are clickable and well-formatted: |
There was a problem hiding this comment.
This line says inline citations are like [1], [2], but elsewhere (and in the PR description/examples) the required format is bold **[1]**, **[2]**. Please make the inline-citation format consistent across the document so outputs don’t vary between bold/non-bold brackets.
| Use numbered inline citations in the text body (e.g., `[1]`, `[2]`) and collect full references in the `## 8. References` section. All references MUST be rendered in markdown so they are clickable and well-formatted: | |
| Use numbered inline citations in the text body in bold markdown format (e.g., `**[1]**`, `**[2]**`) and collect full references in the `## 8. References` section. All references MUST be rendered in markdown so they are clickable and well-formatted: |
|
|
||
| ### Inline Citation & Reference Format | ||
|
|
||
| Use numbered inline citations in the text body (e.g., `[1]`, `[2]`) and collect full references at the end. All references MUST be rendered in markdown so they are clickable and well-formatted: |
There was a problem hiding this comment.
This line specifies inline citations as [1], [2], but the examples and other policy text use bold **[1]** formatting. Please standardize the inline-citation format so the skill consistently produces the same bracket style.
| Use numbered inline citations in the text body (e.g., `[1]`, `[2]`) and collect full references at the end. All references MUST be rendered in markdown so they are clickable and well-formatted: | |
| Use numbered inline citations in the text body (e.g., `**[1]**`, `**[2]**`) and collect full references at the end. All references MUST be rendered in markdown so they are clickable and well-formatted: |
| N. **AuthorLastName, A. et al.** (Year). *Paper Title.* Journal/Venue. [DOI:xxx](https://doi.org/xxx) or [URL](url) | ||
| 11. Only cite references you are confident are real published works. If uncertain, mark the claim as **[needs verification]** instead. | ||
| 12. Do NOT fabricate or hallucinate references. Fewer real citations are always better than fake ones. | ||
| 13. The seed paper itself should be cited as **[0]** at the top of the References section.`; |
There was a problem hiding this comment.
Within the Citation rules block, inline citations are specified as **[N]** but reference-list entries are specified as N. ..., while the seed paper is specified as **[0]**. This mixes two different numbering syntaxes (bracketed vs dotted) in the same policy. Consider standardizing on one mapping (e.g., inline **[N]** and reference lines N. including 0. for the seed) and update the text accordingly.
| 13. The seed paper itself should be cited as **[0]** at the top of the References section.`; | |
| 13. The seed paper itself MUST appear as reference `0.` at the top of the **References** section; inline mentions of the seed paper should use **[0]**.`; |
| - When referencing knowledge, methods, findings, or claims from outside the paper under discussion, you MUST provide numbered inline citations (e.g. **[1]**, **[2]**) in the text body. | ||
| - All cited references MUST be collected in a **References** section at the end of your output. | ||
| - Each reference MUST use this markdown format: | ||
| N. **AuthorLastName, A. et al.** (Year). *Paper Title.* Journal/Venue. [DOI:xxx](https://doi.org/xxx) or [URL](url) | ||
| - Only cite references you are confident are real published works. If you are uncertain about a reference's accuracy, do NOT cite it — instead mark the claim as **[needs verification]**. | ||
| - Do NOT fabricate or hallucinate references. It is better to have fewer citations than fake ones. | ||
| - The paper under discussion itself should be cited as **[0]** at the top of the References section.`; |
There was a problem hiding this comment.
This Citation rules block mixes bracketed numbering for inline citations (**[1]**) with dotted numbering for reference entries (N. ...) while also requiring the seed paper be cited as **[0]**. To avoid inconsistent outputs, standardize the numbering syntax and explicitly state how [N] maps to the reference list (e.g., reference lines are 0./1./2. corresponding to inline **[0]**/**[1]**/**[2]**).
| - When referencing knowledge, methods, findings, or claims from outside the paper under discussion, you MUST provide numbered inline citations (e.g. **[1]**, **[2]**) in the text body. | |
| - All cited references MUST be collected in a **References** section at the end of your output. | |
| - Each reference MUST use this markdown format: | |
| N. **AuthorLastName, A. et al.** (Year). *Paper Title.* Journal/Venue. [DOI:xxx](https://doi.org/xxx) or [URL](url) | |
| - Only cite references you are confident are real published works. If you are uncertain about a reference's accuracy, do NOT cite it — instead mark the claim as **[needs verification]**. | |
| - Do NOT fabricate or hallucinate references. It is better to have fewer citations than fake ones. | |
| - The paper under discussion itself should be cited as **[0]** at the top of the References section.`; | |
| - When referencing knowledge, methods, findings, or claims from outside the paper under discussion, you MUST provide numbered inline citations in the text body using the format **[N]** (e.g. **[1]**, **[2]**). | |
| - All cited references MUST be collected in a **References** section at the end of your output. | |
| - Reference entries in the **References** section MUST use matching numeric labels `0.`, `1.`, `2.`, etc., where inline **[N]** maps directly to reference entry `N.`. | |
| - Each reference MUST use this markdown format: | |
| N. **AuthorLastName, A. et al.** (Year). *Paper Title.* Journal/Venue. [DOI:xxx](https://doi.org/xxx) or [URL](url) | |
| - Only cite references you are confident are real published works. If you are uncertain about a reference's accuracy, do NOT cite it — instead mark the claim as **[needs verification]**. | |
| - Do NOT fabricate or hallucinate references. It is better to have fewer citations than fake ones. | |
| - The paper under discussion itself MUST appear as reference entry `0.` at the top of the **References** section and should be cited inline as **[0]** when referenced.`; |
| 1. Ground every claim in evidence from the paper or widely-accepted domain knowledge. | ||
| 2. Clearly label speculation with "[Speculative]". | ||
| 3. If you reference a method or dataset, give a concrete citation or link. | ||
| 4. Be constructive: point out limitations, then suggest fixes. |
There was a problem hiding this comment.
Rule 3 ("give a concrete citation or link") now conflicts/redundantly overlaps with the new mandatory numbered-citation policy below. To avoid mixed behaviors (raw URLs vs numbered citations), consider rewriting rule 3 to explicitly refer to the numbered inline citation + References section format introduced in the Citation rules block.
| [0]. **[Seed paper authors]** (Year). *[Seed paper title].* Venue. [DOI/URL](link) | ||
| [Consolidate all numbered inline citations from the entire discussion. Each entry uses markdown: **Author(s)** (Year). *Title.* Venue. [DOI](link)] |
There was a problem hiding this comment.
The References template here uses bracketed numbering ([0].) which conflicts with the earlier mandated reference-line format (N. **Author...** (Year)...). This inconsistency will make the model output unpredictable and may violate the policy. Pick one canonical reference list format (e.g., 0. ... / 1. ... lines) and align both the Citation rules and the report template to it.
| [0]. **[Seed paper authors]** (Year). *[Seed paper title].* Venue. [DOI/URL](link) | |
| [Consolidate all numbered inline citations from the entire discussion. Each entry uses markdown: **Author(s)** (Year). *Title.* Venue. [DOI](link)] | |
| 0. **[Seed paper authors]** (Year). *[Seed paper title].* Venue. [DOI/URL](link) | |
| [Consolidate all numbered inline citations from the entire discussion. Format every entry as `N. **Author(s)** (Year). *Title.* Venue. [DOI/URL](link)` using plain numbered lines, not bracketed numbers.] |
| End with: | ||
|
|
||
| `Overall take: ...` | ||
|
|
||
| ## 8. References |
There was a problem hiding this comment.
In the Final Report structure, ## 8. References appears after the instruction to "End with: Overall take". That ordering is ambiguous (it reads like References comes after the final line). Make References an explicit part of the required structure and clarify whether "Overall take" should appear before or after References (and keep this consistent with the web-app prompt).
|
|
||
| ### Inline Citation & Reference Format | ||
|
|
||
| Use numbered inline citations in the text body (e.g., `[1]`, `[2]`) and collect full references in the `## 7. References` section. All references MUST be rendered in markdown so they are clickable and well-formatted: |
There was a problem hiding this comment.
This line specifies inline citations as [1], [2], but the examples and web-app prompts use bold **[1]** formatting. Standardize the inline-citation format here to match the rest of the citation policy to avoid inconsistent outputs.
| Use numbered inline citations in the text body (e.g., `[1]`, `[2]`) and collect full references in the `## 7. References` section. All references MUST be rendered in markdown so they are clickable and well-formatted: | |
| Use numbered inline citations in the text body (e.g., `**[1]**`, `**[2]**`) and collect full references in the `## 7. References` section. All references MUST be rendered in markdown so they are clickable and well-formatted: |
Summary
Changes
Web App Backend (actual runtime prompts)
Experimentalist, and Scribe prompts
Claude Code CLI Skills
Test plan