Monday, August 11

Agentic AI Mastery: From Zero to Pro — A Complete Guide (Module-2)

📌 Module 2: Your AI Workbench — Setting Up on Windows

1. Theory

A well-configured environment is the foundation for building and running Agentic AI applications efficiently.
On Windows, this means:

  • Installing the right tools (Python, Git, IDEs)
  • Managing virtual environments
  • Installing dependencies
  • Setting up local or cloud-based LLMs

A proper setup ensures reproducibility — you and others can run the same code with minimal issues.


Why Windows Setup Matters for AI Development

  • Many developers in enterprises use Windows by default.
  • With WSL2 or native Python, you can still run modern AI frameworks.
  • Windows allows both local LLM execution and cloud API integration.

2. Step-by-Step Windows Setup (For This Module)

  1. Install Python 3.10+
  2. Install Git
  3. Install VS Code
  4. Install Ollama for Local LLMs

o   ollama run llama2

  1. Create Virtual Environment

6.  python -m venv agentic_env

7.  .\agentic_env\Scripts\activate

  1. Install Libraries

9.  pip install langchain openai requests wikipedia python-dotenv


3. Examples

Example 1 — Running a Local LLM

  • Run:

·       ollama run llama2

  • Type:

·       What is Agentic AI?

Example 2 — Testing LangChain Installation

from langchain.prompts import PromptTemplate

template = PromptTemplate(input_variables=["name"], template="Hello {name}, welcome to Agentic AI!")

print(template.format(name="Ajay"))

Example 3 — Using Hugging Face Transformers Locally

from transformers import pipeline

qa = pipeline("question-answering", model="distilbert-base-uncased-distilled-squad")

print(qa(question="What is AI?", context="AI stands for Artificial Intelligence."))


4. Exercises

  1. Install a different local model in Ollama.
  2. Create a Python script that checks if all dependencies are installed.
  3. Set up a VS Code workspace for an Agentic AI project.

5. Best Practices

  • Keep your virtual environment per project.
  • Use requirements.txt to track dependencies.

6. Common Mistakes

  • Forgetting to activate the venv before installing packages.
  • Using system Python instead of project-specific venv.

7. Quiz

  1. Which command activates a virtual environment in PowerShell?
  2. Name two benefits of using Ollama locally.
  3. Why should you keep a requirements.txt file?



No comments:

Post a Comment

Agentic AI Mastery: From Zero to Pro — The Brain of the Agent (Module- 3)

  📌 Module 3: The Brain of the Agent — LLM Fundamentals 1. Theory Large Language Models (LLMs) are at the heart of most modern AI ag...