AI Ustoz UZ: learn artificial intelligence in Uzbek
Advanced level

API, tool calls and the idea of RAG

Understand how a program talks to artificial intelligence services: a structured request and response, tool calls and the idea of answering from a found document. All exercises are simplified for learning: there is no connection to a real service.

3 lessons · 43 min

  1. API: a structured request and response14 min
  2. Tool calls: the model chooses, the program runs14 min
  3. The idea of RAG: find first, then answer15 min

Project: Simplified “answer from a document” example

Make a list of 3–4 short texts. Find the text that best fits a question, put it into the request text and build a ready prompt. You do not need to connect to a real model: you check the prompt yourself.

Project steps

  • I made a list of texts
  • I wrote the function that finds the best text
  • I built the prompt template
  • I tested it with 3 questions