By elijah otor On 28-09-2025 at 10:15 pm
What are Tokens
Tokens are the basic units that make up the input prompts for AI systems.
Tokens can be words, characters, or numbers that make up the prompt text given to the AI.
For example, the prompt "Write a poem about a cat" contains 6 tokens - each word is a token.
Tokens provide the fundamental meaning and structure for prompts. The choice of tokens impacts how the AI understands the prompt.
The number of tokens in a prompt is referred to as the Token Length. Longer prompts tend to have more tokens.
Tokens can also be whole sentences, images, audio samples, snippets of code - anything that provides contextual meaning.
For text prompts, the vocabulary and language used in the tokens matter significantly.
Here are some tips to identify tokens and examples:
Break down the prompt into distinct meaningful units. These basic units are the tokens.
For text prompts, each word is usually a separate token. Punctuation can also be separate tokens.
For example, the prompt "Describe a large blue and green parrot with a red beak" contains 11 tokens - each word is a token.
Numeric values are also separate tokens, like "A painting measuring 2 ft X 3 ft".
Named entities like people's names are single tokens - "Michael Jackson" has 2 tokens.
Importance of the punctuation sign
Punctuation plays an important role in prompting AI systems as it provides useful context and structure for the desired output. Here are some key ways that punctuation matters when crafting prompts:
Periods (.) indicate sentence boundaries. Putting periods tells the AI to structure the output into distinct sentences.
For example:
"Generate a recipe for pancakes. Use clear step-by-step instructions. Explain each step in detail."
Commas (,) provide separation which adds clarity. They also link related concepts.
For example:
"Write a poem about love, loss, and healing."
Question marks (?) frame the prompt as a question the AI needs to answer.
For example:
"What is the capital city of Nigeria?"
Exclamation points (!) convey excitement and emphasize commands.
For example:
"Describe the most thrilling rollercoaster ride imaginable!"
Quotation marks (“”) indicate direct speech that the AI needs to mimic.
For example:
"The sign said, 'Keep out'"
Colons (:) set up an explanation to follow.
For example:
"The recipe steps are: first mix the ingredients, then cook at 350°F for 20 minutes."
Semicolons (;) join two independent clauses.
For example:
"Some people like cats; others are dog lovers."
Dashes (–) set apart an amplifying or clarifying clause.
For example:
"The cake–chocolate frosted with cherries–looked amazing."
So in summary, paying attention to punctuation helps construct clear, coherent prompts that steer the AI response effectively.
Parentheses () enclose supplementary information not essential to the prompt.
For example:
"Generate a birthday message for Grandma (make it sweet and heartfelt)".
Brackets [] contain details that provide context.
For example:
"Summarize the key events in [Today's Date] for a news headline".
Apostrophes (') indicate possession or contractions.
For example:
"The dog's fur was matted and dirty".
Hyphens (-) link words into a single meaning.
For example:
"Describe a state-of-the-art user interface".
Slashes (/) give options for the AI to choose from.
For example:
"Should I wear the red/blue/black dress tonight?"
Ampersands (&) join words meaning 'and'.
For example:
"Make a logo for a new cafe - Books & Bakery".
Asterisks (*) act as placeholders that can be filled by the AI.
For example:
"The password is *".
Best Practices
Be concise and specific. Keep prompts focused and to the point. Avoid overly long or vague prompts.
Use natural language. Engage with AI models conversationally using everyday language instead of technical terms or commands.
Avoid ambiguity. Clearly specify the task or response desired so the AI understands without uncertainty.
One task at a time. Address a single query or generation request per prompt. Multiple or complex tasks may confuse the AI model.
Author
Share on:
Related posts
28-09-2025
What are Tokens