Agentic AI (Deep Learning AI) by Andrew Ng
- Iterative approach/ multiple steps to complete the task result in a better version of the output compared to a one-shot prompt
- Creating the agent: Decomposing your workflow into discrete steps and asking the agent to execute each of the distinct steps
- Evaluations: score based on objective outcomes (e.g., if the response mentions competitors = negative, …)
- Design patters:
- (1) Reflection/ critic agent
- (2) multi-agent workflows
- (3) error analysis
- (4) planning
- Using LLMs for comparison (1) Position bias (2)
- Giving expamples is the ‘shots’; so one-shot is one example, two shot is two examples
- Reflection with external feedback improves performance

- Tool calling: execulting python can also be a tool
- Model Context Protocol (clients and servers):
- Evaluating the accuracy of a sub-task e.g.,
- When an agent is not performing up to par, look at the traces of the run (i.e., the intermediate outputs); output of a single steps is called a span
- e.g., find some of the wrong outputs and give the right answer and then give it to the LLM
Improve non-LLM performance
- web search, text retrieval for RAG
- tune hyperparameters:
- Web search: number of results, date range, replace
- RAG: chunk size, similarity threshold
Improve LLM performance
- Improve prompts:
- Defining the role
- More explicit instruction
- Few-shot prompting
- Decompose the task/ add reflection
Cost and latency improvement