Comprehensive Guide: Gen AI &
Agentic AI Systems
This document provides a detailed breakdown of fundamental concepts in Generative AI,
designed for professional assessment preparation.
1. AI Foundations & The Transformer Architecture
The shift from traditional ML to Gen AI is defined by the Transformer architecture. Unlike
RNNs that process sequences linearly, Transformers use 'Self-Attention' to weigh the
significance of all words in a sentence simultaneously. This parallelism enables the massive
scale of models like GPT-4.
Key Concepts:
- Parameters: The learned weights that define model 'intelligence'.
- Context Window: The limit on how much text a model can process at once.
- Tokens: The basic units of text processed by LLMs (usually sub-word fragments).
2. Core Generative AI Mechanics
Generative AI operates on probability. LLMs predict the most likely 'next token'.
- Foundation Models: Large-scale models pre-trained on diverse, massive datasets.
- Transfer Learning: Adapting a pre-trained model for specific tasks.
- Hallucinations: Occur when the model prioritizes probability over factual accuracy.
Mitigation strategies include grounded prompting and RAG.
3. Python for AI Integration
Integration requires moving from prompt-chatting to programmatic LLM orchestration.
- LangChain/LlamaIndex: Frameworks that allow LLMs to interact with external data
sources and memory.
- Embeddings & Vector Stores: Data is converted into high-dimensional numerical vectors
(embeddings) and stored in databases like Pinecone or ChromaDB. This is the foundation of
semantic search.
- API Parameters:
- Temperature (0.0–1.0): Controls determinism.
- Top_p (Nucleus Sampling): Limits the pool of tokens to consider.
- Max_tokens: Controls the length of the response.
4. Prompt Engineering: The OCEAN Framework
OCEAN is a systematic approach to prompt design:
- Objective: Start with a strong verb and clear goal.
- Context: Define the persona and background.
- Examples: Provide 3-5 high-quality examples (Few-Shot).
- Attributes: Define tone, format, and structure.
- Negative Constraints: Clearly state what the AI should avoid.
5. Agentic AI & Reasoning Engines
Agents are LLMs capable of taking action. They transition from 'Chatbots' to 'Workflows'.
- The ReAct Pattern: Reasoning + Acting. The model generates a 'Thought' about what it
needs to do, selects an 'Action', performs it, and interprets the 'Observation'.
- Tool Calling: Enabling the model to trigger external functions (APIs, calculators, Python
code execution).
- Self-Reflection: Agents can be prompted to critique their own output before finalizing it.
6. Strategic Assessment Tips
For your assessment, prioritize the following:
- RAG vs. Fine-tuning: Understand that RAG is for 'current/private data' and Fine-tuning is
for 'behavior/style'.
- Chain-of-Thought (CoT): Use this for logic-heavy, mathematical, or multi-step reasoning
problems.
- Evaluation Metrics: Research BLEU, ROUGE, and human-in-the-loop evaluation for
generative tasks.