From Chaos to 4.0: My Ultimate Study Stack Using Obsidian and Gemini Pro

How I use Obsidian's file structure and Gemini Pro's massive context window to turn lecture slides into interactive study guides and practice tests.

Introduction

Engineering school is less about how much you can memorize and more about how quickly you can synthesize a mountain of technical data. In a single week of my System Architecture or Statistics courses, I might deal with 200+ slides, three textbook chapters, and a dozen handwritten diagrams. The bottleneck isn't the information—it's the retrieval.

I’ve spent the last few semesters perfecting a workflow that treats my course materials like a queryable database rather than a stack of papers. By combining Obsidian as my structured "Second Brain" and Google’s Gemini 3 Pro for its massive context window, I’ve built a system that generates tailored study guides, practice exams, and lecture summaries in seconds.

If you’re tired of "Ctrl+F" being your only study strategy, here is how to build an AI-powered knowledge hub for your degree.

The Foundation: My Obsidian Setup

Before we dive into the configuration, you’ll need to have the app itself. You can download and install Obsidian here for free.

Obsidian is the hub where everything lives. It's a Markdown-based note-taking app, with powerful extensibility. While you can use it right out of the box, a few customizations turn it from a text editor into a powerful IDE for studying.

I use the Things theme for a clean look, but the real power lies in the plugins. None of these are strictly essential for the workflow, but they improve the quality of life significantly:

  • Copilot: A built-in AI chatbot for quick, rapid-fire questions within the vault.

  • Editing Toolbar: Great for formatting quickly, especially on a touchscreen.

  • Excalidraw & Ink: Allows for inline handwriting and diagramming inside my notes.

  • LaTeX Suite: Essential for editing math formulas quickly.

  • Paste Image Rename: Keeps my file attachments organized automatically.

  • Omnisearch: A powerful search engine for the vault that indexes text inside images and PDFs.

  • Self-hosted LiveSync: Advanced users only—this runs on a CouchDB instance for instant syncing across devices.

image.png.

The Architecture: Organizing the Chaos

The goal is to take any file provided by a professor and store it in one central hub. If a file exists for the class, it lives in my vault. This ensures that when I need to study, I'm not hunting for files; I'm just querying my own database.

My file structure is strictly hierarchical:

  1. Vault per Semester: e.g., "School Spring 2026".

  2. Root Directory:

    • Class Folders (e.g., CMPSC 455, STAT 414)

    • Helpful Prompts (Quick access to my AI instructions)

    • Ink (Handwritten notes storage)

    • Pasted Images

  3. Class Folder Structure:

Each class folder is standardized. This consistency is crucial when you are switching between subjects mentally.

graph TD
  Root["/ CMPSC 455"] --> Exam["/ Exam Review"]
  Root --> HW["/ Homework"]
  Root --> Slides["/ Lecture Slides"]
  Root --> Notes["/ Lectures"]
  
  Exam --> E1["Exam 1"]
  E1 --> SG["Study Guide"]
  E1 --> PT["Practice Exam"]
  
  HW --> HWI["/ Instructions (PDFs)"]
  HW --> HWE["/ Export (PDFs)"]
  HW --> HWW["Assignment 1"]
  
  Slides --> PDF1["lecture_01.pdf"]
  Notes --> LEC1["Lecture 1: Intro to MATLAB.md"]

image.png.

The Brain: Integrating Gemini AI

This is where the magic happens. I don't just "ask AI" random questions. I treat different models like different employees.

The Models

These are freely available on Google's AI Studio

  • Gemini Flash (gemini-3-flash-preview): I use this for speed. It powers my sidebar chatbot (via the Copilot plugin) for quick clarifying questions or converting PDF homework instructions into Markdown templates.

  • Gemini Pro (gemini-3-pro-preview): This is the heavy lifter. It has a massive context window (up to 2 million tokens), which means I can upload every single lecture slide, textbook chapter, and syllabus relevant to an exam in one go.

The Meta-Prompting Strategy

To get high-quality study guides, I don't trust a single prompt. I use a "Meta-Prompting" strategy. I actually use ChatGPT to help me write and refine the prompts I feed into Gemini. This ensures the output follows my specific formatting rules (Markdown, LaTeX for math, Mermaid for diagrams).

Here are the four pillars of my prompting system.

1. The Meta-Prompt (ChatGPT)

I use this to generate the instructions for Gemini. It defines the persona and the strict formatting requirements.


Write a prompt for Google Gemini. I will provide all of the content (slides, homeworks, etc) relevant to this exam. Give me all of the concepts I need to know. Elaborate on everything. I should be able to go from knowing nothing to knowing everything I need. This will be imported into Obsidian, so leave a space for me to provide formatting rules. The exam "CMPSC 461 Midterm 1" covering the following topics:

Lexical Analysis
• Create Regular Expression
• Write down the set of strings recognized by the given regular expression
• Design NFA and DFA for given set of strings
• Convert Regular expression to DFA/NFA
Syntax Analysis
• Constructing Grammar (Context-free, BNF, EBNF)
• Leftmost and Right most derivation
• Top-down and Bottom-up parsing
• Ambiguous Grammar
• Convert Ambiguous to Unambiguous grammar
• Abstract Syntax Tree
• First, Follow, and Parsing Table
Name, Scope and Bindings
• Lifetime, Scope and binding of variable
• Understanding Stack(including call stacks), Heap and Static Data Segments
• Static and dynamic scope
• Constructing Symbol tables
• Shallow and Deep binding
• Static and dynamic link with call stacks

2. The Study Guide Prompt

Once I have refined the instructions, I upload my class files to Gemini Pro and use this prompt to generate a comprehensive study guide.


# CMPSC 461 Midterm 1 Master Study Guide

You are an expert **Computer Science educator and compiler theory instructor**.  
I will provide you **all source material** for this exam (lecture slides, homework problems, notes, examples, and any other documents). Your task is to produce a **complete, self-contained study guide** that teaches me **everything I need to know from scratch** to fully prepare for **CMPSC 461 – Midterm 1**.

---

## Core Requirements

- Assume I am starting with **no prior knowledge**
- Use the provided materials as the **authoritative source**
- **Elaborate deeply** on every concept
- Explain **why**, not just **what**
- Include:
  - Clear definitions
  - Step-by-step explanations
  - Intuition and mental models
  - Common pitfalls and misconceptions
  - Worked examples
  - Practice problems with solutions
- Tie concepts together across sections when relevant
- Use precise terminology consistent with compiler theory

---

## Output Structure Requirements

- Organize the guide into **clear sections and subsections**
- Each major topic should be **self-contained**
- Use consistent terminology throughout
- Make the document suitable for **long-term reference**
- Assume the output will be imported into **Obsidian**

---

## FORMATTING RULES

1. **General Formatting**
    
    - Use standard Obsidian Markdown syntax with clear structure, headings, and bullet points.
        
    - Expand on slide content with additional explanations, definitions, or context when helpful.
        
    - Maintain an academic tone suitable for lecture notes.
        
	- LaTeX for Equations:
	    - For **inline** math, use single dollar signs: `$ E = mc^2 $`
	    - For **block** math, use double dollar signs on their own lines. **Never** wrap block math in fenced code blocks.
	      Example of correct formatting:
	      $$
	      \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
	      $$
	- Code Blocks:
	    - Use fenced code blocks (triple backticks) **only** for programming code, pseudocode, or terminal commands. Specify the language when possible, e.g.:
        
        ```python
        def example():
            return True

        ```
        
2. **Slide References**
    
    - For each main section, include a reference to the slide using:  
        `[[filename#page=page]]`
        
3. **Visuals and Diagrams**
    
    - If the slide includes an important visual (diagram, graph, or figure), ensure it appears inline with:  
        `![[filename#page=page]]`
        
    - When a concept benefits from a diagrammatic explanation, include a **valid Mermaid chart**. Pay close attention to quoting text that contains special characters (e.g., ( ), [ ], { }, ,) in subgraph titles and node labels to prevent parsing errors. For example, use subgraph "Title with (parentheses)" and A["Node with [brackets]"]. Example:
        
        ```mermaid
        graph TD
          A[Input] --> B[Process]
          B --> C[Output]

        ```

---

## Exam Coverage (YOU MUST COVER ALL ITEMS BELOW)

### 1. Lexical Analysis

Explain lexical analysis from first principles and its role in a compiler.

Cover **in detail**:
- What lexical analysis is and why it exists
- Tokens, lexemes, patterns
- Relationship between lexical analysis and syntax analysis

#### Regular Expressions
- Syntax and semantics of regular expressions
- Operators (`|`, `*`, `+`, `?`, concatenation, grouping)
- Precedence and associativity
- Practical examples of regex used in lexical analyzers

**You must be able to:**
- Create regular expressions for given languages
- Given a regular expression, list the **exact set of strings it recognizes**
- Explain edge cases and ambiguous matches

#### Finite Automata
- Deterministic vs Non-deterministic Finite Automata (DFA vs NFA)
- Formal definitions (states, alphabet, transitions, start/accept states)
- ε-transitions and their meaning

**You must be able to:**
- Design an NFA and DFA for a given set of strings
- Convert:
  - Regular Expression → NFA
  - NFA → DFA
- Explain subset construction clearly
- Trace strings through automata step by step

---

### 2. Syntax Analysis

Explain syntax analysis and how it builds structure from tokens.

#### Grammars
- Context-Free Grammars (CFGs)
- Formal definitions
- Terminals vs non-terminals
- Production rules
- Start symbols

#### Grammar Notations
- BNF
- EBNF
- Differences, advantages, and when to use each

**You must be able to:**
- Construct grammars for given languages
- Convert informal language descriptions into formal grammars

#### Derivations
- Leftmost derivation
- Rightmost derivation
- Parse trees
- Relationship between derivations and parsing

#### Parsing Techniques
- Top-down parsing
- Bottom-up parsing
- High-level intuition and formal mechanisms
- When each approach succeeds or fails

#### Ambiguity
- What ambiguous grammars are
- Why ambiguity is a problem
- Identifying ambiguity using parse trees and derivations

**You must be able to:**
- Detect ambiguous grammars
- Convert ambiguous grammars into unambiguous ones

#### Abstract Syntax Trees (ASTs)
- Difference between parse trees and ASTs
- Why ASTs are used
- How ASTs represent program structure

#### FIRST, FOLLOW, and Parsing Tables
- Definitions and intuition
- How to compute FIRST sets
- How to compute FOLLOW sets
- Constructing parsing tables
- Detecting conflicts

---

### 3. Name, Scope, and Bindings

Explain how programming languages manage variables and memory.

#### Variables
- Name, binding, scope, and lifetime
- Differences between scope and lifetime
- Examples across languages

#### Memory Organization
- Stack
- Heap
- Static data segment

Explain:
- What goes where
- When memory is allocated and deallocated
- How function calls affect memory

#### Scope Rules
- Static (lexical) scope
- Dynamic scope
- How variable lookup works in each
- Examples and comparisons

#### Symbol Tables
- Purpose of symbol tables
- What information they store
- How they are constructed
- How they change during compilation

#### Binding Strategies
- Shallow binding
- Deep binding
- When and why each is used

#### Runtime Stack Mechanics
- Call stacks
- Activation records (stack frames)
- Static links
- Dynamic links

Explain:
- How function calls and returns work
- How scopes are resolved at runtime
- How links enable variable access

---

## Pedagogical Expectations

- Use diagrams (described textually if needed)
- Include **walkthroughs** of complete examples
- Explicitly connect theory to implementation
- Include **exam-style questions** and solutions for each major topic

---

## Final Goal

By the end of this study guide, I should be able to:
- Confidently solve **any problem** related to CMPSC 461 Midterm 1
- Explain every concept clearly to someone else
- Recognize and avoid common mistakes
- Move from **zero knowledge → full mastery**

Begin generating the study guide only after I provide all materials.

3. The Note Taker Prompt

I use this when I want to convert a specific lecture slide deck into a readable Markdown note.


The file I am providing is "{FILENAME}.pdf"

You are an academic note-taking assistant. For every lecture slide deck I provide, create clear and detailed **Obsidian-formatted Markdown notes**.

Follow these instructions precisely:

1. **Start of Notes**
    
    - Begin with an inline preview of the slide deck using the format:  
        `![[filename]]`
        
2. **General Formatting**
    
    - Use standard Obsidian Markdown syntax with clear structure, headings, and bullet points.
        
    - Expand on slide content with additional explanations, definitions, or context when helpful.
        
    - Maintain an academic tone suitable for lecture notes.
        
	- LaTeX for Equations:
	    - For **inline** math, use single dollar signs: `$ E = mc^2 $`
	    - For **block** math, use double dollar signs on their own lines. **Never** wrap block math in fenced code blocks.
	      Example of correct formatting:
	      $$
	      \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
	      $$
	- Code Blocks:
	    - Use fenced code blocks (triple backticks) **only** for programming code, pseudocode, or terminal commands. Specify the language when possible, e.g.:
        
        ```python
        def example():
            return True

        ```
        
3. **Slide References**
    
    - For each main section, include a reference to the slide using:  
        `[[filename#page=page]]`
        
4. **Visuals and Diagrams**
    
    - If the slide includes an important visual (diagram, graph, or figure), ensure it appears inline with:  
        `![[filename#page=page]]`
        
    - When a concept benefits from a diagrammatic explanation, include a **valid Mermaid chart**. Pay close attention to quoting text that contains special characters (e.g., ( ), [ ], { }, ,) in subgraph titles and node labels to prevent parsing errors. For example, use subgraph "Title with (parentheses)" and A["Node with [brackets]"]. Example:
        
        ```mermaid
        graph TD
          A[Input] --> B[Process]
          B --> C[Output]

        ```
        
5. **Content Expansion**
    
    - Expand briefly on key ideas using reliable academic context (e.g., explain algorithms, summarize proofs, provide short derivations).
        
    - Clarify ambiguous terms or summarize implied concepts if the slide is incomplete.
        
    - Add examples, applications, or intuitive explanations when useful.
        
6. **Output**
    
    - Produce a single, cohesive Obsidian Markdown note for all slides provided.
        
    - The notes should be visually clean, logically structured, and immediately ready for use.
        
    - Do **not** include metadata, titles, emojis, or extra commentary—just formatted notes with LaTeX, code, Mermaid, and proper slide previews.

4. The Homework Template Prompt

This converts a professor's PDF assignment into a clean Markdown structure where I can type answers or use Ink to hand-draw solutions.


The file I am providing is "{FILENAME}.pdf"

You are a document conversion assistant. Your task is to convert a provided homework assignment (in PDF format) into a reusable, blank homework template.

**Primary Directive: IGNORE ALL ANSWERS.**

Your goal is to strip out all provided solutions, leaving only the questions, instructions, and their surrounding structure intact. The final output must be a clean, well-formatted template ready for a student to fill out from scratch.

Follow these instructions precisely:

1.  **Input File:**
    *   I will provide a homework PDF. The filename should be referenced in the output where appropriate (e.g., for embedded previews).

2.  **Output Format:**
    *   The output must be in **Obsidian-formatted Markdown**.
    *   Retain all original questions, sub-questions, introductory text, and point values (e.g., `(20 pts.)`).

3.  **Structural Elements:**
	*  **Begin output with:**
| **Name**    | Aiden Johnson |
| ----------- | ------------- |
| **User ID** | {ID}       |
![[{FILENAME}}]]
    *   **Start:** Ignore instructions at the top of the document. Just include questions after embedding the document.
    *   **Page Breaks:** Before each question (including the first), insert a page break using `<div style="page-break-after: always;"></div>`.
    *   **Questions:** Each question title should be in H3 font (###). If a point value is given in brackets (e.g. [15 pts]), make sure to break out using a backslash (\) before the brackets. 
    *   **Answer Sections:** For every question or sub-question, create an `**Answer:**` heading but leave the space after it completely blank.

4.  **Content Formatting:**
    *   **LaTeX for Math:** All mathematical formulas and variables must be correctly enclosed in LaTeX syntax.
        *   Inline math: `$ E = mc^2 $`
        *   Block math: `$$ \int f(x) dx $$`
    *   **Mermaid for Graphs:** If the original question contains a diagram that can be represented as a flowchart, graph, or sequence, convert it into a valid Mermaid chart within a `mermaid` code block. Pay close attention to quoting text that contains special characters (e.g., ( ), [ ], { }, ,) in subgraph titles and node labels to prevent parsing errors. For example, use subgraph "Title with (parentheses)" and A["Node with [brackets]"].
    *   **Code Blocks:** Any programming code, pseudocode, or algorithms presented in the questions should be placed in fenced code blocks with the appropriate language specifier.
    *   **Images:** Retain all embedded image links in their original Obsidian format (e.g., `![[image-name.png]]`).

The final output should be a single, cohesive Markdown document that perfectly mirrors the structure of the original assignment, minus any solutions.

Workflow: Inline PDF Rendering

One of Obsidian's "killer features" for students is inline PDF linking. Instead of just referencing a file, I can embed specific pages of a lecture slide directly next to my notes.

If Gemini references a diagram on Slide 14, I can render just that slide.

Example: C Structure Alignment

Here is a snippet from my notes on CMPSC 473. Notice how I link specific pages to visualize the memory layout.

![[lecture2.pdf]] 

# C Refresher: Structure Alignment 
[[lecture2.pdf#page=2]] 

In C, the memory layout of a structure is not simply the sum of the sizes 
of its members. The compiler inserts padding to ensure that each member 
is properly aligned in memory according to the CPU architecture.

### Example
Consider the following structure:

     ```c
     struct {
         char a;
         int b;
         char c;
         short d;
         char e;
     };

     ```

**Memory Layout Visualization:**
![[lecture2.pdf#page=2]]

1. **a (char)** takes byte 0.
2. **b (int)** requires 4-byte alignment. It cannot start at byte 1. 
   The compiler inserts 3 bytes of padding.

image.png.

The Output: Export to PDF

At the end of the day, I still need to submit assignments. Because my homework templates are in Markdown, I can use Obsidian's "Export to PDF" feature (available by clicking CTRL + P).

This converts my typed code, LaTeX math formulas ($E = mc^2$), and even the handwritten diagrams I drew with the Ink plugin into a professional-looking PDF document. It matches the visual style of my Obsidian theme, making my submissions look cleaner than standard Word docs.

While I can't provide one of my completed assignments, I can provide an sample exported lecture note.

Key Takeaways

  • Centralize Everything: Your file structure is your sanity. Keep every PDF, image, and note in one vault.

  • Use the Right Model: Use Gemini Flash for speed and Gemini Pro for massive context (reading entire textbooks/slide decks).

  • Meta-Prompt: Don't just ask AI to "make a study guide." Use AI to write a prompt that enforces your formatting and structure.

  • Link, Don't Copy: Use Obsidian's inline PDF linking to reference source material without cluttering your notes.

Conclusion

This workflow has transformed how I learn. Instead of spending hours organizing binders or searching for that one slide about "memory alignment," I spend my time actually studying. I have a system where I can feed raw data in and get structured knowledge out.

If you're a student or a teacher, I highly recommend trying out the Gemini Pro context window with your own materials.