Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT SWIFT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING HTML & CSS BASH RUST

AWS Amazon AI21 Labs Jurassic-2


AI21 Labs Jurassic-2

Jurassic-2 models work well with text summarization, text generation, and question-answering tasks. If you need a response to reflect a certain number of sentences, be sure to include that request in your prompt.

Jurassic-2 models work well with zero-shot and few-shot prompts. Try both methods to decide which technique performs better for your specific scenario.

Review the following best practices for using the Jurassic-2 model.


Specify output length

Specify an approximate number of words, paragraphs, or items for your output. For example:

U
Generate a list of reasons why customers should have a medicine ball at home using the following data in two sentences:

A weighted medicine ball can be used for upper, lower, and full body exercises. The ball has a lightly textured surface and provides a superior grip. The ball's weight is clearly labeled on both sides of the ball. A medicine ball is ideal for classic workouts, including ball tosses, weighted twists, squats, sit-ups, and more. It is a personal tool to help you develop core strength, balance, and coordination.
AI
A medicine ball is a versatile piece of equipment that can be used for a variety of exercises, including upper, lower, and full body exercises. The ball has a lightly textured surface that provides a good grip, and the weight is clearly labeled on both sides.

Avoid ambiguity

Include a short but detailed description of the task. With AI21 Instruct models, you can follow instructions. Keep your instructions clear and concise. Jurassic-2 models work well for complex tasks, but clear instructions are necessary for effective results.

You need to provide instructions on what the model should do if it can't find the answer using the documentation you provided. Otherwise, the model will try to generate an answer that is not based on the provided documentation.

U
In a given week, the viewers for a TV channel were as follows:
Monday: 5,600 viewers
Tuesday: 6,400 viewers
Wednesday: 6,100 viewers
Thursday: 5,200 viewers
Friday: 6,100 viewers
Saturday: unknown
Sunday: unknown

Question: How many viewers can we expect on Saturday and Sunday next week?

Answer: Based on the pattern, analyze and estimate the future number of viewers for Saturday and Sunday. If the estimation cannot be made with the data, write that clearly, without guessing.
AI
Based on the numbers given, add without any more information that Friday's viewers = 6,100 viewers, and Saturdays viewers = Friday's viewers - 100 viewers = 6,000 viewers. Sunday's viewers = Saturday's viewers + 100 viewers = 6,100 viewers.

So on the next week, we can expect around 6,000 viewers on Saturday and 6,100 viewers on Sunday.
U
Friday's viewers = 6,100 viewers
Saturday's viewers = Friday's viewers - 100 viewers
Sunday's viewers = Saturday's viewers + 100 viewers

Question: How many viewers will there be on Saturday?
AI
Friday's viewers = 6,100 viewers
Saturday's viewers = 6,000 viewers
U
Monday's viewers = 5,600 viewers
Tuesday's viewers = 6,400 viewers
Wednesday's viewers = 6,100 viewers
Thursday's viewers = 5,200 viewers
Friday's viewers = 6,100 viewers
Saturday's viewers = unknown
Sunday's viewers = unknown

Question: Estimate Saturday's and Sunday's viewers using the pattern above.
AI
Friday's viewers = 6,100 viewers
Saturday's viewers = 6,000 viewers
Sunday's viewers = 6,100 viewers
U
Based on the information, what can we expect for the viewers on Saturday and Sunday?
AI
Given the information, we can expect 6,000 viewers on Saturday and 6,100 viewers on Sunday.

Include additional context or instructions

You can introduce additional instructions by using the term 'Instruction:'. If you have more than one section in your prompt, separate the different parts with a new line. The following is an example.

U
Instruction:
Summarize the text below in five sentences as bullet points. Style should be appropriate for a high-school student.

{example_text}

The text is about:

Avoid negative formulations

Avoid using phrases that suggest a negative range, such as "No more than five sentences." Instead, identify the target response. The following is an example.

U
Instruction:

Generate a list of reasons why customers should have a medicine ball at home using the following data in two sentences.

A weighted medicine ball can be used for upper, lower, and full body exercises. The ball has a lightly textured surface and provides a superior grip. The ball's weight is clearly labeled on both sides of the ball. A medicine ball is ideal for classic workouts, including ball tosses, weighted twists, squats, sit-ups, and more. It is a personal tool to help you develop core strength, balance, and coordination.
AI
A medicine ball is a versatile piece of equipment that can be used for a variety of exercises, including upper, lower, and full body exercises. The ball has a lightly textured surface that provides a good grip, and the weight is clearly labeled on both sides.

Switch the order of instructions for long documents

If your document is long, try changing the order of your prompt instructions. Provide the data first, then provide the instructions. Finally, provide the output indicator. The following example shows this approach.

U
Create only five questions and answers based on the following information:

2023.12.9 Release Notes

Autopilot features
Your vehicle is now equipped with Traffic-Aware Cruise Control, Autosteer (Beta), and Navigate on Autopilot (Beta). Go to Controls > Autopilot to turn on and turn off Autopilot features and customize your preferences. Remember to keep your hands on the wheel and be attentive at all times.

Stopping mode
Stopping mode is now set to Creep by default after performing a factory reset.

When stopping mode is set to Creep, your car continues to move slowly forward (in drive) or backwards (in reverse) when close to a complete stop. To change the stopping mode, go to Controls > Pedals and Steering > Stopping Mode.

Refresh your data sharing settings
Turn on or turn off data sharing and learn more about how AnyCompany uses information to improve its driving safety and convenience features and create new ones. Go to Controls > Software > Data Sharing. For more information about how we use your data, go to example.com.

Support for other languages – AI21 Models work well with other languages, such as Spanish.

Techniques – AI21 models seem to work well with zero-shot and few-shot. Try both to decide which performs better based on your use case scenario.

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.