Course Details

Programming intelligent applications

MF0781

Course
Programming intelligent applications
Code
MF0781
Academic Year
2024/2025
Curriculum Year
2022/2023
Degree Programme
CHEMISTRY
Curriculum
000 - CORSO GENERICO
Course coordinator
Lecturers
Credits
6
Lecture Hours
48
Scientific Disciplinary Sector (SSD)
INF/01 - Computer Science
Course Type
Single-subject learning activity
Course Delivery
OPZ - Opzionale
Year
3
Teaching period
Secondo Semestre
Campus
VERCELLI
Teaching language
Italian
Course Contents
The content traces the evolution of artificial intelligence, with a strong focus on LLMs and their practical applications. It briefly covers machine learning and neural network types and then delves into advanced LLM techniques, such as tokenization, embeddings, transformers, and prompts engineering. Particular emphasis is placed on the practical applications of LLMs, in particular in two areas:
- I use them as application writing assistants
- infusion of intelligence into applications.
Reference Texts
"Understanding Deep Learning" by Simon J.D. Prince - MIT Press 2024
"Hands-On Large Language Models" by Jay Alammar, Maarten Grootendorst - O’Reilly Media, 2024
"Natural Language Processing with Transformers, Revised Edition" by Lewis Tunstall, Leandro von Werra, Thomas Wolf - O’Reilly Media, 2022
"Build a Large Language Model (From Scratch)" by Sebastian Raschka - Manning, 2024
Learning Outcomes
Develop skills in designing and implementing AI-based applications, with a particular focus on LLMs and their architectures.

Acquire the ability to critically evaluate the performance and limitations of AI models, distinguishing between different deployment solutions.

Explore advanced tools and techniques for optimizing and integrating LLMs into applications, such as Prompt Engineering, Retrieval Augmented Generation, Workflows, and Agents.
Prerequisites
Basic knowledge of the Python programming language.
Basic knowledge of linear algebra.
Teaching Methods
The course is divided into approximately 36 hours of didactic teaching and 12 hours of interactive teaching to be carried out in the laboratory.
Additional Information
Students with physical disabilities, Learning Disabilities or Special Education Needs can request specific services and tools via the "Staff Sviluppo e Coordinamento Carriere e Servizi alle Studentesse e agli Studenti", consulting the University webpage: https://www.uniupo.it/en/services/services-students-physical-or-learning-disabilities. Students with disabilities, learning disabilities or special education needs, once they have contacted the University Staff, can refer to the tutor in charge of the course to define the examination modalities, concerning academic aspects.
Assessment Methods
The exam consists of two parts:
- a practical part that consists of the implementation of a project
- an oral.
Regarding the project:
- it can be done individually or in small groups (3 members maximum, except in particular cases to be agreed with the teacher)
- to stimulate creativity, each group can present its own project proposal, subject to approval by the teacher
- the laboratory project weighs 2/3 on the final evaluation
- However, there is a minimum threshold that provides
* correct compliance with the specifications agreed with the teacher
* the drafting of a report summarizing the objectives of the project and the architectural choices
* the produced system must be free from bugs, at least in common use cases.
- the delivery of the project is a prerequisite for accessing the oral exam
- during the oral exam, each group must organize a demo of what has been developed.

The oral exam is aimed at evaluating knowledge of the course contents, in particular:
- is done individually
- the teacher, if he deems it, is free to verify the actual knowledge of the system developed in the practical part
- at least 3 questions
- the minimum threshold is constituted by having answered at least 60% of the questions proposed
- the oral exam weighs 1/3 of the final evaluation.

To obtain honors, you must achieve the maximum score in both parts and correctly answer an additional question.
Detailed Syllabus
- Brief history of artificial intelligence from its origins to the present day

- Machine Learning
* Supervised learning
* Unsupervised learning
* Reinforcement learning

- Neural networks
* Introduction to Jupyter Notebooks / Google Colab
* Introduction to Neural Networks (MLP) and Backpropagation
* Generalization / Overfitting
* Universal approximation theorem
* Transforming text into input for a neural network
^ Tokenizing
^ Embeddings

- LLMs
* Introduction to Transformers
* Introduction to LLMs and fields of application
^ Text generation / images / sound / code
^ Classification
^ Sentiment Analysis
^ Summarization
^ Language Translation
^ Understanding and reasoning

* Overview, through examples, of the capabilities of the leading models: ChatGPT / Claude / Llama3 / Google Gemini
* Key Features of LLMs
^ Number of parameters (Small Models vs Large Models)
^ Size of the Context Window
^ Licensing
^ Different architectures: Mixture of Experts
^ LLMs comparison

* LLM lifecycle
^ Training
^ Instruction tuning
^ Fine-tuning
^ Reinforcement Learning with Human Feedback
^ Inference

* AI-assisted programming
^ GitHub Copilot subscription
^ Use cases and examples with VS Code / GitHub Workspaces

* Output non-determinism / Temperature
* Prompt Engineering
^ Zero-Shot / Few-Shots
^ Chain of Thoughts
^ Examples with different LLMs: ChatGPT, Claude, Llama3

* Limits
^ Hallucinations
^ Training set quality

* Cost evaluation (OpenAI)
* Multi-modal models (GPT-4o / Claude / Gemini / .)

- Hardware for LLMs Inference
* Quantization
* CPU / GPU / NPU / LPU (Groq)
* Cloud (HuggingFace / OpenAI / Claude) vs Local Inference (Ollama)

- Programming with LLM
* API native (e.g. OpenAI) vs LangChain
* Memory usage
* Retrieval Augmented Generation (RAG)
* Introduction and use of Vector Databases
* Tool
* Multi-Agent Architecture

- HuggingFace ecosystem for other tasks requiring different models (e.g., processing of images / sounds / ...)
- OpenAI GPT Store
- Notes on security issues
- Short Term Inference vs Long Term Reasoning
- Emerging (latent) capabilities
- Generative Artificial Intelligence (examples) - Stable Diffusion, Music Generation, ...
Expected Learning Outcomes
Knowledge and Understanding: Students will acquire a solid understanding of the methodologies and architectures underlying AI-based applications, with a particular focus on LLMs and their practical implications.

Ability to Apply Knowledge and Understanding: Students will be able to develop and implement medium-complexity AI solutions, integrating pre-trained models into real-world applications. They will be capable of applying optimization techniques, such as Prompt Engineering and Retrieval Augmented Generation, to enhance model effectiveness.

Communication Skills: Students will develop the ability to document and present their work in a clear and structured manner, using appropriate technical terminology.

Independent Judgment: Students will acquire the ability to critically assess the effectiveness of different AI models, identifying their strengths and weaknesses. They will be able to select the most suitable model for a given application context, considering technical, ethical, and economic aspects.

Learning Skills: Students will develop an autonomous approach to updating their skills, knowing how to identify the most appropriate resources to explore emerging topics in AI and LLMs.
Last update:09-09-2026 00:14:31