Generative AI and Large Language Model Fundamentals / Start Here

How to use the course and check readiness

Lesson 1 of 33. Open to read. No account needed.

By the end of this course you will be able to run a small language model, inspect what it receives, supply evidence for its answers and measure where the resulting workflow fails. The practical thread is an information assistant for a fictional community library. Its documents, questions and expected facts are supplied. You will not connect it to real patrons or let it perform actions.

Generative AI can produce text, images, audio and other content. This course introduces that wider landscape, then concentrates its runnable work on text. It uses an existing pretrained model: its numerical settings were learned before you downloaded it. You will use and inspect those settings, rather than train a model from scratch. No prior machine-learning course, neural-network training loop, calculus or GPU experience is required.

The route from text to evidence

Start with local text-model inputs, inspect representations and generation, then add evidence and checks before evaluating a bounded library assistant. Reading is possible without running the local exercises.

Each arrow means the earlier ideas supply the next task. The local practice path applies the reading; reading alone does not demonstrate the practical skills.

First you will choose whether a task needs generation at all, prepare a local Python environment and verify the downloaded model files. You will inspect tokens, the units into which this model divides text, and trace how a model uses earlier text to produce more text. Small numerical examples explain representations and learning before you compare generation settings.

Next you will supply fictional documents, retrieve relevant passages and check generated responses. Retrieval means finding existing material rather than inventing a new answer. In evaluation you will compare outputs with supplied expected facts and a retrieval-only alternative. The final challenge combines those taught parts and asks for an honest report, including failures. You are not expected to get perfect answers from the small practice model.

Choose a view that fits the task

Full Course develops each idea, explains the example and gives you a task to attempt before its hint and answer. Start here for a new topic. Predict an output or write a decision before running the code or opening the answer.

Revision helps you rebuild the reasoning after studying the lesson: why a choice fits, which conditions matter and what a failure would mean. If the reasoning is unfamiliar, return to the linked Full Course section.

Quick Reference collects taught syntax, distinctions and diagnosis cues. It retains conditions that change an action, but does not replace the longer setup instructions. There is no certification exam or official exam syllabus attached to this skills course.

Marking a lesson complete records your choice to mark it complete. Opening a page or saving that mark cannot establish that you can explain its ideas or perform its task independently. Keep your own predictions and results so you can compare them with the explained solution.

Check your starting Python skills

You should already be able to edit a UTF-8 Python file, navigate to its folder in a terminal and run it. You should recognise functions, keyword arguments, loops, lists and dictionaries, and find a failing statement in a short traceback. A traceback shows the chain of calls leading to a Python error; read the final error message and the statement that triggered it before changing unrelated code. Basic fractions and averages are enough mathematics to begin; the course teaches its probability and vector examples.

The readiness task below is a written trace. It needs no installation, network connection or model file. Each message is a dictionary: role identifies the speaker and content holds that speaker's text. The surrounding list keeps the messages in order. These are ordinary Python objects; they are not yet sent to a model.

def user_texts(messages):
    result = []
    for message in messages:
        if message["role"] == "user":
            result.append(message["content"])
    return result

messages = [
    {"role": "system", "content": "Use the supplied library notes."},
    {"role": "user", "content": "Where is the reading room?"},
]
print(user_texts(messages))

Before reading the answer, write what is printed and explain why the system message is included or excluded. Then predict the result if a second user message with content Is it open on Monday? is appended to the list. Finally, suppose the append statement reads message["contents"] instead. Would that produce an empty answer, or an error? Which statement would you inspect?

Hint

Follow one dictionary through the loop at a time. The condition examines the role value. Square brackets request the exact key inside a dictionary; content and contents are different keys.

Answer and reasoning

The printed list is ['Where is the reading room?']. The function starts with an empty result list. The system message fails the role == "user" condition, so it adds nothing. The user message passes and its content is appended. The function returns the collected list to print().

Appending the second user message gives ['Where is the reading room?', 'Is it open on Monday?'], in that order. Replacing the lookup with message["contents"] raises KeyError: 'contents' when the first user message reaches that statement. It does not return an empty answer. The dictionary contains content; correct the key at the failing lookup rather than changing the model or installing a package.

Decide whether to prepare or proceed

If you could explain those results, recognise a simple keyword argument such as print("ready", end="!"), and run a saved script in its own folder, you have the programming starting point. A keyword argument names a parameter; in that example end changes the ending printed after ready to !. No model-specific library knowledge is expected yet.

If the function, list, dictionary or traceback was unfamiliar, first practise those Python basics with a small local script and predictable output. Python for AI and ML is an optional preparation route; equivalent free material or prior experience is enough. You do not need to purchase another course. You can read the concept lessons now, while leaving the practical outcomes until you can follow and change the code.

Installation, virtual environments, model files, structured response formats, tensor shapes, numerical similarity and evaluation protocols are taught here before their exercises use them. A virtual environment is a folder holding a Python interpreter entry point and its isolated packages, keeping course dependencies separate from other projects. It is not a cloud machine.

What local practice requires

The command path uses Linux x86_64, Bash and CPython 3.13, with CPU PyTorch 2.14.1 and Transformers 5.19.0. The reference interpreter is 3.13.15. Other operating systems, architectures and Python minors are not verified by this path. The setup lesson gives the complete pins and interpreter checks; do not install packages from the readiness example.

Plan for a machine with about 8 GB RAM and 3 GB of free disk for this bounded practice, plus an internet connection for the initial packages and model. These are planning allowances, not tested minimum specifications. Downloading the six selected model files transfers about 271 MB before package downloads; installation and temporary download storage need additional space. No GPU, paid API, cloud account or API key is required. After setup, the inference exercises read local files and include offline replay checks.

The practice model, HuggingFaceTB/SmolLM2-135M-Instruct, is small. We use it because short CPU examples are manageable, not because its answers represent the quality of the largest language models. Its model card describes limits, including an English focus and unreliable generated content. We use fictional, non-secret data throughout; do not replace it with private library records.

Later setup will create your owned practice folder. This is a location sketch, not a command or a set of files to create now:

~/genai-llm-practice/
  .venv/      isolated Python packages
  model/      verified downloaded model files
  inputs/     supplied fictional documents and questions
  outputs/    your later run records

Keep the folder for later exercises. Individual lessons say what they create, how to resume after interruption and which owned outputs can be removed. Closing a terminal does not erase saved files. This orientation creates no files or resources and has nothing to clean up. If you pause, retain your written readiness answers and resume with the task-choice lesson.

For a final check, imagine someone has opened every lesson but cannot explain why their program failed. What evidence would help them demonstrate progress? Use an attempted explanation, a corrected run and an independent variation; reading progress by itself cannot answer that question.

Further reading

The selected model card (S03) describes the checkpoint and its limitations. The Python 3.13 virtual-environment documentation (S12) explains the isolation used later. Both support the practice choices; neither replaces the course's readiness task or setup instructions.

28 more lessons in the full course

Course access opens every lesson and adds revision notes, the Quick Reference, saved progress, bookmarks and your own notes.

INR 999 plus 18% GST. 365 days of online access. No auto-renewal.

Get the full course

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy