Generative AI & LLMs
N-gram
A set number of items in a row, such as three consecutive words.
Example
The phrase 'customer service team' contains the word bigrams 'customer service' and 'service team'.
Why people use it
It captures short word patterns that can help compare or predict text.
What you'll hear
“Look for common pairs of words.”
What this means for you
Use n-grams where local patterns are useful and recognize their limits.
Can you control it?
Developer-only
The people building or running the AI choose this setup. An everyday user generally needs their help to change how this part works.
Common questions
- Does an n-gram represent the full meaning of a sentence?
- No. It captures a local sequence, not all background information.
- Can n-grams contain characters instead of words?
- Yes. The pieces can be characters, words or another chosen unit.
- Does a larger n always work better?
- No. Longer sequences can be more specific but may appear too rarely to be useful.