Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agents/wiley-nexus/tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ the instructions.

| File | Written by | Contents |
| --- | --- | --- |
| `evidence_passages.md` | Task 1 | Every unique publication found, with its labeled metadata (DOI, authors, journal, full-text availability, Wiley Online Library link) and verbatim passages, plus a note on what each search angle covered. |
| `evidence_passages.md` | Task 1 | An index of every publication's citation number and DOI, then every unique publication found, with its labeled metadata (DOI, authors, journal, full-text availability, Wiley Online Library link) and verbatim passages, plus a note on what each search angle covered. |
| `fulltext_shortlist.json` | Task 1 | The 3–5 papers most worth reading in full, each with its DOI, title, a one-line rationale, and its download token. |
| `analysis_<doi>.json` | Task 2, one per shortlisted paper | That paper's status, contribution, key findings, methods, and limitations — or a status of `unavailable` with a reason if it could not be retrieved. |
| `research_response.md` | Task 3 | **The deliverable** — a structured answer with IEEE-numbered citations linked to Wiley Online Library. |
Expand Down
5 changes: 3 additions & 2 deletions agents/wiley-nexus/tasks/nexus-research-task.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Search Wiley Nexus from multiple distinct angles and build the evidence base tha

Produce two files.

File 1 - evidence_passages.md (markdown). Open with a "## Search coverage" section containing one bullet per search angle, giving the query used, what it supported, and any facet that returned little or nothing. Then a "## Publications" section with one "### [n] Title" entry per unique publication, deduplicated by DOI, each carrying these labeled fields, using exactly these names: DOI, Authors, Journal, Full Text Available, Wiley Online Library. Under each entry, include that publication's passages quoted verbatim as blockquotes.
File 1 - evidence_passages.md (markdown). Open with a "## Index" section listing every publication on one line as "[n] DOI — Title", using the same numbers as the Publications section below. Then a "## Search coverage" section containing one bullet per search angle, giving the query used, what it supported, and any facet that returned little or nothing. Then a "## Publications" section with one "### [n] Title" entry per unique publication, deduplicated by DOI, each carrying these labeled fields, using exactly these names: DOI, Authors, Journal, Full Text Available, Wiley Online Library. Under each entry, include that publication's passages quoted verbatim as blockquotes.

File 2 - fulltext_shortlist.json (JSON), of the form {"shortlist":[{"doi":"...","title":"...","rationale":"...","full_text_token":"..."}]}, listing the 3 to 5 publications most worth reading in full. Only shortlist papers whose search hit carried a full_text_token, and copy each token verbatim.

Expand All @@ -42,6 +42,7 @@ In your reply, list every shortlisted paper's DOI and title, one per line. The n
3. evidence_passages.md includes a search coverage section that names each angle searched and flags any facet with little or no evidence.
4. fulltext_shortlist.json exists and contains 3 to 5 entries, each with a doi, a title, a rationale, and a non-empty full_text_token.
5. The task result text lists the DOI and title of every shortlisted paper.
6. evidence_passages.md opens with an Index that lists every publication's number and DOI, matching the "### [n]" entries.
```

---
Expand Down Expand Up @@ -100,7 +101,7 @@ Research question: {{RESEARCH_QUESTION}}

The upstream tasks produced evidence_passages.md, containing passage-level evidence and metadata for every publication found, and one analysis file per shortlisted paper, marked unavailable if it could not be retrieved. The number of analysis files varies per run, so list the available resources and read every analysis file present rather than assuming a single one. Do not search or download anything; work only from these files.

Write research_response.md: a structured, chat-style answer to the research question, not a formal report. Lead with the direct answer in the first paragraph or two, then develop detail under headings, using a table where comparing studies or outcomes is clearer than prose. Cite in IEEE style, numbering sources in order of first appearance with bracketed inline markers tied to a "## References" list whose entries are built only from metadata in these files and linked to Wiley Online Library. Give more weight to findings from papers read in full than to passage-only evidence, state plainly what the retrieved literature does not establish, including any paper marked unavailable, and close with a one-line evidence basis.
Write research_response.md: a structured, chat-style answer to the research question, not a formal report. Lead with the direct answer in the first paragraph or two, then develop detail under headings, using a table where comparing studies or outcomes is clearer than prose. Cite in IEEE style, reusing each publication's number from the "### [n]" headings in evidence_passages.md (never renumbering by first appearance) as bracketed inline markers tied to a "## References" list whose entries are built only from metadata in these files and linked to Wiley Online Library. Give more weight to findings from papers read in full than to passage-only evidence, state plainly what the retrieved literature does not establish, including any paper marked unavailable, and close with a one-line evidence basis.
```

**Validation Criteria**
Expand Down
7 changes: 6 additions & 1 deletion agents/wiley-nexus/tasks/nexus-search-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ Persist both files with the data-handling tools, then list the shortlist in your
```
# Evidence — <the precise research question>

## Index
- [1] <doi> — <Title>
- [2] <doi> — <Title>
- ... (one line per publication, same numbers as the Publications section)

## Search coverage
- **<angle>** — query: "<query text>" — coverage: <what it supported; note any facet that returned little or nothing>
- ... (one bullet per angle)
Expand All @@ -62,7 +67,7 @@ Passages:
- ... (same fields)
```

One `###` entry per UNIQUE publication (dedupe by DOI), numbered in listing order. Set **Full Text Available: Yes** when the hit carried a `full_text_token`. Quote passages verbatim under `>` blockquotes (trim obvious boilerplate, never paraphrase — downstream stages need the actual evidence). Record any thin/empty facet in the Search coverage bullets.
One `###` entry per UNIQUE publication (dedupe by DOI), numbered in listing order. The `## Index` at the top lists every publication's number, DOI and title in one line each, with exactly the same numbers as the `###` entries; keep it first, because downstream readers of a long file may only see its opening lines. Set **Full Text Available: Yes** when the hit carried a `full_text_token`. Quote passages verbatim under `>` blockquotes (trim obvious boilerplate, never paraphrase — downstream stages need the actual evidence). Record any thin/empty facet in the Search coverage bullets.

**2. `fulltext_shortlist.json`** — the 3–5 publications MOST worth reading in full (most on-point and substantive; prefer complementary coverage over near-duplicates). This one stays **JSON** because the next stage parses it to pass each paper's token to a full-text analyzer. A JSON object:

Expand Down
6 changes: 3 additions & 3 deletions agents/wiley-nexus/tasks/nexus-writer-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The research question (plus any format or length constraints) arrives in the tas

## Method

1. **Source list first:** Collect every unique publication across the evidence file and the analyses — DOI, title, authors, journal, year, wol_link — and note for each whether it was read in full text (an `analysis_<doi>.json` with `status: "analyzed"`) or is supported by search passages only (present in `evidence_passages.md` but not analyzed, or analyzed as `"unavailable"`). That weighting runs through the whole answer.
1. **Source list first:** Collect every unique publication across the evidence file and the analyses — DOI, title, authors, journal, year, wol_link — and note for each whether it was read in full text (an `analysis_<doi>.json` with `status: "analyzed"`) or is supported by search passages only (present in `evidence_passages.md` but not analyzed, or analyzed as `"unavailable"`). That weighting runs through the whole answer. Before writing, take every publication's number and DOI from the `## Index` at the top of `evidence_passages.md` — it lists all of them, including entries near the end of a long file that a read may not reach. If the file has no Index, read the Publications section to the end and list every `### [n]` entry with its DOI instead. For each analysis file, find its DOI in that list (compare case-insensitively, ignoring any `https://doi.org/` prefix) and use that `[n]`.

2. **Themes from the evidence:** Group findings by facet of the research question, not paper by paper. Let the evidence set the structure; never impose sections the sources don't fill.

Expand All @@ -29,11 +29,11 @@ Persist the finished answer as `research_response.md` and share it as the pipeli

- Lead with the direct answer in the first paragraph or two — a reader who stops there should leave correctly informed. Scale the structure to the content: a focused question may need only a few paragraphs; a broader one takes ## headings for distinct facets. Use a markdown table to compare studies, methods, or outcomes; use lists where they are clearer than prose.

- Cite in IEEE style. Number sources in order of first appearance and mark each claim inline with its bracketed number — [1], [2], [3] — linking every marker to its matching entry in the reference list.
- Cite in IEEE style, reusing the numbers the search stage already assigned. Every publication in the Publications section of `evidence_passages.md` carries a number in its heading (`### [n] Title`) — cite that paper as [n] everywhere: inline and in the reference list. Match an analysis file to its number by DOI, using the list from step 1. Never renumber by order of first appearance in your own answer, and never give an evidence-file paper a different number. Only if a cited publication's DOI appears nowhere in `evidence_passages.md`, Index included, do you give it a new number: the first such publication gets one greater than the highest `[n]` in that file, the next gets the number after that, and so on. Never reuse a number that already belongs to an evidence entry or to another newly numbered publication. Add each new number to your list from step 1 with its DOI, and use that same number every time the publication is cited. Mark each claim inline with its bracketed number, linking every marker to its matching entry in the reference list. Because you cite only the papers you use, the numbers will not be consecutive (e.g. [2], [5], [9]) — that is expected and keeps the answer cross-checkable against the evidence; do not close the gaps.

- Treat gaps as part of the answer: say plainly what the retrieved literature does not establish, which facets the search found thin, and which shortlisted papers could not be read in full (the analyses marked `unavailable`).

- End with a `## References` section — a numbered list matching the inline markers, each entry built only from the metadata in the pipeline files (authors, title, publication name, year, DOI) and linked to the paper via its `wol_link`; omit fields the files don't carry rather than inventing them, and note which references were read in full versus cited from a passage. Format each entry like: `[1] A. Author, B. Author, and C. Author, "Title of the paper," *Publication Name*, 2024, doi: 10.xxxx/xxxxx. [Wiley Online Library](wol_link)`.
- End with a `## References` section — a list matching the inline markers, ordered by those evidence-file numbers ascending, each entry built only from the metadata in the pipeline files (authors, title, publication name, year, DOI) and linked to the paper via its `wol_link`; omit fields the files don't carry rather than inventing them, and note which references were read in full versus cited from a passage. Format each entry like: `[1] A. Author, B. Author, and C. Author, "Title of the paper," *Publication Name*, 2024, doi: 10.xxxx/xxxxx. [Wiley Online Library](wol_link)`.

- Close with one line on the evidence basis: how many publications the answer draws on, and which were read in full versus search passages only.

Expand Down
Loading