AI Concepts: A Plain-Language Reference
1. What is an API?
An Application Programming Interface (API) is a set of rules that allows two software programs to talk to each other.
Think of it like a waiter in a restaurant. You (one program) tell the waiter (the API) what you want. The waiter goes to the kitchen (another program), gets what you asked for, and brings it back to you. You never go into the kitchen directly. The waiter handles all communication between you and the kitchen.
What it does: An API lets one program use the features or data of another program without needing to know how that other program works internally.
Why it is used: It saves time. Instead of building every feature from scratch, a developer can use an API to access something that already exists — like weather data, payment processing, or maps.
Real-life example: When you log into an app using your Google account, that app is using Google's API. The app asks Google to confirm your identity. Google responds. The app never sees your Google password.
Limitation: APIs only allow access to what the other program's creator has made available. You cannot use an API to access features that were not intentionally shared.
2. What is RAG?
RAG stands for Retrieval-Augmented Generation. Each word matters:
- Retrieval means searching for relevant information from a stored source.
- Augmented means adding that retrieved information to something.
- Generation means producing a response using a language model (an AI that produces human-like text).
A language model is a type of AI trained on large amounts of text. It can answer questions, write text, and summarize information. However, it only knows what it was trained on. It cannot access new or private information on its own.
RAG solves this limitation. Before the language model answers a question, a retrieval system searches through a specific collection of documents and finds the most relevant pieces. Those pieces are then given to the language model along with the question. The model uses both to produce an answer.
Analogy: Imagine you are an expert writer, but you are writing a report about a company. You do not know that company's internal records. Before writing, your assistant searches through the company's files and hands you the relevant pages. You then write the report using those pages. That is RAG.
What it is used for: Answering questions using specific, up-to-date, or private documents that the AI was not originally trained on.
Limitation: RAG is only as accurate as the documents it retrieves from. If the documents contain errors or are incomplete, the answers may also be incorrect.
3. What is the Difference Between RAG, Agentic AI, and Machine Learning?
These are three distinct concepts. They are related but not the same.
Machine Learning (ML)
Machine Learning is a method of training a computer program by giving it large amounts of examples. The program finds patterns in those examples and uses those patterns to make predictions or generate responses.
Example: A spam filter that has seen thousands of spam emails learns what spam looks like. It then uses that pattern to identify new spam.
Machine Learning is the foundation. RAG and Agentic AI are both built on top of ML systems.
RAG (Retrieval-Augmented Generation)
RAG is a specific technique. It takes an already-trained language model and gives it the ability to search through a document collection before answering. The model itself does not change or learn new information. It simply retrieves relevant text and uses it temporarily.
RAG does not train a new model. It extends an existing model's usefulness by connecting it to a search system.
Agentic AI
Agentic AI refers to an AI system that can take actions, make decisions across multiple steps, and use tools to complete a goal — without requiring a human to guide each step.
Example: An Agentic AI given the task "Book a flight and hotel for a trip to Delhi next Friday" would search for flights, compare prices, check hotel availability, and complete the booking — step by step, on its own.
RAG retrieves and responds. Agentic AI plans, acts, and adapts.
Summary comparison:
| Concept | What it does | Acts on its own? | Uses documents? |
|---|---|---|---|
| Machine Learning | Learns patterns from data | No | During training only |
| RAG | Retrieves documents, then responds | No | Yes, at query time |
| Agentic AI | Plans and takes multi-step actions | Yes | Can use many tools |
4. Where Can a Student Use RAG?
The following are situations where RAG is directly applicable for a student.
Studying from textbooks or lecture notes A student can load their course material into a RAG system and ask specific questions. The system retrieves the relevant section and generates a clear answer based on the actual content of the notes.
Research paper assistance A student working on a paper can load a collection of academic papers into a RAG system and ask it to find what different authors say about a specific topic. The system retrieves and summarizes only from those papers.
Exam preparation Past exam papers or a study guide can be stored in the RAG system. The student can ask practice questions and receive answers derived from those materials.
Understanding long documents Legal documents, government reports, or lengthy reading assignments can be loaded into a RAG system. Instead of reading everything, the student asks specific questions and receives targeted answers.
Language learning A student learning a new language can store grammar rules, vocabulary lists, and example sentences. The system retrieves relevant rules when the student asks about a specific grammar point.
Limitation: RAG answers are only as reliable as the documents provided. If the student's notes contain errors, the answers may reflect those errors.
5. How Does RAG Work Behind the Scenes? (Non-Technical Explanation)
This is the step-by-step process, explained without technical jargon.
Step 1: Documents are prepared and stored
Before anything else, a collection of documents is loaded into the system. These could be textbooks, company reports, or research papers. The system processes these documents and stores them in a special type of organized storage (explained in question 7).
Step 2: A user asks a question
A person types a question into the system. For example: "What causes inflation?"
Step 3: The system searches for relevant content
The question is not sent directly to the AI. First, a search system looks through all the stored documents and finds the sections most relevant to the question. This is similar to a search engine finding relevant web pages, except it is searching through your specific documents.
Step 4: Relevant sections are collected
The system collects the top few most relevant passages from the documents. These might be a few paragraphs from different parts of the collection.
Step 5: The AI receives both the question and the retrieved content
The language model receives the original question plus the retrieved passages together. It is told: "Use only this retrieved content to answer the question."
Step 6: The AI generates an answer
The language model reads the question and the provided passages, then writes a response. It uses the retrieved content as its primary source, not just its general training.
Step 7: The answer is shown to the user
The user sees a response that is grounded in the specific documents they provided.
Analogy: You ask a librarian a question. The librarian goes to the shelves, finds the most relevant books, opens them to the right pages, and hands them to a reading assistant. The assistant reads those pages and gives you a summary answer. The librarian is the retrieval system. The assistant is the language model.
6. What is a Database?
A database is an organized collection of information stored on a computer so it can be searched, retrieved, and updated efficiently.
Analogy: A library is a database. Books are the data. The cataloguing system (organized by author, title, subject) allows you to find specific books quickly. Without that organization, finding one book among millions would be impractical.
Why it is used: Storing information in an organized structure allows a computer to find specific records very fast, even when there are millions of records.
How it works: Data is stored in a structured format. In a standard database, this is usually a table — rows and columns, similar to a spreadsheet. Each row is one record. Each column is one type of information.
Example: A student database might have columns for Name, Age, and Grade. Each row is one student.
Where it is used: Databases are used in almost every digital system — bank accounts, hospital records, e-commerce platforms, social media platforms, and educational institutions.
Limitation: A standard database works well when the information is structured and predictable (names, numbers, dates). It is less suited to handling complex, unstructured information like the meaning of sentences or the content of paragraphs.
7. How Does RAG Store Data in Its Memory? What is a Vector Database? (Non-Technical Explanation)
First: RAG does not have permanent memory
RAG does not "remember" in the way a human does. When documents are loaded into a RAG system, they are processed and stored in a special database. When a question is asked, the system searches that database. The stored documents are the closest thing RAG has to memory.
The problem with storing text directly
Computers can search for exact words. But meaning is not always about exact words. If your document says "heart attack" and you ask about "myocardial infarction" (the medical term for the same thing), a simple word-search will fail to connect the two. RAG needs to search by meaning, not just by matching words.
What is a Vector?
A vector is a list of numbers. In the context of RAG, every piece of text — a sentence, a paragraph — is converted into a list of numbers that represents its meaning.
Analogy: Imagine describing a color using three numbers: one for how much red it contains, one for green, one for blue. RGB (255, 0, 0) is pure red. RGB (0, 0, 255) is pure blue. Colors that look similar will have similar numbers. Text works the same way. Sentences with similar meanings get similar number lists.
This conversion process is called embedding. The list of numbers is called a vector, or an embedding.
What is a Vector Database?
A vector database is a specialized storage system designed to store these number-based representations of text and search through them by similarity.
When a question is asked, the question is also converted into a vector. The vector database finds stored vectors that are mathematically close to the question's vector. Close in numbers means similar in meaning.
Is the Vector Database the Memory of RAG?
It functions like memory, but with important distinctions:
- The vector database stores all the processed documents.
- When a question is asked, the system retrieves what is most relevant.
- The system does not remember previous conversations unless they are also stored and retrieved.
- It is more accurate to call it a knowledge store than memory. It stores knowledge that can be looked up, not experiences or past interactions.
Summary: Documents are converted into numbers that represent meaning, stored in a vector database. When a question arrives, it is also converted to numbers, and the database finds the documents with the closest meaning.
8. How is a Vector Database Different from a Normal Database? (Non-Technical Explanation)
Normal Database
A normal database stores structured information in tables with rows and columns. It searches by matching exact values.
Example: A normal database can answer "Find all students whose last name is Sharma." It looks for exact matches of the word "Sharma."
It cannot answer "Find students with a name that sounds like Sharma" or "Find students whose name is similar in origin to Sharma." It only works with exact or near-exact matches.
Vector Database
A vector database stores information as lists of numbers (vectors) that represent the meaning of text. It searches by finding numbers that are mathematically close to each other.
Example: A vector database can answer "Find documents that discuss the same topic as this question" even if none of those documents contain the exact words in the question.
It searches by meaning, not by word-matching.
Side-by-side comparison:
| Feature | Normal Database | Vector Database |
|---|---|---|
| Stores | Text, numbers, dates in rows/columns | Lists of numbers representing meaning |
| Searches by | Exact or partial word match | Mathematical similarity (closeness of meaning) |
| Good for | Structured data: names, prices, dates | Unstructured data: sentences, paragraphs, concepts |
| Example query | "Find orders placed on June 12" | "Find documents about late deliveries" |
| Speed on large text | Slow without exact keywords | Fast, even without exact word matches |
Analogy:
A normal database is like a filing cabinet organized alphabetically. You can only find a file if you know exactly what label it is under.
A vector database is like a librarian who understands the subject of your question and can find related books even if they use completely different words than the ones you used.
When to use which:
- Normal database: when data is structured and searches are based on exact values (banking records, inventory, user accounts).
- Vector database: when data is text-based and searches need to be based on meaning (document search, question answering, recommendation systems).
Documentation covers: API, RAG, Agentic AI, Machine Learning, databases, vector databases, and their practical applications for students.