Set up a Python LLM dev environment

Quick Overview

This question evaluates practical competencies in Python development environment setup, reproducible dependency management with lockfiles, virtual environment and interpreter management, secrets handling via environment variables, project structuring, and basic API integration.

Set up a Python LLM dev environment

Company: Mistral AI

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

Set up a reproducible local Python environment to develop the Mistral-based agent. Demonstrate how you would: install a specific Python version with pyenv; create and activate a virtual environment; manage dependencies with a lockfile; configure environment variables for secrets without committing them; structure the project for quick local execution and testing; and verify the setup by running a short script that prints the model name from a test Mistral API call.

Quick Answer: This question evaluates practical competencies in Python development environment setup, reproducible dependency management with lockfiles, virtual environment and interpreter management, secrets handling via environment variables, project structuring, and basic API integration.

|Home/Software Engineering Fundamentals/Mistral AI
Mistral AI logo
Mistral AI
Sep 6, 2025, 12:00 AM
mediumSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
27
0

Task: Reproducible Local Python Environment for a Mistral Agent

You are to set up a clean, fully reproducible local Python environment to develop a small Mistral-based agent and verify it with a real API call.

Assume a Unix-like shell (macOS/Linux). If you're on Windows, use WSL or the Windows equivalents.

Requirements

  1. Install a specific Python version using pyenv (e.g., Python 3.11.x).
  2. Create and activate an isolated virtual environment.
  3. Manage dependencies with a lockfile to ensure reproducible installs.
  4. Configure secrets via environment variables without committing them.
  5. Structure the project for quick local execution and testing.
  6. Verify the setup by running a short script that prints the model name from a test Mistral API call.

Deliverables

  • Clear setup commands and minimal rationale for each step.
  • A project skeleton (directories and key files).
  • A verification script that calls the Mistral API and prints the model name.
  • Notes on how to run and validate the environment.
Loading comments...