How to I get more context?

Hello, Everyone
I am newbie in openai and I am using first time this.
My question is how to I get more context?
This is my playground

and then code is

response = openai.Completion.create(
  model="text-davinci-002",
  prompt="What is vue.js?",
  temperature=0.51,
  max_tokens=4000,
  top_p=1,
  frequency_penalty=0,
  presence_penalty=0
)

but result is only 247 tokens. How can I get more context?
Please help me.

1 Like

Hello, I’m relatively new as well.
Do you need a longer answer? Add brackets on the end and add a keyword like (Detailed Explanation) or something similar

Do you need very long answer? If so you need to take the answer and prompt for more questions that aren’t answered in the text and then prompt for more answers to the generated questions. I’m not sure how to do that in one prompt

1 Like

Thanks for reply
I followed your advice. but still answer is no long yet.
My prompt:

What is vue.js? {"explain details"}

I want to get 1000~1500 tokens

I tested this one and it made 10 questions and answers but not sure if this is good enough as questions dilute the output. This gave 430 tokens so 20-30 questions will make 1000+.

The trick I tried to use here is to ask it to create unrelated questions to answer then it has to keep going.

Prompt Below:

As a teacher please create 10 questions and answers that help to understand: what is vue.js?

  1. What is Vue.js?
    Answer:

Try this:

Explain what is Vue.js in 300 words?

Yes, I tried following your word.
But at this time, token amount is 141. but I set 4000 as max token.
Maybe it connected Usage limit?

how about you think about Usage limit?
Does it correct way which I set?
Warm regards

The token limit is just the maximum tokens it can generage before it is forced to stop. To get it to generage longer text you will need to adjust your prompt. If you are using this just in playground, you could adjust the end of a completion slightly in an attempt to get gpt-3 to generage more text.

Hello, @SecMovPuz
Thanks for reply.
Could you tell me way to increase the token?

If you are using this just in playground, you could adjust the end of a completion slightly in an attempt to get gpt-3 to generage more text.

Please give me any tips.
Warm regards

It would be a nice feature but there is no slider to make it generage more tokens. You will need to experiment with it. You could try adding words like “in great detail” or “in 500 tokens.”

Like i mentioned in my previous post, you can also adjust the output to make it continue generating more text.

the prompt:

Blockquote Write an essay about what vue.js is?
Generates:
Blockquote Vue.js is a JavaScript framework that enables developers to create user interfaces and single-page applications. It is a lightweight framework that provides the necessary tools for developers to create scalable applications. Vue.js is a popular choice for developers because it is easy to learn and can be used to create applications that are both fast and responsive.

You could edit the last sentence like this:

Blockquote Vue.js is a popular choice for developers because it is easy to learn and can be used to create applications that are both fast and responsive, making
to make it continue generating text.

Hello again, if you are still looking for a solution you can try insert the minimum tokens into the OpenAI API request and pray it works

Maybe send this as feedback through OpenAIs help section.

In the meantime, AI21 Studio allows you to specify minimum tokens in their API request - Generating Text via the API - AI21 Studio Docs (Can use free credits to check if you need this functionality or not)

Don’t see anything wrong with the code itself here, usually it won’t produce long answers by default unless instructed to.

Try adding a few example questions before it with long answers to guide it into writing more text.