Testing GenAI applications in Go
summary
Compares a direct LLM answer vs RAG using langchaingo and Testcontainers Go, spinning Olama-based models and a Weaviate vector DB in containers; bundles Llama 3.2 (~8–7 GB) and all‑mini (~5 GB) images on Docker Hub. Ingests 51 documents, finds 3 relevant docs, and uses a cosine similarity threshold of 0.8 (example result 0.699 fails). Adds an evaluator LM driven by a strict system prompt that returns structured JSON yes/no, demonstrating one test fails and the RAG-enhanced flow passes. langchaingo and Testcontainers Go are the core tools.
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker background
- 1:03Mental model for GenAI testing
- 3:13Testing cloud applications with emulators
- 6:42Lanchain Go for GenAI in Go
- 9:58Ollama for local LLM management
- 11:22Testcontainers Go for dependency management
- 13:56Demo workflow with containers
- 14:59Testing nondeterministic LLM responses
- 18:08Cosine similarity for response validation
- 21:15Evaluators as LM-as-a-judge
- 23:43Conclusions and key takeaways
