Welcome to Portkey Forum

Updated 7 months ago

unable to cap 30 words

Hi All - curious if anyone has any thoughts/feedback. I am creating a simple prompt to ask Perplexity to generate a concise summary of an online article in 30 words or less. However, while it provides a summary it does not stay within 30 words or less. Any ideas on how to ensure it meets this 30 words or less requirement?
S
b
9 comments
Can you share the Prompt that you used? You can ignore the link to article.

(Try?) Is there a way to cap the approximate max_tokens for 30 woods?
Thank you for responding! This is the prompt in the System section: You are an AI assistant skilled at concise summarization. Your task is to read the given article and provide a clear, accurate summary capturing the main points and key information in 30 words or less. Please put your response in a paragraph format.
In the User section, I have a variable {{link}}
I am using the pplx-7b-online model FYI
I tried playing around with changing the system and user prompts for a while (see the guide I used), and changing other parameters. The best answer is to limit by max_tokens incase that's very important to your usecase - even with the best system prompts: I saw response end abruptly.
Attachment
image.png
Thank you so much. I will review this in more detail! I noticed the adjusting the tokens does work but yeah it cuts it off. I think there is a disconnect between the API functionality vs web-based version
one thing I noticed on perplexity docs - see at the bottom of this page - https://docs.perplexity.ai/docs/model-cards. "It is recommended to use only single-turn conversations and avoid system prompts for the online LLMs " So there is an issue with adding to the system prompt
It appears that "online" LLMs should be dealt with differently. ๐Ÿ˜ฎ
Yes I am finding out! I reached out to perplexity to see if I can let them know the issue too
Add a reply
Sign up and join the conversation on Discord