ai
191 tutorials tagged “ai”.
- The Agent LoopBuild the loop at the heart of every agent: call the model, run the tool it asks for, return the result, and repeat, with a step limit and confirmation.
- Tokens, Cost and Rate LimitsEstimate what a model API feature costs: count tokens, price input and output separately, compare models, and handle rate limits with retries.
- API Keys and SecretsKeep API keys safe: load them from environment variables, keep them out of code and git, never ship them to browsers or apps, and rotate them when exposed.
- Frontend, Backend and the ModelBuild the AI Learning Assistant end to end: a FastAPI backend with a SQLite database, a small web page, and the model call, then run and test it locally.
- Improving with FeedbackImprove an AI app from real use: measure satisfaction, speed and cost from stored interactions, find where answers fail, fix them, and evaluate again.
- Messages, System Prompts and ParametersControl a model API call: send a whole conversation as messages, set rules in the system prompt, and shape the reply with max_tokens, stop and temperature.
- Automatic and Model-Graded EvaluationGrade AI output automatically with code checks and model-graded rubrics, compare versions case by case, and block releases that lower the score.
- Building an AI Learning AssistantApply the seven-step method to an AI Learning Assistant: problem, solution, users, features and architecture, then build its tutor function in Python.
- Calling a Model APICall a hosted AI model from Python with one small helper that works with most providers: send a system prompt and a message, then read the reply.
- Answers with SourcesMake RAG answers show their sources and admit when they don't know: numbered passages, structured citations, checked in code, and a score threshold.