oreilly-retrieval-augmented-gen-ai

oreilly-retrieval-augmented-gen-ai

See how to augment LLMs with real-time data for dynamic, context-aware apps - Rag + Agents + GraphRAG.

Stars: 52

Visit
 screenshot

This repository focuses on Retrieval-Augmented Generation (RAG) and Large Language Models (LLMs). It provides code and resources to augment LLMs with real-time data for dynamic, context-aware applications. The content covers topics such as semantic search, fine-tuning embeddings, building RAG chatbots, evaluating LLMs, and using knowledge graphs in RAG. Prerequisites include Python skills, knowledge of machine learning and LLMs, and introductory experience with NLP and AI models.

README:

Retrieval-Augmented Generation (RAG) and LLMs

Welcome to the "Retrieval-Augmented Generation (RAG) and LLMs" code repository! In this repo, we begin to understand how to augment large language models with real-time data for dynamic, context-aware apps.

Much of the code in these sessions will be featured in the 2nd edition of my latest book on LLMs:

A Quick Start Guide to LLMs

so if you're itching for more, check it out and please leave a rating/review to tell me what you thought :)

For even more, check out my Expert Playlist!

Prerequisites

  • Basic to Intermediate Python Skills: A solid understanding of Python is essential, as it will be the primary programming language used for demonstrating RAG integration with LLMs and handling real-time data.
  • Foundational Knowledge in Machine Learning and LLMs: Familiarity with basic machine learning concepts is crucial. Additionally, having some prior knowledge of Large Language Models will be beneficial, as we will delve into more advanced topics related to augmenting these models with RAG.
  • Introductory Experience with NLP and AI Models: A basic grasp of Natural Language Processing (NLP) and general AI model concepts will aid in understanding how RAG enhances the capabilities of these technologies in dynamic and evolving data environments.

Installation

  1. Clone this repository to your local machine.
  2. Ensure you have set the following api keyes:

You're all set to explore the notebooks!

Usage - Jupyter Notebooks

This project contains several Jupyter notebooks each focusing on a specific topic:

  1. RAG - Retrieval: An introduction to vector databases, embeddings, and retrieval

  2. RAG - Generation: Building a RAG chatbot using our semantic search retrieval system

  3. Advanced - GraphRAG - A simple introduction to GraphRAG (RAG using a knowledge graph) using Neo4J, Cohere's Re-Rank, GPT-4o, and a touch of Langchain

References

  1. Open-source models built for RAG - Command-R by Cohere

  2. Neo4J's GraphRAG Manifesto

  3. A quick-start guide to GraphRAG with LangChain - inspired part of my GraphRAG code

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Book time with me on Intro!

If you have questions, I'm available on Intro :)

Book time with me on Intro

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for oreilly-retrieval-augmented-gen-ai

Similar Open Source Tools

For similar tasks

For similar jobs