Agentic AI Onboarding Exercises
Four practice projects from the AI internship training, going from a simple AI chain to an agent that uses tools.
In short. Going from a simple AI chain to an agent that uses tools opens up many ways to fail. These four practice projects from the internship training cover structured answers, RAG over documents, a routing workflow with memory and a tool-using agent that retries when a tool fails. Each was stress-tested on purpose to see how it fails.
- Python
- LangChain
- LangGraph
- Groq
- LangSmith
- Chroma
- HuggingFace embeddings
- Pydantic
01What it is
Four practice projects from the AI internship training at SiliconCedars. They go from one simple AI chain up to an agent that uses tools and is tested. Things were broken on purpose to see how they fail.
They are practice exercises, not finished products, and they led to the Multi-Agent Supervisor.
- Exercise 1: a first AI chain with structured answers, and a speed comparison of four models
- Exercise 2: RAG over documents, with the pieces stored in Chroma, a vector database
- Exercise 3: a LangGraph workflow that routes simple and complex requests, with memory
- Exercise 4: an agent with a calculator, web search and document lookup, that retries when a tool fails, checked with LangSmith
- Each one was stress-tested on purpose, to see how it fails
02Exercise 1: a first AI chain and a model benchmark
- A basic chain with a prompt template that takes several inputs and returns the answer as structured data (a Pydantic schema).
- The same task ran on four models, three times each, with time and tokens recorded (table below). Every model that worked gave the expected structured answer.
- Each run can be inspected in LangSmith: the prompt, the answer, the tokens used and how long it took.
- Hardest parts: passing variables into prompt templates, getting structured output from the Groq API, and differences between models.
03Exercise 2: searching documents by meaning (RAG with a vector database)
- Text documents are cut into pieces of 700 characters that overlap by 100, and each piece is turned into numbers that capture its meaning (embeddings, from a HuggingFace model).
- The pieces live in Chroma, a vector database, saved to disk. The first run builds it and later runs open it, so the documents are only embedded once.
- For each question, it fetches the 4 closest pieces by meaning and the AI answers only from those. The prompt tells it to say it does not know instead of guessing.
- It handles direct lookups, questions that need several sections, and questions the documents cannot answer. One lesson: a broad “summarise everything” question misses sections when only a few pieces are fetched.
- A LangSmith check has a second AI call judge each answer against a reference answer.
04Exercise 3: a workflow with different paths and memory
- A LangGraph workflow with four steps. One reads the request and labels it simple or complex, one answers simple requests, one gives a fixed reply to complex ones, and one trims old messages.
- The label comes back as structured data, so the workflow can follow it reliably.
- Memory is kept per conversation, so follow-up questions work. Changing the conversation id starts a fresh one. When the history gets too long, the oldest messages are removed and the newest are kept.
- Checked with simple and complex requests, follow-ups, going past the history limit, unclear requests, and a classifier broken on purpose. It also confirms that old messages really are removed.
05Exercise 4: an agent that uses tools
- The agent has three tools: a calculator, a web search, and a lookup in a small set of internal facts (standing in for something like company policy).
- It is asked to think about which tool fits before it calls one. After each tool, control goes back to the agent, so it can use another tool or answer.
- Tools return a clear error message and do not crash. The agent reads its own failed attempt and tries again with corrected input.
- Evaluated in LangSmith on a dataset of five example questions. One check asks whether the agent used the expected tool, and another has a second AI call judge the final answer. One simple multiplication was answered without the calculator, which counts as an expected result here.
06The four exercises
| Exercise | What it covers |
|---|---|
| 1 | A first AI chain with structured answers, and a speed comparison of AI models |
| 2 | Searching documents by meaning in a vector database (Chroma), then answering from what was found |
| 3 | A workflow that sends simple and complex requests down different paths, with memory |
| 4 | An agent that uses a calculator, web search and document lookup, and retries when a tool fails |
07Exercise 1: model speed comparison
| Model | Seconds per run (3 runs) | Tokens used (3 runs) |
|---|---|---|
| openai/gpt-oss-120b | 1.12 · 0.87 · 0.83 | 408 · 385 · 402 |
| openai/gpt-oss-20b | 0.70 · 0.89 · 0.65 | 397 · 383 · 385 |
| openai/gpt-oss-safeguard-20b | 0.73 · 0.61 · 0.61 | 437 · 423 · 393 |
| qwen/qwen3.6-27b | 1.12 · 3.50 · 3.48 | 515 · 1,707 · 1,479 |
Every model got the same single question and gave the same answer. This compares speed and cost only, not quality.
08Pictures


09Good to know
- These are learning exercises, not production code.