Custom AI Assistants & Agents
Build a working grounded custom AI assistant, extend it with bounded tools and human approval, and prove it with protected evaluations, cost controls, and recovery evidence.
31 lessons
Estimated lesson study time: 492 minutes
Lesson estimates are a guide, not a deadline. Allow extra time for practice, projects, and review.
Learn AI & Technology Access gives you full access to all 19 tracks and 552 lessons after sign-up and onboarding. No time limit, paid subscription, or payment card required.
Start Learn AI & Technology AccessIncludes three AI Tutor answers across these courses. AI-generated content remains subject to Learn’s monthly allowance.
Track overview
Move from designing an assistant's role to grounding its answers, adding bounded tools, and testing the complete system. The track connects prompt design, retrieval, approval gates, protected evaluations, and day-to-day operations through a working-system capstone.
Who this track is for
Builders who want to create a knowledge assistant for a personal, professional, educational, or community workflow.
Before you begin
Bring a specific use case and sources you have permission to use. Be ready to work with structured outputs, tool definitions, and test cases; this is a build-focused track.
What you will work toward
Work toward a grounded assistant and bounded agent with a source register, evaluation results, human-approval evidence, cost record, and recovery guide.
Complete lesson outline
1. Design a Custom AI Assistant
5 lessons
1.1 Anatomy of a Prompt
12 minutes- Identify the core parts of a prompt: instruction, context, input, and output format
- Explain how each part shapes the model's response
- Rewrite a vague prompt into a structured one
1.2 Writing Clear Instructions
13 minutes- Apply specificity, constraints, and examples to reduce ambiguity
- Use delimiters to separate instructions from user content
- Avoid common vagueness that leads to unpredictable answers
1.3 System, User, and Assistant Roles
13 minutes- Distinguish the system, user, and assistant message roles
- Explain how the system prompt sets persistent behavior
- Structure a multi-message conversation correctly
1.4 Designing Effective System Prompts
14 minutes- Write a system prompt that defines role, goals, and boundaries
- Encode rules and refusal behavior into the system message
- Balance detailed instructions against prompt length
1.5 Managing Conversation Context
14 minutes- Explain how conversation history is passed on every request
- Manage the context window as conversations grow
- Summarize or trim history to stay within token limits
2. Make Assistant Outputs Reliable
5 lessons
2.1 Reusable Prompt Templates
14 minutes- Design prompts with variable placeholders for reuse
- Separate static instructions from dynamic input safely
- Version and organize a small library of templates
2.2 Zero-Shot and Few-Shot Prompting
14 minutes- Contrast zero-shot prompting with providing examples
- Construct few-shot examples that demonstrate the desired pattern
- Choose the number and diversity of examples for a task
2.3 Structured Output and JSON Mode
16 minutes- Request reliable JSON output using schemas
- Use structured output features to enforce field types
- Parse and validate model responses in code
2.4 Prompt Decomposition and Chaining
15 minutes- Break a complex task into a sequence of focused prompts
- Pass the output of one prompt as input to the next
- Decide when chaining beats a single large prompt
2.5 Evaluating and Iterating on Prompts
16 minutes- Build a test set of inputs with expected outputs
- Compare prompt variants systematically instead of by intuition
- Use automated evals to catch regressions
3. Ground the Assistant in Trusted Knowledge
5 lessons
3.1 Retrieval-Augmented Generation Concepts
14 minutes- Explain why RAG grounds responses in external knowledge
- Describe the retrieve-then-generate pattern
- Identify when RAG solves knowledge and freshness gaps
3.2 Chunking and Indexing Documents
15 minutes- Explain why documents are split into chunks for retrieval
- Choose chunk size and overlap for good recall
- Embed and index chunks in a vector store
3.3 Building RAG Prompts
15 minutes- Insert retrieved context into a prompt with clear boundaries
- Instruct the model to answer only from provided context
- Add citations so answers are traceable to sources
3.4 Evaluating Retrieval Quality
15 minutes- Measure retrieval quality with recall and precision at k
- Diagnose whether errors come from retrieval or generation
- Iterate on chunking and query strategies to improve grounding
3.5 Hallucinations and Reliability
14 minutes- Explain why language models produce confident but incorrect answers
- Describe strategies to reduce hallucinations such as grounding and retrieval
- Understand when to verify AI outputs against authoritative sources
4. Extend the Assistant into a Bounded Agent
5 lessons
4.1 Introduction to Tool Calling
14 minutes- Explain how models call external functions to take actions
- Describe the request, tool call, and result cycle
- Recognize tasks that require tools rather than pure generation
4.2 Defining Tool Schemas
16 minutes- Write a JSON schema describing a tool's name, purpose, and parameters
- Write descriptions that help the model choose tools correctly
- Handle the tool result and return it to the model
4.3 Agentic Loops and Planning
15 minutes- Explain how an agent plans, acts, observes, and repeats
- Describe how multiple tools combine to complete a goal
- Identify risks of loops such as runaway cost and errors
4.4 Function Calling
16 minutes- Describe tools to the model with JSON schemas
- Read tool call requests from the model response
- Return tool results back into the conversation
4.5 Agent Safety Limits
16 minutes- Cap agent iterations and tool budgets
- Restrict tools to a safe allowlist
- Add human-in-the-loop approval for risky actions
5. Evaluate, Protect, and Operate the System
6 lessons
5.1 Prompt Injection and Attacks
15 minutes- Explain how prompt injection hijacks model instructions
- Distinguish direct from indirect injection through retrieved content
- Recognize data exfiltration and jailbreak patterns
5.2 Defending Against Injection
16 minutes- Apply input separation and trust boundaries to reduce injection risk
- Constrain tool permissions and validate model actions
- Add output filtering and human confirmation for sensitive steps
5.3 Writing Evals
16 minutes- Define an eval dataset of inputs and expected outputs
- Score model outputs with automated checks
- Explain why evals catch quality regressions
5.4 Managing Cost and Latency
16 minutes- Estimate token usage and cost per request
- Choose model size to balance quality and speed
- Reduce cost with shorter prompts and smaller models
5.5 Fallbacks and Resilience
16 minutes- Retry failed calls with exponential backoff
- Fall back to an alternate model on failure
- Return a safe default when all attempts fail
5.6 Best Practices for Building AI Agent Skills
22 minutes- Draft portable Agent Skills metadata with a clear purpose and activation conditions, then test relevant and unrelated requests
- Turn real subject-matter expertise, rules, and exceptions into concise, usable instructions
- Use progressive disclosure for supporting references and choose deterministic scripts for exact, repeatable work
- Inspect a third-party skill's instructions, scripts, dependencies, permissions, and file/network access before deciding whether it is safe to use
- Separate the portable Agent Skills format from host-specific discovery, loading, and optional extensions
6. Build and Prove the Working System
5 lessons
6.1 Capstone 1: Define the Assistant and Its Boundaries
20 minutes- Choose a real personal, professional, educational, or community use case with a clear user and measurable outcome
- Define what the assistant may answer, draft, recommend, refuse, and hand to a person
- Record the baseline, acceptance threshold, privacy limits, and excluded decisions before building
6.2 Capstone 2: Prepare Grounding and Protected Evaluations
20 minutes- Create a permitted source inventory with ownership, permission, provenance, freshness, and known gaps
- Clean, redact, organize, and version the knowledge used by the assistant
- Create protected normal, ambiguous, unsupported, injection, tool-failure, and unsafe evaluation cases
6.3 Capstone 3: Build the Working Assistant and Bounded Agent
20 minutes- Build a working grounded multi-turn assistant with structured outputs and traceable citations
- Extend it with at least one safe bounded tool, explicit termination limits, and a human approval gate
- Demonstrate stable session context, refusal, fallback, and recovery without granting unsafe autonomous authority
6.4 Capstone 4: Evaluate, Repair, and Control Cost
20 minutes- Run the protected evaluation set and preserve results for quality, grounding, safety, tools, latency, and cost
- Compare results with the baseline and acceptance threshold without changing protected cases after failures
- Repair failed behavior, rerun affected evaluations, and document remaining limits and rollback criteria
6.5 Capstone 5: Present a Governed Working Agent
20 minutes- Demonstrate the working assistant and bounded agent in the chosen general-user workflow
- Deliver the configuration, source register, evaluation results, approval evidence, cost record, and recovery guide
- Explain measured results, unresolved limitations, safe-use instructions, and the conditions required for continued operation