You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: USAGE.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -329,6 +329,32 @@ Potential spelling errors will be printed in the continuous integration log alon
329
329
Words in `build/assets/custom-dictionary.txt` are ignored during spellchecking.
330
330
Spellchecking is currently only supported for English language manuscripts.
331
331
332
+
## AI-assisted authoring
333
+
334
+
The workflow [`ai-revision`](.github/workflows/ai-revision.yaml) is available to assist authors in writing their manuscripts.
335
+
It uses large language models to revise the manuscript text, fixing spelling and grammar errors, and improving the sentence structure and the writing style with section-specific prompts.
336
+
It is manually triggered by the user (it never runs automatically), and it generates a pull request with suggested revisions.
337
+
Then the user can review these changes and merge the pull request if they are acceptable.
338
+
More information about this tool is available in [this manuscript](https://greenelab.github.io/manubot-gpt-manuscript/).
339
+
340
+
You need to change your repository settings to 1) provide a secret with name `OPENAI_API_KEY` containing your OpenAI API token, and 2) allow workflows to create pull requests.
341
+
For 1), go to the settings page and, within "Secrets and variables," select "Actions."
342
+
Next, create a repository secret with the name `OPENAI_API_KEY` and the value of the API token (you can also do this using "Organization secrets" if available).
343
+
For 2), go to "Actions", "General", "Workflow permissions", and activate the checkbox "Allow GitHub Actions to create and approve pull requests."
344
+
345
+
By default, the tool uses the model `text-davinci-003`.
346
+
Make sure to check the [pricing](https://openai.com/api/pricing/) of the OpenAI API.
347
+
With $0.02 per 1000 tokens using the most powerful AI models, the cost for a revision of a standard manuscript (around 35 paragraphs) should be around $0.50.
348
+
The workflow allows specifying the branch and file names (in the `content/` directory) to revise, the language model to use, and the output branch name.
349
+
Internally, the workflow uses the tool [Manubot AI Editor](https://github.com/manubot/manubot-ai-editor) to revise the manuscript.
350
+
For more advanced users, the behavior of the Manubot AI Editor or the parameters used for the language model can be changed using environment variables.
351
+
These variables can be changed in the workflow file (`ai-revision.yaml`).
352
+
353
+
It is important to note that using language models in scientific writing is a matter of debate among researchers and journal editors.
354
+
Therefore, it's advisable to follow the guidelines that journals and the research community propose.
355
+
For example, the *Nature* journal has published [rules about using language models in scholarly writing](https://www.nature.com/articles/d41586-023-00191-1), such as not listing the tools as authors and documenting how they were used.
356
+
Since a Manubot-based manuscript uses GitHub, one approach consists of linking the AI-generated pull request, which will transparently show the changes suggested by the AI tool.
357
+
332
358
## Manubot feedback
333
359
334
360
If you experience any issues with the Manubot or would like to contribute to its source code, please visit [`manubot/manubot`](https://github.com/manubot/manubot) or [`manubot/rootstock`](https://github.com/manubot/rootstock).
0 commit comments