Skip to content

misterseyiayeni/retrieval-augmented-generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retrieval-Augmented Generation (RAG) Chatbot

This project implements a chatbot powered by a Retrieval-Augmented Generation (RAG) pipeline using LangChain, NVIDIA Embeddings Model, an LLM (LLaMa model), and FAISS. The RAG system retrieves relevant documents from a vector store (created with NVIDIA Embeddings Model) using FAISS and generates context-aware responses from LLaMa. The solution deploys endpoints for basic and RAG-enabled reasoning and evaluates both conversations using numerical RAG evaluation techniques incorporating LLM-as-a-Judge metrics. The application is deployed as a FastAPI server and integrated with a Gradio frontend for interactive use.

Features

  • Document Retrieval: Uses FAISS for efficient similarity search to retrieve relevant documents.
  • Context-Aware Generation: Leverages LLaMA model to generate responses based on retrieved documents.
  • API Deployment: Exposes the RAG pipeline as RESTful APIs using FastAPI and LangServe.
  • Interactive Frontend: Provides a user-friendly Gradio interface for testing the RAG system.

Technologies Used

  • LangChain: Framework for LLM orchestration, building and chaining components in the RAG pipeline.
  • LLaMa: LLM for text generation.
  • FAISS: Library for efficient similarity search and retrieval of documents.
  • FastAPI: Modern web framework for building APIs.
  • Gradio: Library for creating interactive web interfaces.
  • NVIDIA Embeddings: Used for generating document embeddings.

Project Structure

├── server_app.py              # FastAPI server implementation
├── 08_evaluation.ipynb        # RAG pipeline implementation
├── docstore_index/            # Directory containing the FAISS document store
├── requirements.txt           # Python dependencies
├── README.md                  # Project documentation
└── frontend/                  # Gradio frontend code
  • Basic reasoning Basic

  • RAG RAG

  • RAG evaluation techniques incorporating LLM-as-a-Judge metrics!

1

2

3

4

5

Reference: https://learn.nvidia.com/courses/course-detail?course_id=course-v1:DLI+S-FX-15+V1

About

retrieval-augmented generation

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors