
Before You Build with AI: LLMs, Tokens, RAG & Agents Explained Simply
Everyone wants to build AI agents, but understanding the basics first makes everything much easier. This article explains LLMs, foundation models, tokens, prompts, embeddings, RAG, and agents through everyday examples from college notes and Netflix to coding assistants and shows where AWS services like Amazon Bedrock fit into the picture.
AI, LLMs, Tokens, RAG, Agents… What Do They Actually Mean?
If you are getting started with AI today, you will probably hear these words everywhere:
AI. ML. LLM. Tokens. Prompt Engineering. Embeddings. RAG. Agents.
And sometimes it feels like everyone understands them except you.
You open LinkedIn and someone is building a RAG application.
You open X and someone is talking about AI Agents.
Then you open Amazon Bedrock and suddenly you see Foundation Models, Knowledge Bases, Agents, Guardrails and a lot more.
And you are just sitting there thinking:
“Bro… can someone explain what all of this actually means?” 😭
I’ve been exploring AI and AWS myself, and I realized that many of these concepts are actually not that difficult.
They are just usually explained in a difficult way.
So let’s make them simple.
No complicated maths.
No research-paper language.
Just relatable examples and the things you actually need to understand before you start building AI applications.
1. AI, Machine Learning and Generative AI
Let’s start from the beginning.
We use the word AI for almost everything today.
But AI is actually a very broad term.
Think about your normal day.
You open Netflix and it recommends a movie.
You open Instagram and it decides which Reels you might like.
Google Photos recognizes your face.
Gmail detects spam emails.
ChatGPT generates an answer for you.
All of these can involve AI.
But they are not necessarily doing the same thing.
Think about it like this:
Artificial Intelligence ↓Machine Learning ↓Deep Learning ↓Generative AI
Artificial Intelligence
AI is basically the bigger idea:
Can we make computers perform tasks that normally require some form of human intelligence?
For example:
Google Maps→ Finding a good route
Netflix→ Recommending a movie
Gmail→ Detecting spam
ChatGPT→ Generating an answer
All of these are different applications of AI.
Machine Learning
Now imagine you wanted to create a spam detector.
You could manually write rules like:
IF email contains "You won $1,000,000"→ Spam
IF email contains 20 suspicious links→ Spam
But there could be thousands of combinations.
Instead, with Machine Learning, we can show the system lots of examples:
Email 1 → Spam
Email 2 → Not Spam
Email 3 → Spam
Email 4 → Not Spam
The system learns patterns from the data.
That is a simplified way to think about Machine Learning.
Generative AI
Now imagine instead of asking:
“Is this email spam?”
you ask:
“Write a polite reply to this email.”
Now we are generating something new.
That is where Generative AI comes in.
It can generate things such as:
- Text
- Images
- Code
- Audio
- Video
So ChatGPT-style systems are Generative AI.
But one thing to remember:
Not every AI system is Generative AI.
Your Netflix recommendation system doesn't need to write you a poem. 😭
2. What is a Foundation Model?
This is one of the first things you will come across when exploring services like Amazon Bedrock.
Let’s imagine you are organizing a college tech event.
You need someone who can:
- Write an email
- Create an event description
- Explain AWS
- Generate social media captions
- Help with code
- Summarize feedback
Instead of hiring six different people, imagine you had one person who had already studied a huge amount of information and could help with many different tasks.
You simply tell them what you need.
That is somewhat similar to a Foundation Model.
A Foundation Model is already trained on a huge amount of data.
We don't normally train it from zero every time we want to build an application.
Instead, we use that existing capability.
For example:
Foundation Model
↓
"Summarize this document"
↓
"Explain this AWS service"
↓
"Generate Python code"
↓
"Classify this customer feedback"
One model can potentially perform many different tasks.
And this is where Amazon Bedrock becomes useful.
Instead of worrying about:
“How do I get GPUs?”
“How do I host this massive model?”
“How do I manage the inference infrastructure?”
you can focus more on:
“What am I actually trying to build?”
That is a huge advantage for developers.
3. What is an LLM?
LLM stands for:
Large Language Model
Simple version:
An LLM is a model that is really good at working with language.
For example, you can ask it:
"Explain Amazon EC2."
"Rewrite this email professionally."
"Summarize these notes."
"Generate a Python function."
"Explain recursion like I'm 10."
"Give me interview questions."
All of those involve language.
A good relatable example is a coding assistant.
You write:
Create a REST API using Node.js
And the model generates code.
Or you paste an error and say:
Why is this failing?
And it tries to explain the problem.
That is an LLM-powered experience.
But remember:
LLM ≠ AI
An LLM is just one type of AI model.
AI is the bigger umbrella.
4. What are tokens?
This is where things start becoming interesting for developers.
Let’s say you write:
“Explain Amazon S3 in simple words.”
You might think the model reads that sentence exactly like a human does.
But internally, the text is broken into smaller units called tokens.
Very roughly:
Your Message
"Explain Amazon S3 in simple words"
↓
Tokens
↓
Model processes them
↓
Model generates output tokens
↓
You receive the answer
Now you might ask:
“Why do I care?”
Because once you start building real AI applications, token usage affects things such as:
- Cost
- Response time
- Context limits
- How much information you can send
Here is a relatable example.
Imagine you upload a 200-page textbook to an AI application.
Then every time you ask:
“What is Chapter 4 about?”
your application sends the entire 200-page book to the model.
Again.
And again.
And again.
That's probably not the smartest architecture.
More text means more tokens.
And more tokens can mean more processing and more cost.
So suddenly tokens are no longer just some random AI terminology.
They become an engineering decision.
5. Prompt Engineering
This is probably one of the most misunderstood terms.
People sometimes make prompt engineering sound like:
“Discover this secret sentence and suddenly your AI becomes 100x smarter.”
It doesn't really work like that.
For me, prompt engineering is mostly about giving:
Clear instructions + useful context + expected output format.
Imagine asking your friend:
“Tell me about AWS.”
What exactly should they tell you?
AWS has hundreds of services.
Now imagine saying:
“I have my AWS Cloud Practitioner exam tomorrow. Explain Amazon S3 to me like I’m a beginner. Give me one real-world example and three things I should remember for the exam.”
Now your friend knows exactly what you need.
AI works similarly.
Compare these two prompts.
Prompt 1
Explain S3.
The model has very little context.
Prompt 2
You are teaching AWS to a university studentwho has never used cloud computing.
Explain Amazon S3.
Use:
1. A simple definition2. One real-life analogy3. One practical AWS example4. Three important points for an exam
Keep the answer below 200 words.
Now the model knows:
- Who the audience is
- What topic to explain
- How detailed the response should be
- What format you expect
That is prompt engineering in a much more practical way.
No magic.
Just communication.
6. What are embeddings?
This word sounds scary.
It really doesn't need to be.
Imagine you have these words:
EC2
Virtual Machine
Pizza
Lambda
Serverless
S3
Object Storage
As humans, we immediately understand:
EC2 ↔ Virtual Machine
Lambda ↔ Serverless
S3 ↔ Object Storage
And:
EC2 ↔ Pizza
doesn't really make much sense. 😭
A computer needs a way to represent these relationships mathematically.
That is where embeddings come in.
Embeddings convert information into numerical representations that help machines identify similarity.
A very relatable use case is search.
Imagine your college notes contain:
“Amazon EC2 provides scalable virtual computing capacity.”
But you search:
“AWS virtual machine service”
Those aren't exactly the same words.
Traditional keyword search may struggle depending on how it is implemented.
But semantic search can understand that:
AWS virtual machine service ≈Amazon EC2
because their meanings are similar.
That is one reason embeddings become so important.
And they lead us directly to...
7. RAG
RAG stands for:
Retrieval-Augmented Generation
Another scary name for a pretty understandable idea.
Imagine tomorrow you have an exam.
You have:
5 PDFs
200 pages of notes
3 assignments
2 PPTs
Now you ask an AI:
“What topics did our professor cover in Unit 3?”
A normal model may not know.
It wasn't sitting inside your classroom. 😭
And your private notes weren't necessarily part of its training data.
So instead, we create a system like this:
Your Question
"Explain Unit 3"
↓
Search Your Notes
↓
Find Relevant Pages
↓
Give Those Pages to the LLM
↓
LLM Generates Answer
That is the basic idea behind RAG.
Another example
Imagine a company has:
Employee Handbook
Leave Policy
Security Policy
Expense Policy
Onboarding Documents
An employee asks:
“How many casual leaves do I get?”
Instead of expecting the LLM to magically know the company's policy:
Question ↓Retrieve Leave Policy ↓Find Relevant Section ↓Give Context to LLM ↓Generate Answer
That is much more useful.
On AWS, this is where something like Amazon Bedrock Knowledge Bases starts becoming relevant.
And now everything we learned earlier connects:
Documents ↓Embeddings ↓Search ↓Relevant Context ↓LLM ↓Answer
This is why I always feel understanding the concept first makes learning AWS services much easier.
8. What is an AI Agent?
And finally...
The word everyone is using right now.
Agent.
I like to explain it using a food delivery example.
Imagine you tell an LLM:
“Suggest something I can eat tonight.”
It might suggest:
Pizza.
Cool.
But it hasn't actually done anything.
Now imagine you say:
“Find me a pizza under ₹300, check if the restaurant is open, place the order and tell me when it will arrive.”
That requires much more than generating text.
The system may need to:
Understand Your Goal ↓Search Restaurants ↓Compare Prices ↓Check Availability ↓Select Option ↓Place Order ↓Return Result
That is much closer to an AI Agent.
The difference becomes clearer like this:
LLM
"Tell me what I should do."
RAG
"Tell me what I should do using this information."
Agent
"Complete this goal using the tools available to you."
Another developer example:
You say:
“Find why my application is failing.”
An agent might:
Read Logs
↓
Identify Error
↓
Check Documentation
↓
Inspect Configuration
↓
Suggest or Take Action
↓
Verify Result
Now the AI is not simply responding.
It is working toward a goal.
This is where things like Strands Agents and Amazon Bedrock AgentCore become much more interesting once you move deeper into agentic AI.
But again...
You don't need to begin your AI journey there.
So how does everything connect?
Let's put everything together.
Imagine you want to build:
“An AI assistant that helps students study from their own notes.”
You could use:
Foundation Model ↓The intelligence behind the application
LLM ↓Understands questions and generates answers
Tokens ↓How the model processes your text
Prompt ↓Instructions you give the model
Embeddings ↓Help understand similarity between notes
RAG ↓Find relevant parts of the notes
Agent ↓Could eventually take actions like:create quizzes, track progress or plan revision
Now those AI buzzwords suddenly don't feel so random.
They are just different pieces solving different problems.
Where should you start?
If you are a student or developer getting started with AI, please don't feel like your first project has to be:
“Multi-Agent Autonomous RAG System Using 17 Models and 12 Vector Databases.”
😭
Start with:
Step 1Call an LLM.
Step 2Learn prompting.
Step 3Build something using your own data.
Step 4Understand embeddings and RAG.
Step 5Add tools.
Step 6Explore agents.
Build something small.
Maybe:
- AI study assistant
- Resume helper
- Documentation chatbot
- AWS learning assistant
- Code explanation tool
- Event FAQ assistant
Then improve it.
That is how I personally like learning technology:
Learn → Build → Break → Fix → Share.
Final Thoughts
AI is moving insanely fast.
Every week there is:
A new model.
A new framework.
A new agent platform.
A new term.
And another LinkedIn post telling you:
“THIS CHANGES EVERYTHING 🚨”
😭
You don't need to chase everything.
Understand the fundamentals first.
Know what problem each piece solves.
Then when you see:
RAG
you know why it exists.
When you see:
Embeddings
you know what they help with.
When you see:
Agents
you understand why they are different from a normal chatbot.
And when you open something like Amazon Bedrock, instead of simply clicking around different services, you start understanding where every piece fits.
For me, that is the real goal.
Not just learning how to use another tool.
But understanding why we are using it.
And once the basics are clear...
Building becomes a lot more fun. 🚀
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article