Prompt

Generate Persona-Driven Content Summaries

Persona Hub Prompts from CAMEL-AI provides system prompts that define assistant behavior and role characteristics for conversational AI applications.


52
Spark score
out of 100
Updated 7 days ago
Version 0.2.90

Add to Favorites

Why it matters

Leverage AI personas to generate insightful summaries of information, tailored to specific audience needs and research objectives.

Outcomes

What it gets done

01

Define and utilize AI personas for targeted information processing.

02

Summarize web content and other data sources.

03

Adapt summaries based on persona characteristics and research goals.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/camel-prompt-personahub | bash

Use cases

What you can do with it

Summarize

Condenses long documents or threads into key takeaways.

Search the web

Searches the web and retrieves relevant sources.

RAG index

Chunks, embeds, and indexes documents for semantic retrieval.

Overview

Persona Hub Prompts

What it does

Persona Hub Prompts is a collection of system and role prompts from the CAMEL-AI framework that define how AI assistants behave in conversations. These prompts establish personality, expertise, communication style, and behavioral boundaries for conversational agents, enabling developers to create consistent role-specific interactions.

How it connects

Use these prompts when building conversational AI applications that require specific assistant roles or personalities, such as technical support agents, domain experts, or specialized assistants. They're particularly valuable for multi-agent systems where different agents need distinct, reproducible personas.

Source code

from typing import Any

from camel.prompts.base import TextPrompt, TextPromptDict

class PersonaHubPrompt(TextPromptDict):
r"""A dictionary containing :obj:TextPrompt used for generating and
relating personas based on given text or existing personas.

This class inherits from TextPromptDict, allowing for easy access and
management of the prompts.

Attributes:
    TEXT_TO_PERSONA (TextPrompt): A prompt for inferring a persona from a
        given text. This prompt asks to identify who is likely to interact
        with the provided text in various ways (read, write, like,
        dislike). The response should follow a specific template format.

    PERSONA_TO_PERSONA (TextPrompt): A prompt for deriving related personas
        based on a given persona. This prompt asks to describe personas who
        might have a close relationship with the provided persona. The
        response should follow a specific template format, allowing for
        multiple related personas.
"""

TEXT_TO_PERSONA = TextPrompt("""

Who is likely to {action} the following text? Provide a detailed and specific persona description.

Text: {text}
""") # noqa: E501

PERSONA_TO_PERSONA = TextPrompt("""

Given the following persona:
{persona_name}
{persona_description}

Who is likely to be in a close relationship with this persona? Describe the related personas and their relationships.
""") # noqa: E501

def __init__(self, *args: Any, **kwargs: Any) -> None:
    super().__init__(*args, **kwargs)
    self.update(
        {
            "text_to_persona": self.TEXT_TO_PERSONA,
            "persona_to_persona": self.PERSONA_TO_PERSONA,
        }
    )

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.