AI for Coding

Day 1: Setup overview

Distributional Impact of Policies. Fiscal Policy and Growth Department

2026-04-20

Minimal and optimal setup requirements

To be able to reproduce examples and follow along with AI for coding in Stata, you need to have a minimal setup in place (or optimal setup if possible). This includes:

  • Software — Positron, Python, R, Stata, and Quarto
  • Stata extension in Positron
  • GitHub account on private email
  • Access to github.com/worldbank organization
  • GitHub Copilot activated
    • WB organization subscription (recommended)
    • or private subscription to the Pro plan (fall-back option)
  • Positron Assistant — connected to Copilot and enabled in Positron
  • Working folders properly set up with data and code access.

If in doubt, follow the detailed instructions in the prerequisites and verify your setup.

Software Setup

Follow instructions on software setup and verification in prerequisites.

  • Thanks to our IT team, all required software is available for installation via Software Center on WB laptops:
  • Stata 19+ MP, Positron (latest), R 4.5.3+, Python 3.13+, Quarto 1.9+, and Git 2.52+
  • Everything except Stata is free and open sourceno license required.

If any problems arise: follow the troubleshooting guide or contact ITHelp@worldbankgroup.org.

GitHub Account Setup

Why? To use version control, collaborate with colleagues, and access GitHub Copilot AI features.

1. Create account

2. Join WB organization

GitHub Copilot: WB vs. Private

Why? To get AI code assistance in Positron and GitHub.

Private Free WB Organization Private Copilot Pro Private Copilot Pro+
Cost Free Free (WB-funded) ~$10/mo ~$39/mo
Premium requests/mo 50 300 500 1,500
Advanced models (Claude, GPT)
Inline completions ⚠️ Old models
Overage billing N/A Chargeback process Credit card Credit card

Important

You can only have one active plan. WB access automatically cancels and refunds your private subscription. Switching back requires re-subscribing and is possible at the end of a month.

Premium Requests and Limits

What are premium requests?

Every chat/agent interaction is a premium request (with Claude, GPT-5, Gemini).

Monthly included allowances

Plan Req./month
WB org 300
Private Copilot Pro 500
Private Copilot Pro+ 1,500

Check usage at GitHub Settings → Copilot.

Exhausted your premium requests?

Set a budget (~$0.04/request):

When your usage reaches 100%, capable AI models stop working.

  • Basic inline completions still work.

Access Levels at a Glance

For the course, it is recommended to have WB Copilot access + good prompting.

Fall-back: Personal GH + Private Copilot Pro subscription

Setup Repos Copilot
No GitHub account ✅ Public / ❌ Personal / ❌ WB
Personal account (free) +✅Personal / ❌ WB ⚠️ Only old LLMs
+ Copilot Pro/Pro+ (private) +✅Personal / ❌ WB ✅Claude+ 300/1500
+ Premium req. budget (private) +✅Personal / ❌ WB ✅ + extra at 0.04$/request (credit card)
WB Org member +✅ WB ⚠️ No premium requests
+ or Private Copilot & budget +✅ WB ✅Claude+ 300/1500 + extra at 0.04$/request (credit card)
+ or WB Copilot access +✅ WB ✅ 300 req/mo
+ WB chargeback +✅ WB ✅ + extra at 0.04$/request (WB chargeback)

GitHub @ World Bank is more than Copilot

Why use GitHub @ World Bank?

  • It is a modern standard of research and collaboration.

  • GitHub integration improves your code, version control, and collaboration standards, leading to better quality, transparency, and reproducibility.

  • WB Open Source https://opensource.worldbank.org/ — builds open source communities and shares open data, software, and research to advance transparent, evidence-based progress toward the SDGs.

  • Viva Engage: stay connected with the community.

  • Support: github@worldbank.org

Positron Assistant

The Positron Assistant connects GitHub Copilot to Positron, enabling AI features in the editor and chat.

Enable

  1. In Positron: Settings (Ctrl+,) → search positron.assistant.enable → ☑️
  2. Reload Positron

Connect to Copilot

  1. Ctrl+Shift+PConfigure Language Model Providers
  2. Select GitHub Copilot
  3. Sign in → complete GitHub OAuth

Use

  • Click chat icon in sidebar (or Chat: Open Chat)
  • Type a question → press Enter
  • Also provides inline code completions as you type

Tip

You can also sign in via the Accounts icon (bottom-left of Activity Bar).

What about Claude Code?

Claude Code is an AI coding assistant that calls Anthropic’s Claude API directly — similar to Positron Assistant.

Note

Claude API is not yet approved at WB — currently in review for release next FY.

We access the same Anthropic models (Claude Sonnet/Opus 4.5) through GitHub Copilot.

The LLMs are identical. Differences are only in:

  • The interface (Positron Assistant vs. Claude Code)
  • System instructions for content management

Warning

Claude Code is not designed for data science and lacks the IDE integration of Positron + GitHub Copilot.

Working folders setup and data (1/2)

Do not use OneDrive for coding with Positron during this course! (temporary)

  • Positron is new software for the WB.
  • WB security policies block Positron from writing text files on OneDrive.
  • Do not save your code-in-progress in a OneDrive folder.
  • A new security policy will be implemented on Friday, April 24 (spring meeting freeze).

Step 1 — Create working folders

  • Create a folder C:\WBG\ai\ on your local drive (not OneDrive).

Working folders setup and data (2/2)

Step 2 — Copy exercise templates and data into C:\WBG\ai\ai4coding-practice\ from:

Your local folder structure should look like:

C:\WBG\ai\
├── ai4coding-practice\    ← exercise templates (you write here)
│   ├── ex01..\
│   ├── ex02..\
│   └── ...
└── ai4coding-data\        ← course data (optional)

Example 0: Verify your setup

Quick Example 0 to verify your setup.

  • Open C:\WBG\ai\ai4coding-practice\ex00-positron-test in Positron.
  • Follow instructions in the README.md file to test your setup.

Supporting materials and references

Need Contact
Software installation issues ITHelp@worldbankgroup.org
GitHub / Copilot access github@worldbank.org
WB premium request chargeback github@worldbank.org + manager CC
Course materials worldbank.github.io/ai4coding
Course examples github.com/worldbank/ai4coding-examples
Course data OneDrive (WB only): ai4coding-data

What next?

Example 1: Explore Positron & Copilot

Get familiar with AI assistance features — create a Stata do-file, write code with AI, and execute it in the console.

Pre-recorded self-study (18 min) → Example 1

Example 2: Understand & clean data

Use AI to build a data dictionary, document harmonization, generate modular cleaning code, and verify results.

Full details and prompts → Example 2