Skip to content

Generative AI & LLMs

Bag of words

Describing a piece of writing by which words appear, without preserving their full order.

Example

A prediction system represents messages by counts of selected words.

Why people use it

It offers a simple way to compare texts by the words they contain.

What you'll hear

“Count the words without keeping their full order.”

What this means for you

Consider whether the task needs background information beyond word counts.

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

Can a word's frequency matter?
Yes. Some versions count how often each word appears, rather than only recording whether it appears at all.
Can it tell 'dog bites person' from 'person bites dog'?
Not from word counts alone. Those sentences contain the same words but mean different things.
Can common words overwhelm useful ones?
They can, which is why systems often adjust which words count or how much weight they receive.

Related terms

Still have questions?

Up to 500 characters.

Ask LATHIC about AI. Relevant glossary entries may be included.

Your question, the glossary entries it matches, and a rotating pseudonymous identifier go to Microsoft Azure’s OpenAI service through Vercel AI Gateway to generate an answer. Zero retention and no training are required of the provider, and LATHIC does not save your question or answer. Privacy Notice