#summaries

84 messages · Page 1 of 1 (latest)

solemn torrent
#

Do you see anything that I could improve here? maybe something that I wrote that is not needed that might confuse it

#

looks like this works tough

marble root
#

I would use ai over tool, and not use the word provide, and have the summaries be numbered but otherwise yeah it looks good and if it works, right on. my initial thought was the text you were having it summarize was actually overwhelming it but guess you got it

solemn torrent
#

one problem I'm having is that sometimes it returns a value with non escaped " and then I caan't convert it into json

marble root
#

yeah I could see that. try 'you will' provide or 'you must generate'

some people say, if you really want chatgpt to follow something putt words like must and at least etc in all caps but I can't verify that myself

solemn torrent
#

i'll try now

#

can't really get it now to make the escaping so idk if it works or not

indigo badger
#

Like someone else said, it can't really add a specific number of sentences based on a numbered request. you could make it even more structured to call out each sentence request but this could get pretty big:

Act as an extremely efficient tool that is used to summarize text.
Your task is to summarize the text into 4 summaries.
The summaries must be in the range given, not more and not less.

Provide them in valid JSON format with escaping if needed:

{'{'}
very_short: {sentence 1}{sentence 2},
short: {sentence 1}{sentence 2}{sentence 3}{sentence 4},
medium: {sentence 1}....(add the rest in here.....,
regular: {sentence 1}....(add the rest in here.....
{'}'}

Text:
{text}
"""```
#

i didn't verify if this works but this format might be worth a try

solemn torrent
#

but sometimes it seems like it doesnt even style the json values

#

it happens when I try things like this:

in MapleStory, the immersive world of magic, monsters, and epic quests. Let your imagination soar with warriors, magicians, archers, and ancient treasures
indigo badger
#

are you using 3.5 or 4? The prompt would need to be much clearer than this if using 3.5

solemn torrent
#

I'm trying to make it write the text in the theme im giving it

#

3.5

#

I dont have 4

indigo badger
#

yeah, thats a big task for 3.5. it's not good at creating structure like that

solemn torrent
#

yea, somtimes it fails

#

how can I rewrite my prompt to make it work?

indigo badger
#

you can try using my same suggestion as before and build out the JSON structure in the prompt and have it fill in the brackets

solemn torrent
#

i'm having a problem with the text not changing, the structure stays the same all the time

#

like the style not changing I mean

#

and if it does change, it's a minor change

indigo badger
solemn torrent
#

but when it wworks it's good, so the potential is there i just can't figure out a better prompt

#

already in json

#

it's the json from the output for what I did earlier

#

it's already like this:

{
very_short: text,
short: text,
medium: text,
regular: text
}
indigo badger
#

So you're trying to have it rewrite the stories in plain text based on each sentence length output right?

#

If so I'm surprised thats not working

solemn torrent
indigo badger
#

sometimes using coding structure isn't the best for 3.5 and the request needs to be clearly called out. Like reword the request to utilize the style.

#

try natural language request

solemn torrent
solemn torrent
#

This is an example for what I want to get

indigo badger
#

I would just say make the request to update based on the style more clear. Looks like that's the part it's not understanding.

solemn torrent
#

summaries

gleaming ridge
#

This works for me:

Create 3 summary with different lenghts from the text between ### stricly following the instructions below.

Instructions:
1 - Output must be in JSON;
2 - Respect the JSON schema:
{
"short" : <between 1 to 2 sentences>
"medium" : <between 3 to 4 sentences>
"long" : <between 4 to 6 sentences>
}

###
Britain’s Charles III was crowned king on Saturday, during an eighth-century ritual in a 21st-century metropolis with a handful of concessions to the modern age but the unabashed pageantry of a fairy tale, unseen since the coronation of Queen Elizabeth II, his mother, in 1953.
“I come not to be served, but to serve,” Charles said in his first remarks of the ceremony, setting the theme for the intimate yet grand proceedings. The king, 74, was anointed with holy oil, symbolizing the sacred nature of his rule. He was vested with an imperial mantle, and the archbishop of Canterbury placed the ancient crown of St. Edward onto his head.
After the service, Charles and his wife, the newly crowned Queen Camilla, are returning to Buckingham Palace in a golden stagecoach used by Elizabeth for her coronation procession.
###
#
[me] How many sentences "short", "medium" and "long" have?

[gpt-3.5] The "short" summary has 1 sentence, the "medium" summary has 3 sentences, and the "long" summary has 5 sentences.
solemn torrent
solemn torrent
gleaming ridge
solemn torrent
#

I want to input a JSON with the summaries

#

And output the same json format but with the values in each as the style I’ll give

#

So if the original value says “there was a fight between Russia and USA” and the style is Disney, it will output “Once upon a time there were two kingdoms… etc”

gleaming ridge
#

Have you tried "Use a Walt Disney style for the rewritten text."?

solemn torrent
#

Did you see my promot?

#

It’s too long for discord so it’s in the txt file

solemn torrent
#

And also the style

gleaming ridge
#

Your style may not have enough high-quality data to be used as reference for the LLM.

solemn torrent
#

I try to be informative what it means to write in Disney style

#

But I think the problem is the prompt and not the style

gleaming ridge
#

@solemn torrent I'm not completely sure the LLM will be capable to reword and adapt to your style with just one example.

solemn torrent
#

I’m not giving it an example even, maybe that’s the problem?

#

Is this a hard task?

#

Too hard

#

Because sometimes it works

#

But not always and that’s my issue

gleaming ridge
#

The JSON containing the "Sudan army" topic is not an example for the LLM?

#

Anyway, I did something like this here:

Create 4 summary with different lenghts from the text between ### stricly following the instructions below.

Instructions:
1 - Output must be in JSON;
2 - Respect the JSON schema:
{
"very_short" : <between 1 to 2 sentences>,
"short" : <between 3 to 4 sentences>,
"medium" : <between 5 to 8 sentences>,
"regular": <between 9 to 13 sentences>
}
3 - Respect the writting style and rewording from the example below between $$$ summarized from the text between %%%.
$$$
<json-output>
$$$

%%%
<json-input>
%%%

###
<text-to-be-summarized>
###
#

I'm testing with GPT-4 btw.

solemn torrent
#

Thanks

solemn torrent
#

Now I have the JSON

#

And I want to transform the text inside each key to a different style

gleaming ridge
#

So, you want to reword a text that was summarized. Have you tried to ask GPT to write the summarized text already using the style you want?

solemn torrent
#

so i have this:

{
very_short: text,
short: text,
medium: text,
regular: text
}
#

and now my prompt is this:

prompt = f"""
    Rewrite the value for each key in the JSON as if it was told {style}.
    Provide the output in the same format as the input JSON object with the same keys.
    
    JSON:
    {json_summaries}
    """
#

style is for example this:

as a magical Disney movie for kids, full of adventure, bravery, and a touch of magic. Keep the vocabulary simple and accessible for young audiences
solemn torrent
#

also note i'm using 0.5 temperature

gleaming ridge
#
Rewrite the values from the properties of the JSON between ### following the instructions below.

Instructions:
1 - Adopt the writing style as a magical Disney movie for kids, full of adventure, bravery, and a touch of magic. Keep the vocabulary simple and accessible for young audiences.
2- Output must be in JSON;
3 - Respect the JSON schema:
{
"very_short" : <between 1 to 2 sentences>,
"short" : <between 3 to 4 sentences>,
"medium" : <between 5 to 8 sentences>,
"regular": <between 9 to 13 sentences>
}

###
<json-with-sudan-topic>
###

Output:

{
"very_short": "A power struggle is causing fighting in Sudan.",
"short": "Adventure is stirring in Sudan! A power struggle is causing fighting between the regular army and the paramilitary Rapid Support Forces. Sadly, over 400 civilians have already lost their lives in this conflict that began when RSF members were redeployed.",
"medium": "Come on a magical journey to Sudan, where a power struggle within the military leadership has sparked fighting between the regular army and the paramilitary Rapid Support Forces (RSF). 
...
}

GPT-3.5

solemn torrent
#

i'll try that

#

thanks

solemn torrent
#

it doesnt seem to work good with the prompt you sent

#
for style in styles:
    prompt = f"""
    Rewrite the values from the properties of the JSON between ### following the instructions below.

    Instructions:
    1 - Adopt the writing style {style}.
    2 - Output must be in JSON.
    3 - Respect the given JSON schema.

    ###
    {json_summaries}
    ###
    """
    print(style)
    response = get_completion(prompt, temperature=0.5)
    print(response)
#

nothing is being styled in the text

gleaming ridge
#

Where is the JSON schema?

#

You removed it form the prompt.

solemn torrent
#

Because it’s not the problem, the problem is the styling not outputting

gleaming ridge
# solemn torrent Because it’s not the problem, the problem is the styling not outputting

Text is empty because the temperature is not high enough or you are limiting the # of tokens.
In my case it worked fine. The output you can see below 🔻 :

{
    "id": "cmpl-xxx",
    "object": "text_completion",
    "created": 1683397097,
    "model": "text-davinci-003",
    "choices": [
        {
            "text": "\n\\{\\n\"very_short\": \"In Sudan, a battle rages between its armies because of a great power struggle.\",\\n\"short\": \"The magical lands of Sudan are in turmoil as a power struggle rages between its heroic armies. The conflict began after the armies clashed and has led to 400 brave souls losing their lives.\",\\n\"medium\": \"A great power struggle has broken out in the magical land of Sudan between its heroic armies. The battle began on April 15th when the two heroic troops were moved closer to each other and their differences erupted, disagreeing about how the Kingdom should be ruled. The two sides argued about whether 100,000 strong forces should in the army and who should lead them. Unfortunately, these brave warriors were also accused of causing great damage, like the massacre of over 120 protesters. These epic battles have resulted in 400 heroes losing their lives, despite many attempts to stop. The country’s leaders and brave knights from around the world have come together in an attempt to bring peace.\",\\n\"regular\": \"A great power struggle has broken out in the magical land of Sudan between its heroic armies. The battle began on April 15th when the two heroic troops were moved closer to each other and their differences erupted, disagreeing about how the Kingdom should be ruled. Both sides have starkly different visions of the country's future, particularly concerning plans to include the 100,000-strong Rapid Support Forces (RSF) in the army and who should lead them. 
...