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

The ability to mark text that should be explicitly ignored when creating a prompt (anti-context) #508

Open
axelknock opened this issue Dec 14, 2024 · 0 comments
Labels
feature request Request for a new feature

Comments

@axelknock
Copy link
Contributor

axelknock commented Dec 14, 2024

Problem
Sometimes I would like to send the contents of the buffer above point sans something irrelevant to the LLM, for example nametags such as "ASSISTANT:" or "USER:" (in a gptel buffer), context that will confuse the LLM such as code not related to the present prompt, or text that should be kept secret.

Describe the solution you'd like
The first thought that jumps to mind is another text property called ignore, which the prompt-making function(s) will skip over.

I don't have any ideas for surfacing this to general users at the moment except perhaps as a gptel-ignore function that applies the property. My thinking is that it would be used with a pre or post response hook to compose the prompt more to the user's liking with a function they write themselves, for example to apply prop 'ignore to text matching some regex.

It may prove useful for other features however, see related below.

Describe alternatives you've considered
To achieve this presently you can create an indirect buffer and manually choose the context you'd like to include in the next message from the original buffer, skirting around what you'd like to avoid sending to the LLM. This method would not work to collect the context as text belonging to its owner, and all of it is sent as though the user wrote it, even if it includes response text.

Related: #460, #408.

@axelknock axelknock added the enhancement New feature or request label Dec 14, 2024
@karthink karthink added feature request Request for a new feature and removed enhancement New feature or request labels Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants