Artificial Intelligence
Medium
Theory
Function calling constrains the model to a structured action request, while free-form text leaves the output unconstrained.
- Structured outputs are easier to automate
- Text is flexible but brittle
- Use schemas when code depends on it
Artificial Intelligence
Medium
Theory
RAG retrieves relevant external context and supplies it to the model at generation time.
- Retrieval before generation
- Improves freshness and grounding
- Quality depends on chunking and retrieval
Artificial Intelligence
Medium
Theory
Short-term memory is the active conversation context, while long-term memory is persisted information reused across sessions or tasks.
- Short-term lives in the current context window
- Long-term is stored externally
- Memory quality depends on retrieval and summarization
Artificial Intelligence
Medium
Theory
Single-agent systems are simpler to control, while multi-agent systems split work across specialized roles at the cost of more orchestration overhead.
- Single agent is easier to debug
- Multi-agent can separate concerns
- More agents do not automatically mean better quality
Artificial Intelligence
Medium
Theory
Evals are repeatable tests that measure whether a model or prompt setup performs well on the behaviors you care about.
- Use task-specific test cases
- Track regressions over time
- Human review may still be needed
Artificial Intelligence
Easy
Theory
Embeddings map text or other objects into dense vectors where similar meaning lands nearby.
- Dense numeric representation
- Supports similarity search
- Often pretrained
Artificial Intelligence
Easy
Theory
Guardrails are checks and controls around the model that reduce unsafe, low-quality, or out-of-policy behavior.
- Can run before or after model output
- Includes validation and policy checks
- Works with human review when needed
Artificial Intelligence
Easy
Theory
Structured outputs force the model response into a known schema such as JSON fields or typed arguments.
- Better for automation
- Reduces parsing failures
- Still validate output
Artificial Intelligence
Easy
Theory
Tokens are the chunks of text a model processes, and they drive both context window limits and usage cost.
- Not exactly words
- Context windows are token-based
- Cost often scales with token count
Artificial Intelligence
Medium
Theory
A vector database stores embeddings and performs fast nearest-neighbor similarity search over them.
- Index optimized for vectors
- Returns semantically similar items
- Often used with metadata filters
Artificial Intelligence
Medium
Theory
An AI agent is a system that uses a model plus tools, memory, and control flow to take multi-step actions toward a goal.
- Model is only one component
- Tools enable actions
- Control logic matters for reliability
Artificial Intelligence
Medium
Theory
Context engineering is the practice of selecting and shaping the right instructions, retrieved knowledge, tool outputs, and memory before a model call.
- Bigger context is not always better
- Relevance matters more than volume
- Ordering and formatting affect results