ICM – Computer Science Major – Course unit on Technological foundations of Computer Science and M1 Cyber Physical and Social Systems – Course unit on CPS2 engineering and development, Part 2: Technological foundations of software development

Institut Henri Fayol - MINES Saint-Étienne

Master your working environment

The purpose of this session is to ensure that you are familiar with your computer, your operating system, and the shell-like command line programming environment.

Pointers

TODOs

By 17/10

submit your work for Courses 1-2 as LASTNAME.zip to https://ecampus.emse.fr/mod/assign/view.php?id=33633 (expiration date/time: 2025-10-18 01:00 )
If you are using the Windows operating system, you must ensure that you have installed the Windows Subsystem for Linux, and that you run commands from the WSL2 unix shell.
  • 1/5 points - Describe the computer you are using in terms of hardware and operating system(s).

  • 1/5 points - You have installed a few useful programs, and can call run successfully the following commands in a unix shell. NOTE: For each of these programs, you may need to ensure it is found in the PATH, and potentially set other environment variables, such as JAVA_HOME for maven:

  • 1/5 points - install ollama, following instructions in the online documentation. Pull the llama3.1 language model (or some lighter language model).

  • 0.5/5 points - Use the ollama api to query the model using the curl program.

  • 0.5/5 points - Pipe the output of the command above with the jq command-line JSON processor to print out the response content.

  • 0.5/5 points - Set up a ollama tool to allow browsing inside a website

  • 0.5/5 points - Write a bash script ask.sh that satisfies the documentation below. To make it work, you may need to develop a few ollama tools in python, or a combination of two or more prompts in a loop that simulates reasoning.

USAGE:
  ./ask.sh <website> "<question>"

DESCRIPTION:
  ask.sh is a command-line tool that answers a specific question based on
  the content of a website.

PARAMETERS:
  <website>
    The url of the Website to analyze. This parameter is required.

  "<question>"
    The question to ask about the content of the website. This parameter is required and
    must be enclosed in quotes.
I need to see your use a unix shell ! neither cmd, nor powershell, nor MinGW
How to get the points

You need to demonstrate everything works as expected by including a short screen recoding video (<5min), in addition to the sources of your scripts.

For example, if I run:

./ask.sh https://www.mines-stetienne.fr/ "Name the research centers and departements of Mines Saint-Etienne, with their contact."

I would expect that the LLM chooses to navigate to https://www.mines-stetienne.fr/recherche/ , then https://www.mines-stetienne.fr/recherche/centres-et-departements/ , where it will find the following information:

language models can clearly help you get part of the points, but I want to be sure it worked on your computer, and that you provide explanations for each component of the answer.