Main Concept

BERT is a Transformer-based model that reads text in both directions (left-to-right and right-to-left) simultaneously. Unlike GPT which generates text, BERT is designed for understanding and analyzing text.

Key Differences from GPT

BERTGPT
DirectionBidirectionalUnidirectional (left-to-right)
PurposeUnderstanding textGenerating text
Use caseClassification, NER, similarityTranslation, summarization, code generation

How It Works

BERT reads an entire sentence at once and considers context from both directions. This makes it better at understanding relationships between words, regardless of position.

Example: In the sentence “The bank provides loans,” BERT understands that “bank” means a financial institution because it sees the full context on both sides.

Common Uses

  • Text classification (spam detection, sentiment analysis)
  • Named Entity Recognition (NER)
  • Question answering
  • Similarity matching

AIF-C01 Context

Know that BERT and GPT are both Transformer-based, but serve different purposes: BERT understands, GPT generates. The exam may ask which one to use for a given task.