Skip to content

Files

Latest commit

7477a9a · Mar 23, 2025

History

History
69 lines (51 loc) · 2.39 KB

workshop.md

File metadata and controls

69 lines (51 loc) · 2.39 KB

Workshop Blueprint Explanation

I've created a comprehensive codebase that covers all the sections of your workshop. Here's how the code is organized and can be used throughout the workshop:

1. First call to LLM (10 min) - @pavlik

The code includes:

  • A basic OpenAI API call function
  • A simple interactive chat implementation
  • A LangChain example showing conversation memory

This demonstrates the fundamental ways to interact with an LLM and how LangChain can simplify these interactions.

2. Document Retrieval (5 min) - @alex

The code provides functions for:

  • Loading JSON documents
  • Loading CSV files
  • Fetching and parsing RSS feeds (simulated)

These functions show different document sources you can use in a RAG system.

3. Document Splitting (15 min) - @alex

Several text splitting strategies are implemented:

  • Character-based splitting
  • Token-based splitting
  • Paragraph-based splitting
  • Sentence-based splitting

There's also a demo function showing how each strategy affects the resulting chunks for comparison.

4. Document Storage (30 min) - @alex

The code covers:

  • Generating embeddings using OpenAI
  • A simple in-memory vector store with cosine similarity search
  • SQLite integration for document storage
  • ChromaDB integration for vector storage

This demonstrates both DIY approaches and purpose-built vector databases.

5. Retrieve & Summarize (10 min) - @pavlik

Functions for:

  • Basic RAG implementation
  • Document summarization
  • Advanced RAG with more context handling

Plus a complete end-to-end workflow example that ties all sections together.

Workshop Guide

For the actual workshop, I recommend:

  1. Introduction (5 min)

    • Explain RAG concepts and the workshop flow
    • Set up environment variables for API keys
  2. For each section:

    • Present the concept (theory)
    • Show the relevant code examples
    • Let participants run the code
    • Discuss the results and implications
  3. Interactive elements:

    • For @pavlik's practice sessions, have participants modify the code (e.g., changing prompt templates, adjusting chunk sizes)
    • For document storage, compare results from different approaches
  4. Final demonstration:

    • Run the completeWorkshopDemo() function to show the entire workflow
    • Discuss potential optimizations and real-world applications

Would you like me to elaborate on any specific section of the code or workshop structure?