Skip to content

D-Lab's 2 hour introduction to Vibe Coding for Research. Learn how to make use of modern AI tools to enhance productivity in a rigorous manner appropriate for Academic Research

Notifications You must be signed in to change notification settings

dlab-berkeley/Vibe-Coding-for-Research

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

D-Lab Vibe Coding for Research

Open Workshop Open Slides License: CC BY 4.0

This repository contains the materials for D-Lab's Vibe Coding for Research.

Prerequisites

No pre-requisites for this workshop!

Check out D-Lab’s Workshop Catalog to browse all workshops, see what’s running now, and review prerequisites.

Workshop Goals

This hands-on workshop will teach you how to leverage AI for research coding, with practical demonstrations and comprehensive validation strategies. You will learn the difference between browser-based AI chat interfaces and command-line tools that operate directly in your project environment, understand effective prompting techniques, and discover how to validate AI-generated code through multiple verification strategies. We'll walk through a complete live demo building linear regression from scratch, demonstrate five validation best practices, and address critical considerations including AI failure modes and limitations. Participants will leave with practical skills for using CLI-based AI tools and a robust validation workflow for ensuring the reliability and reproducibility of AI-assisted research code.

Learning Objectives

After completing this workshop, you will be able to:

  1. Install and configure Gemini CLI on Windows, Mac, or Linux, including setting up the GEMINI.md file to provide persistent project context and coding conventions to the AI.

  2. Distinguish between CLI and browser-based AI tools, understanding when to use command-line tools (multi-file projects, iterative testing, autonomous execution) versus web interfaces (quick questions, concept explanation, simple snippets).

  3. Write effective prompts using the CLEAR and CONTEXT frameworks, crafting specific, contextual instructions that include validation requirements and avoid ambiguity that leads to AI shortcuts or errors.

  4. Identify and prevent "sneaky" AI behavior, recognizing when AI substitutes synthetic data, swaps to simpler models, fabricates results, or silently skips errors—and implementing verification strategies to catch these issues.

  5. Apply five validation best practices for AI-generated research code: synthetic data validation (testing with known parameters), theoretical validation (verifying statistical properties), cross-AI validation (getting second opinions), unit test generation (automated edge case testing), and code restructuring with documentation.

  6. Recognize the limitations of AI coding assistants, understanding when not to trust AI code (security-critical applications, novel research methods, domain-specific edge cases) and common failure modes including hallucinated functions, outdated approaches, and subtle logic errors

Installation Instructions

No installation required!

About the UC Berkeley D-Lab

D-Lab works with Berkeley faculty, research staff, and students to advance data-intensive social science and humanities research. Our goal at D-Lab is to provide practical training, staff support, resources, and space to enable you to use R for your own research applications. Our services cater to all skill levels and no programming, statistical, or computer science backgrounds are necessary. We offer these services in the form of workshops, one-to-one consulting, and working groups that cover a variety of research topics, digital tools, and programming languages.

Visit the D-Lab homepage to learn more about us. You can view our calendar for upcoming events, learn about how to utilize our consulting and data services, and check out upcoming workshops. Subscribe to our newsletter to stay up to date on D-Lab events, services, and opportunities.

Contributors

  • Bruno Cittolin Smaniotto
  • Tom van Nuenen

About

D-Lab's 2 hour introduction to Vibe Coding for Research. Learn how to make use of modern AI tools to enhance productivity in a rigorous manner appropriate for Academic Research

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published