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.

Home Page:https://big-agi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Personas: Add custom, dynamic, and persisted

enricoros opened this issue Β· comments

πŸš€ Dynamic Personas support 🌟

Requirements for the personas:

  • Phase 1: Still client-side, but some support for server-side

    • Dynamic persona support, remove hardcoding
    • Stored in a state store, persisted in localStorage
    • Personas in chats: reference? or copy?
    • Uuids for personas, and versioning
    • Add attributes: #198
    • Import from GPTs
    • Make extensible
  • Phase 2: Mixed Client and Server side?

    • Server-side personas may not have full visibility on the client - undecided on this yet
    • Shall be seeded from the server side
    • Shall be updated when the server side updates/adds/removes person
    • App is shipped without preloaded personas by default?

Hi there and thanks for this wonderful app.
I'm in favor of allowing the customization of Purposes via a purposes.json file, following a public JSON schema that you could define. This schema could then be used by any dev / admin to create their own purposes and manage them in the JSON compatible editor of their choice.
This file could be referred defined as a URL in the .env file / localstorage like OPENAI_API_KEY

Thanks for taking about this possible workflow @romainbessugesmeusy

I believe I shall implement the idea above. It's an easy step to go in the right direction. Maybe as fist phase, a single JSON file at build time, then loaded dynamically at runtime, then configurable in the environment and then finally the editing in the UI itself.

After that, I want to think at how to share prompt templates with other people and apps. Community templating should be a thing.

Throwing in a suggestion that down the line Personas could be expanded more into Identities. Obviously a ways out when we can't even save the custom Persona yet.

The thought in my mind is you would be able to set for each:

  • A name (even later possibility to potentially reference in a more "group" conversation style)
  • A prefered model
  • A voice

While this definitely feels like fluff at first, it could be used to more fluidly differentiate what models and configurations you're using (ie. if you have speech turned on by default, the voice will let you know immediately which "purpose" it's using and likely which model). Names could also be used instead of model entries for a "friendlier" appearance (when the model is the default for that identity)

Not sure if this is the right issue to mention this, but you let me know.
I'm just wondering if it's possible to add many Custom AI personas. Usually, I need to set up 3 or 4 personas to do one type of task for instance. With the current UI, I don't see how I can do that. Maybe I'm mistaken, but please let me know.
Thank you

@younes-io hi, thanks for the feedback. This use case is interesting..can you explain more about the 3-4 personas to do a task? Trying to optimize further for your needs.

@enricoros

sequenceDiagram
    participant User
    participant Persona1 as Persona A
    participant Persona2 as Persona B
    participant Persona3 as Persona C
    participant Persona4 as Persona D

    User->>Persona1: Input 1
    Note over Persona1: Process Input 1
    Persona1->>Persona2: Output 1 as Input 2
    Note over Persona2: Process Input 2
    Persona2->>Persona3: Output 2 as Input 3
    Note over Persona3: Process Input 3
    Persona3->>Persona4: Output 3 as Input 4
    Note over Persona4: Process Input 4
    Persona4->>User: Final Output

The sequence diagram above illustrates the workflow between multiple personas, each taking on a specific role in a project management scenario:

  • Persona A: Breaks down project milestones into tasks and subtasks
  • Persona B: Assigns tasks to team members based on their workload and expertise
  • Persona C: Checks progress and provides status reports to stakeholders
  • Persona D: Analyzes the workflow to identify and address bottlenecks

This multi-persona approach is essential for handling diverse tasks within a workflow. Each persona is akin to a specialized system with its own unique prompt, enabling a more efficient process. Currently, the limitation is that we can only engage with one AI persona at a time, which restricts the application's potential.

Drawing a parallel to OpenAI's GPTs, imagine if we could only use one GPT for all tasks...

Thanks for explaining clearly. Do you take the time to break it down into the 4 personas, or would you be okay if the system does it for you?

Depending on the complexity, the task can be broken into 1,2.. 20 personas. And the rule for breakdown should be based on context size and compression of information.

I don't mind if the system breaks it down for me.. but I'd prefer to have access to each persona, to adjust / amend if necessary.. Maybe, I would not be OK with how the system "configured" a specific persona.. so I would like to have the ability to adjust accordingly.

I guess having a "pipeline" of personas to work an a prompt is a neat idea! One thing that came to mind would also to attach a persona to a model.

Now: for what I have tested, the concept of persona is not really useful to me - or probably I am using it incorrectly. What a persona is - in my mind - a system prompt that specifies a specific task to achieve and not a response style (which is nice for entertainment purposes but not much more).

Opinions?

I guess having a "pipeline" of personas to work an a prompt is a neat idea! One thing that came to mind would also to attach a persona to a model.

Now: for what I have tested, the concept of persona is not really useful to me - or probably I am using it incorrectly. What a persona is - in my mind - a system prompt that specifies a specific task to achieve and not a response style (which is nice for entertainment purposes but not much more).

Opinions?

You can use "individual" personas for different use cases; for example, you could have a persona that "judges" your code solely from the perspective of cybersecurity and spots potential flaws and vulnerabilities in your code snippets. You could have one that helps you understand complex concepts that are new to you and maybe help you break them down into pieces and explain them in simple words (without using the domain-specific jargon). You could have a persona that helps you build abstractions, for the different problems you tackle in programming, etc.

I think of personas as tools.. in a toolbox... you craft the tool for the specific thing you want to tackle and when you need it, you just bring it on and use it :D (ofc, this is an ongoing improvement and refinement process)

(I mentioned this on discord already, and here again in case you don't see it) - Wow, I am surprised that this was not implemented yet. This is such a nobrainer. Many other clients support this feature. Having to manually copy and paste prompts is way too slow for serious users. I am sure many users do not use big-agi just for this missing feature alone. I would love to use big-agi myself, I like it a lot, but this one feature is really essential. Please add it :) !

I like it a lot, but this one feature is really essential. Please add it :) !

What's a good reference implementation in another client? To see which shape of the feature better conforms to your needs.

Sure, no problem. This one is quite good app.nextchat.dev, it's ability to adjust so many things by creating and changing masks is quite remarkable (https://app.nextchat.dev/#/masks).

But to be honest, just to be able to enter prompts via / within the chat box would be more than enough for over 95% of use cases, I am sure (Example client that does this is https://chatkit.app/).

So as long as there is the ability to quickly select a prompt via (preferably) keyboard (for example using /my-prompt within the chatbox), almost everything should be quite good enough.

@DasOhmoff got it. For you it's more important to get a system prompt (the current "persona", and the most important part of GPTs) or a user prompt? They're very different in implementation and want to make sure before spending a week on it

The system prompt is probably more important :)