Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "excerpt-level" configuration #32

Open
vincerubinetti opened this issue Aug 9, 2023 · 3 comments
Open

Add support for "excerpt-level" configuration #32

vincerubinetti opened this issue Aug 9, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@vincerubinetti
Copy link
Collaborator

#31 allows users to specify which files get passed to what prompts, but maybe some users will want to explicitly revise just a few specific paragraphs within a file.

We would do this by letting the user demarcate "excerpts" (let's use this terminology, as distinct from "sections") with HTML comments that don't affect output.

Proposed format:

lorem ipsum

<!-- start AI revise introduction -->
lorem ipsum
<!-- end AI revise -->

Where "introduction" is the name/id of the prompt in prompts.yaml to apply.

@vincerubinetti vincerubinetti added the enhancement New feature or request label Aug 9, 2023
@castedo
Copy link

castedo commented Dec 3, 2023

I'm thinking of doing this or similar for https://copyaid.it too. But copyaid is a CLI and not a GitHub workflow. So rather than picking prompts based on file names, the prompt is picked based on the "task" specific by the user in the CLI. I find this useful because sometimes I just want to do a quick proofread, other times I want to see lots of different suggested edits, and other times I want something in between. It just depends how much the text has already been worked on and how much time I want to spend revising text.

There is a related enhancement that I am considering which is doing few-shot prompting. By few-shot prompting I mean when GPT is given examples of requests and their responses prior to the final request/response. My hope is that few-shot prompting would better clue GPT into what kind of edits to NOT make. Sections of text which should not be edited are potentially a valuable clue to GPT of what kind of edits to NOT make for the sections that should be edited.

So this "excerpt-level" config could guide few-shot prompting in addition to being an on/off switch. Some sections can be commented as ignore, some as edit, and some sent to GPT as here-are-examples-of-text-that-are-fine-and-do-not-need-editing.

Lastly, if I add this feature to copyaid, I will also have something to work for LaTeX. But for Markdown I'll definitely take the approach here of HTML comment.

@castedo
Copy link

castedo commented Jan 2, 2024

FYI @vincerubinetti, here is what I am currently planning to implement soon for CopyAId:

https://gitlab.com/castedo/copyaid/-/issues/6

Feel free to share feedback and comments.

Note that my current plan is to NOT emulate open/close tags. The reason is I think users want to minimize how much instructional cruft is getting inserted into source text. So I am more emulating <br> but as "copybreaks" which can change what prompt gets used for the text that follows ... until the next copybreak changes the prompt to something else.

@castedo
Copy link

castedo commented Jan 28, 2024

FYI in case you want to do something similar, I've released the new feature of "copybreaks" in v0.7 of CopyAid:
https://copyaid.it/copybreaks/

The keyword copybreak feels like a good choice. Less clear to me is whether supporting an additional short keyword of cbr is a good idea or not. I'm dog-fooding both now. Example of short and long are:
https://gitlab.com/castedo/copyaid/-/edit/copyaid.it/docs/hot.md (short cbr use)
https://gitlab.com/castedo/copyaid/-/edit/copyaid.it/docs/start.md (long copybreak use)

Kind of seems like cbr is not worth it. Yeah, less chars to type, but it's harder to read, less learnable, and probably makes interoperability between tools worse. Thoughts and feedback welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants