enricoros / big-AGI

Generative AI suite powered by state-of-the-art models and providing advanced AI/AGI functions. It features AI personas, AGI functions, multi-model chats, text-to-image, voice, response streaming, code highlighting and execution, PDF import, presets for developers, much more. Deploy on-prem or in the cloud.
https://big-agi.com
MIT License
5.24k stars 1.19k forks source link

Better support for custom personas #340

Open vadimkatsman opened 8 months ago

vadimkatsman commented 8 months ago

Why The reason behind the request - we love it to be framed for "users will be able to do x" rather than quick-aging hype-tech-of-the-day requests

While working on custom persona, I created a prompt almost 1000 characters long, which was lost as soon as persona transcript was finalized.
1) I may need to work on refining the persons but I would have to start from the scratch each time (or to have my own manual way of saving persona creation prompts) 2) The persona creation prompt contains context not only for persona creation but for subsequent chats in which that persona to be used. Without access to that prompt I would have to start building that context from scratch. 3) The UI listing personas shows me auto-generated message without ability to give that persona a distinct label. I can rename the chat but it looks like I cannot rename a persona. 4) I can export chats and import them to another device but what about personas?
5) Since the generated prompt is for me to copy and paste into the starting prompt of the char, I was expecting to be able to edit generated text - to include the conversation context which was removed when the transcript was created. 6) Technically, since the persona prompt is really an initial context of the chat, to have two collections of presets - persona presets and typical tasks preset (a task preset would include which task the chat is for). 7) Persona context may include not only a transcript for the actor playing the persona but also the context in which the persona operates - I generated a persona of a proverbial CIO but I would include the culture of the company in which the persona operates. It would be another context preset - environment in which personal operates.

Concise description A clear and concise description of what you want to happen.

1) Ability to properly name / label personas. 2) Ability to select the created and named personas from persona selector (rather than copying/pasting the personal defining prompt) - possible solution to give a user a choice to generate a shortcut for persona or not - I may create multiple personas but some of them will be used more frequent than others. 3) Ability to edit the generated persona prompt - as it is not really a "persona" but rather the starting context of the chat. Maybe to have 3 separate collections - personality, environmental and task contexts - all individually selectable. 4) Ability to export / import personas (and other presets) 5) Access to source of persona generation - including adding the source prompt into import/export.

Requirements If you can, please detail the changes you expect in UX, user workflows, technology, architecture (if not, the reviewers will do it for you)

vadimkatsman commented 7 months ago

I would like to add to this conversation with few important comments.

At the time of original writing of the suggestion, I was not deep in the weeds of ChatGPT-4 and did not realize that what you call "persona" is not a persona at all but rather a system message aka custom instructions.

Custom instructions define the context of the conversation and may include personas - for style of the output - but define many more aspects of the prospective output.

So the real goal is to be able to construct system messages from presets. Hence wider scope of the suggestion:

1) To have a collection of presets for system messages (fully custom system messages saved to be reused between various projects (I am referring a single chat as a project with the single outcome in mind). 2) To allow building system messages using the ordered building blocks - persona description, environment description, task description.
3) the suggestion 2 would require "miscellaneous" preset - additional instructions that do not fit semantically into three categories above but still could be saved for reuse.
4) A collection of miscellaneous blocks could be shared with the suggestion 1 - technically they are custom system messages, which could be combined with other building blocks or used standalone - per user discretion.

The maintenance of all building blocks to follow the same capabilities:

I hope you recognize the motivation behind these suggestions - to make value added features that even original ChatGPT UI does not offer. But to do it in the way that users of your solution at least have capabilities offered by the ChatGPT UI - assuming the choice between your and Open AI interfaces is rooted in distinct payment models - monthly (ChatGPT Plus) and per-use through API key (any API based solution - which by definition offered by independent developers).

Philbobaggins93 commented 6 months ago

I really love the idea of this implementation of custom instructions! I was just going to suggest the ability to customize personas but this is even more interesting. I think it would allow you to take a more granular approach with priming the context window with relevant info for the LLMs.

enricoros commented 6 months ago

@vadimkatsman @Philbobaggins93 agree. Started adding what we call "mixins", or the building blocks for the prompts.

What are the blocks you envision? Just to make sure the architecture is broad enough to cover the right use cases.

vadimkatsman commented 6 months ago

Enrico, if you remember the diagram I have shared with you, I mentioned 6 blocks (5 in the diagram, but persona is split in two) – from use cases I can come up with:

From: Enrico Ros @.> Sent: Friday, March 08, 2024 3:17 AM To: enricoros/big-AGI @.> Cc: Vadim Katsman @.>; Mention @.> Subject: Re: [enricoros/big-AGI] Better support for custom personas (Issue #340)

@vadimkatsmanhttps://github.com/vadimkatsman @Philbobaggins93https://github.com/Philbobaggins93 agree. Started adding what we call "mixins", or the building blocks for the prompts.

What are the blocks you envision? Just to make sure the architecture is broad enough to cover the right use cases.

— Reply to this email directly, view it on GitHubhttps://github.com/enricoros/big-AGI/issues/340#issuecomment-1985332086, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANSW6JF2MTA6DWF222VGQRTYXF62FAVCNFSM6AAAAABB2HTCQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBVGMZTEMBYGY. You are receiving this because you were mentioned.Message ID: @.**@.>>

DrDavidL commented 6 months ago

The personas a great. There should also be an easy "improve my question" feature that can use a lower level API, say 3.5. i find many users are frustrated with responses yet asked poor questions. The "improve my question" would optimize the question anticipating user needs and suggest an optimal format, allowing a user to tweak as needed. (I've leveraged this in some of my educational apps.) This lets the final more expensive model then do what it does best and follow more specific directions according to a pre-set format.

I'd also suggest making it easy for users to add domain restricted google or google/scholar links for relevant results. I have them in my system prompts (and LLM apps) as follows, and this would likely be a helpful feature for many users:

End response with:

See also: [2-3 related searches] { varied emoji related to terms}text to link { varied emoji related to terms} text to link You may also enjoy: [2-3 tangential, unusual, or fun related topics] { varied emoji related to terms} text to link

dandv commented 3 months ago

I'd like the second the request for custom persona, perhaps starting with the simplest feature/bugfix: saving the prompts per persona. Now if I edit the system prompt for a persona (e.g. "Dev"), it overwrites the "Custom" persona (and I lose that prompt).