Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# RAGify

## Overview

RAGify is a powerful framework for implementing Retrieval-Augmented Generation (RAG) systems using OpenAI's models and ChromaDB for embedding storage and retrieval. This approach combines the strengths of large language models (LLMs) with a retrieval system, allowing the model to generate informed responses based on specific data or knowledge bases.

## What is Retrieval-Augmented Generation?

Retrieval-Augmented Generation is a method that enhances the capabilities of generative models by integrating an external knowledge retrieval mechanism. This allows the model to access up-to-date and relevant information during the response generation process, significantly improving the quality and accuracy of the outputs.

### Key Features

- **Dynamic Knowledge Retrieval:** Access and utilize specific datasets or documents to inform responses.
- **Seamless Integration:** Built-in support for OpenAI's language models and embedding functions.
- **User-Friendly Interface:** An intuitive Streamlit application for easy interaction.

## Use Cases

RAG is particularly useful for various applications, including:

- **Question & Answer Systems:** Answer user queries with specific, domain-related information. This is ideal for knowledge bases, customer support systems, and educational platforms.
  
- **Intelligent Search:** Provide users with enhanced search capabilities that return contextually relevant answers rather than just document links.

## Getting Started

### Prerequisites

- Python 3.8 or higher
- Access to OpenAI API (an API key)
- ChromaDB for embedding storage

### Installation

1. Clone the repository:
   ```bash
   git clone https://github.com/bdeva1975/RAGify.git
   cd RAGify
  1. Install the required packages:

    pip install -r requirements.txt
  2. Set up your environment variables: Create a .env file in the root directory of the project and add your OpenAI API key:

    OPENAI_API_KEY=your_openai_api_key
    

Running the Application

  1. Launch the Streamlit application:

    streamlit run rag_app.py
  2. Open your web browser and go to http://localhost:8501 to interact with the RAGify application.

Code Structure

  • rag_lib.py: This module contains the core logic for RAG, including functions for managing collections, querying embeddings, and generating responses using OpenAI.

  • rag_app.py: The Streamlit application that serves as the user interface for interacting with the RAG system.

Usage

  1. Input Your Query: Type a question in the provided text area.

  2. Generate Response: Click the "Go" button to retrieve an answer. The system will fetch relevant documents and provide an answer based on the retrieved information.

  3. View Search Results: Expand the section to see the documents used to generate the answer.

Contributing

We welcome contributions to enhance RAGify! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Make your changes and commit them (git commit -m 'Add your feature').
  4. Push to your branch (git push origin feature/YourFeature).
  5. Open a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • OpenAI for their powerful language models.
  • ChromaDB for providing an excellent embedding storage solution.

Feel free to modify any sections to better fit your project's specifics or add any additional information you think is necessary!

About

RAGify is a Retrieval-Augmented Generation framework that integrates OpenAI's models with ChromaDB for dynamic knowledge retrieval. Perfect for question-and-answer systems and intelligent search, it provides accurate responses through an intuitive Streamlit interface.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages