Skip to content

Completely local "Chat with your Docs" retrieval augmented generation (RAG) application using Cohere's ⌘ R, served locally using Ollama

Notifications You must be signed in to change notification settings

jdax57/Local-RAG-app-using-Cohere-s--R-and-Ollama

 
 

Repository files navigation

Chat with your Docs RAG Application

This project creates a completely local "Chat with your Docs" retrieval augmented generation (RAG) application using Cohere's ⌘ R, served locally using Ollama. It also utilizes the Qdrant vector database (self-hosted) and Fastembed for embedding generation.

Flow Diagram

Key Features

  • High precision on RAG and tool use tasks.
  • Low latency and high throughput.
  • Long 128k-token context length.
  • Strong multilingual capabilities across 10 key languages.

Installation

To set up the project, follow these steps:

  1. Clone the repository.
  2. Install the required dependencies.
  3. Set up Cohere's ⌘ R locally using Ollama.
  4. Configure the Qdrant vector database (self-hosted) (automatically set in LightningAI).
  5. Use Fastembed for embedding generation.

To run Ollama, execute the following command:

ollama serve


After Ollama is running, execute the following command to start the Streamlit app:

```bash
streamlit run app.py

Usage

To run the project, follow these steps:

  1. Install Ollama by following the instructions on their website.
  2. Install the Cohere model for Ollama. You can find the model installation instructions on Cohere's website.
  3. Run Ollama by executing the following command:
ollama serve
  1. After Ollama is running, install the dependencies:
pip install -r requirements.txt
  1. Finally, start the Streamlit app:
streamlit run app.py
  1. Open your web browser and navigate to the Streamlit app URL to interact with the "Chat with your Docs" application.

Dependencies

  • Cohere's ⌘ R
  • Ollama
  • Qdrant vector database
  • Fastembed

Contributing Guidelines

We welcome contributions to the project! Here's how you can contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Make your changes and commit them.
  4. Push your changes to your fork.
  5. Submit a pull request.

Code Standards

Please follow the coding standards and guidelines used in the project.

Issues

If you encounter any issues or bugs, please report them here.

License

This project is licensed under the MIT License.


This version of the README provides clear instructions for installing, running, and contributing to the project.

About

Completely local "Chat with your Docs" retrieval augmented generation (RAG) application using Cohere's ⌘ R, served locally using Ollama

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 57.3%
  • Python 42.7%