Publish hermes-skills-research via gitea-publish skill

This commit is contained in:
figmar
2026-08-09 08:19:33 +08:00
commit bca5c4f6fa
67 changed files with 29416 additions and 0 deletions
@@ -0,0 +1,65 @@
# Citation formats per output target
The ledger is format-agnostic: `sources.py render --style ...` emits the block,
this file says where it goes and what the inline marker looks like.
## Markdown / chat answers
Inline `[n]` immediately after the sentence. Block at the end:
```
## Sources
[1] https://example.com/a — Page title
[2] https://example.com/b
```
`--style plain` gives a bare `Sources:` header for chat replies where a
markdown heading would be noise.
## PDF via LaTeX (`latex-pdf-report` skill)
Use `--style footnotes` and map each id to `\footnote{}` at first use, or keep
numeric markers and emit an endnotes section. For a bibliography-shaped report,
`--style bibtex` writes `@misc` entries keyed `source<N>`; cite them with
`\cite{source3}` and let BibTeX render the list.
Do not mix: either numeric `[n]` + a Sources section, or `\cite{}` + BibTeX.
Two numbering systems in one document is worse than none.
## Word (.docx, `docx` skill)
Real footnotes are preferred over inline brackets in prose documents intended
for human editing — reviewers expect Word footnotes. Keep the ledger ids as the
footnote numbers so `verify` still works on a markdown source-of-truth, and
generate the .docx from that markdown.
## Slides (.pptx, `powerpoint` skill)
Inline `[n]` in the bullet, one "Sources" slide at the end rendered with
`--style plain`. Never put a URL in a body bullet — it wrecks the layout and
can't be clicked in a projected deck.
## Spreadsheets (.xlsx)
Add a `source` column holding the id, plus a `Sources` sheet built from
`render --style plain`. Do not paste URLs into data cells.
## Wiki / multi-page output (`llm-wiki`, Obsidian)
Per-page Sources block, ids shared across pages from one ledger. Because ids
are ledger identities, `[7]` means the same page everywhere in the wiki — that
consistency is the reason not to reset the ledger between pages of one build.
## Research papers
Hand off to the `research-paper-writing` skill. Export with
`--style bibtex` into `references.bib`, then follow that skill's citation
verification (it greps `\cite{...}` against the .bib). The ledger's job ends at
producing verified URL entries; venue formatting is that skill's domain.
## Code and config artifacts
No citations inside generated code. If provenance matters, put it in the
commit message, the PR body, or a doc header — not in comments scattered
through source.
@@ -0,0 +1,64 @@
# Why numbered ledger ids (grounding research basis)
Design notes for anyone changing the citation instructions or the ledger
mechanics. The wording in SKILL.md is not arbitrary.
## The structural trick
Hallucinated citations happen when a model reconstructs a URL from memory. If
the only thing the model has to emit is a small integer it was handed at
retrieval time, there is nothing to reconstruct — a wrong id is detectable
(it's not in the ledger) and a wrong URL is impossible (the model never types
one; `render` does). This is the property Perplexity's product relies on, and
it's why the ledger, not the prose, owns the URL.
Consequence: **register at retrieval, render mechanically.** Any workflow that
lets the model type a URL into the Sources block gives the guarantee back.
## Cite while writing, not after
ALCE (arXiv:2305.14627) evaluates attribution for LLM answers and finds that
generating citations during composition, from numbered retrieved snippets,
produces materially better attribution than post-hoc citation insertion.
Post-hoc attribution invites the model to find a source that plausibly matches
a sentence it already wrote — which is exactly how a citation ends up
supporting something the page doesn't say.
Hence: cite per supported sentence, in-line, as the sentence is written. Never
a citation dump at the end of a paragraph or document.
## Verbatim quotes ground claims
WebGPT (arXiv:2112.09332) collects verbatim quotes at browse time and composes
answers from them. The practical rule for this skill: when a claim carries a
figure, date, name, or quantity, take it from the source's own words rather
than paraphrasing from a summary of a summary. Each summarization hop is a
chance for a number to drift.
## Formatting conventions
From Perplexity's leaked system prompts (jujumilk3/leaked-system-prompts) — the
conventions are worth copying because they're the ones users have been trained
to read:
- Marker directly after the terminal punctuation, no space: `water.[1]`
- Each id in its own brackets: `[1][2]`, not `[1, 2]`
- At most 3 ids per sentence — beyond that the citation stops identifying which
source carries the claim
- Never cite a source not actually consulted
- Query classes that shouldn't be cited (translation, creative writing, casual
chat) are exempted by instruction, not by a separate classifier
Perplexity forbids raw URLs in the answer because its UI renders source cards.
Hermes has no such UI layer in chat or in a written file, so this skill renders
the id → URL list explicitly instead.
## Related in-tree implementation
`tools/web_tools.py` grew an in-process version of this idea (a `url -> [n]`
registry plus citation guidance attached to tool results) in PR #44833. That
path grounds ad-hoc web answers automatically when it lands. This skill is the
portable half: it works with any retrieval source (browser, curl, CLIs, local
PDFs) and it persists the ledger to disk so multi-turn, multi-file, and
multi-subagent work keeps stable ids. The two can coexist — the ledger is the
source of truth for anything written to a file.