gitmyhub

GenerativeAIExamples

Jupyter Notebook ★ 4.1k updated 23d ago

Generative AI reference workflows optimized for accelerated infrastructure and microservice architecture.

This repository is a collection of working examples and reference code for building AI applications using NVIDIA's software and models. It focuses on two broad patterns: retrieval-augmented generation, where an AI assistant answers questions by searching a document collection before responding, and agentic workflows, where an AI model calls external tools or APIs to complete tasks rather than answering from memory alone.

The examples are written as Jupyter notebooks and runnable code projects. They use popular developer frameworks such as LangChain, LlamaIndex, and Haystack to connect to NVIDIA's inference services, called NIMs. A NIM is a packaged AI model that you can run locally or access through NVIDIA's cloud API. The quickest way to try the basic retrieval example is to get an API key from NVIDIA's catalog, clone this repository, and run a single Docker command that starts a local chat interface in your browser.

Beyond the basics, the repository covers more advanced topics including multi-turn conversations, working with images alongside text, querying structured data from spreadsheets, breaking complex questions into sub-questions before answering, and building knowledge graphs from large datasets. There are also sections on safety, showing how to add guardrails that block unsafe prompts and how to audit a model for known vulnerabilities.

A section called Data Flywheel shows how to fine-tune a smaller model on real task data, evaluate whether it improved, and add safety constraints, all using NVIDIA's NeMo platform of microservices. Vision-specific workflows cover tasks like monitoring video streams for events, searching image libraries using plain-English descriptions, and extracting text from images.

The project is open to community contributions and is licensed under Apache 2.0.