
Artificial Intelligence and Large Linguistic Models: Prompt and Context Engineering
This course lays the foundation for your further studies in AI engineering, machine learning, and digital systems. You will gain a methodological and technological basis for applying artificial intelligence in digital systems engineering and make the transition from theoretical understanding to real‑world engineering practice.
During the course, you’ll dive into the world of modern artificial intelligence technologies and gain a comprehensive understanding of how cutting‑edge AI models work — including powerful Large Language Models (LLMs). You won’t just study theory: you’ll master practical skills in applying AI tools within real‑world digital systems.
You’ll learn to finely control the behaviour of intelligent models by mastering prompt engineering and context engineering techniques — from basic principles of query formulation to advanced strategies for managing model outputs and working with prompt chains. Special attention will be given to retrieval‑augmented generation (RAG) approaches and memory management techniques: you’ll understand the role of system instructions and learn how to properly structure context to get the most accurate and useful results.
The programme will cover the evolution of approaches in AI and introduce you to current trends and architectural solutions — particularly the inner workings of LLMs: transformer‑based architectures, pre‑training and fine‑tuning processes, and inference optimisation methods. You’ll see how to apply LLMs in practice — for instance, to generate code, analyse system architectures, automate technical documentation, and support software testing.
We’ll also address important limitations and risks: we’ll examine model hallucinations, factual inaccuracies, and bias issues, and study key safety protocols and data protection principles. By the end, you’ll be able to competently assess the capabilities and weaknesses of AI technologies and make well‑founded decisions about how to apply them in engineering tasks.
The learning experience is designed to reinforce theory with hands‑on practice. In lectures, we’ll take an in‑depth look at architectural solutions; then, in workshops, you’ll practise crafting effective prompts and designing interaction scenarios with models. In lab sessions, you’ll work with up‑to‑date LLM platforms, and through mini‑projects you’ll try integrating AI assistants into real engineering challenges. Analysing practical case studies will help you see how AI technologies are implemented in real life and solve pressing engineering problems.
By the end of the course, you’ll be fully prepared to confidently embed AI assistants into the development and operation of digital systems — and harness the full potential of modern AI technologies in your professional work.
OBJECTIVES
Development of a systemic understanding of the operating principles of modern artificial intelligence models, including large linguistic models (LLM);
Development of skills in engineering application of AI tools in digital systems;
Mastering the methods of prompt engineering and context engineering as tools for managing the behavior of intelligent models;
Preparation for the integration of AI assistants into the development and operation of digital systems.
KEY TASKS
Develop a comprehensive understanding of the operating principles of modern artificial intelligence models, including Large Language Models (LLMs);
Acquire practical engineering skills in applying AI tools within digital systems;
Gain proficiency in prompt engineering and context design for guiding AI model responses;
Prepare to integrate AI assistants into the development and operation of digital systems.
Main topics of the course:
Block 1. The Nature of the Tool
1. What is a Large Language Model (LLM): evolution of AI from rule‑based systems to transformers.
2. Principles of LLM operation: tokens, probabilities, sampling parameters (temperature, top‑p).
3. Model hallucinations: causes and methods of reproduction.
4. Transformer architecture: attention mechanism (without matrices), context window as an architectural constraint.
5. Tokenization: impact on prompt engineering (numbers, code, non‑Latin alphabets).
6. Solution space: pre‑training → inference → fine‑tuning → RAG (retrieval‑augmented generation).
7. Overview of modern LLMs: GPT‑4, Claude, Gemini, Llama, Mistral, GigaChat.
8. Model optimization: distillation, quantization, weight pruning.
9. Deployment options: cloud vs. on‑premises (economics, latency, privacy).
10. Prompt as an engineering specification: structure (role, task, context, format, constraints).
11. Output control strategies: zero‑shot, few‑shot, chain‑of‑thought.
Block 2. Prompt Engineering as a Discipline
1. Model output control strategies: with and without examples, step‑by‑step reasoning, self‑consistency.
2. Structured output and function calling.
3. System prompt as the model’s “constitution”: role delineation (system — user — assistant).
4. Persona engineering and guardrails in prompts.
5. Prompt injection attacks: demonstration and defense (instruction prioritization, input validation).
6. LLM error typology: factual and reasoning hallucinations, overconfidence, sycophancy.
7. Verification techniques: source querying, “devil’s advocate” technique.
8. Comprehensive lab work: industrial case study analysis, prompt library peer review.
Block 3. Context Engineering and API Integration
1. Context as a managed resource: memory management strategies (sliding window, summarization).
2. Lost‑in‑the‑middle effect and its impact on quality.
3. Working with APIs: OpenAI, OpenRouter, GigaChat — request structure, streaming, rate limiting.
4. Error handling and response caching: when and why.
5. API cost optimization.
6. FastAPI as a wrapper for LLM service: asynchronous processing, separation of prompt and application logic.
7. Architectural patterns for AI applications.
8. Chatbots and state management: stateless vs. stateful, session context persistence.
9. Integration with Telegram and corporate platforms.
Block 4. Semantic Search and Knowledge Base Augmentation
1. Vector representations: meaning as a point in multidimensional space, cosine similarity.
2. Semantic search vs. full‑text search: advantages for fuzzy queries.
3. Vector databases: Qdrant, pgvector, Pinecone — comparison.
4. RAG pipeline: chunking → vectorization → indexing → extraction → augmentation → generation.
5. Chunking strategies: fixed size, semantic, hierarchical.
6. Quality metrics: reliability, answer relevance, context precision and recall.
7. Errors in knowledge‑augmented systems: poor extraction, context loss, source conflicts.
8. First‑semester final lab: integration of all components, project pre‑defense.
Block 5. Agents and External System Integration
1. Agent concept: LLM + tools + cycle (Observe → Think → Act).
2. Agent patterns: ReAct, plan‑and‑execute, reflexive agent.
3. Agent reliability: protection against infinite loops, confidence thresholds, logging.
4. Multi‑agent systems: orchestration (supervisor, pipeline, debate), responsibility separation.
5. Agent integration with external systems: databases, web search, enterprise APIs.
6. Agent activity audit: audit log implementation.
Block 6. Quality, Validation, and Production Maturity
1. AI system quality metrics: RAGAS, G‑Eval, LLM‑as‑judge.
2. Manual evaluation: annotation guidelines, inter‑rater agreement.
3. Evaluation datasets: creation and maintenance.
4. Validation and testing: unit tests for prompts, integration tests, regression testing, A/B testing.
5. Risk management and security: risk classification (technical, operational, ethical), data leakage, content moderation.
6. LLM in development processes: code review, test generation, documentation, architecture analysis.
Block 7. Advanced Search Techniques and Multimodality
1. Hybrid search: BM25 + semantic search, reranking models.
2. HyDE (Hypothetical Document Embeddings): hypothetical answer generation and indexing.
3. Corrective RAG and Self‑RAG: self‑correcting generation.
4. Multimodal scenarios: multimodal LLMs (vision), audio models, prompt engineering specifics for image processing.
Block 8. Further Training and Observability
1. Fine‑tuning vs. alternatives: LoRA/QLoRA, instruction tuning, RLHF (Reinforcement Learning from Human Feedback).
2. AI system observability in production: logging, alerts, tracing (LangSmith, Langfuse).
3. Quality drift: detecting system degradation.
4. Feedback loops implementation.
Block 9. Final Project
1. Architectural audit and final design.
2. Implementation of final modifications.
3. Preparation for defense: presentation and system demonstration.
4. Project defense: justification of architectural decisions, system operation demonstration.