Skip to content

✨ Starter project for your GenAI RAG application.

Notifications You must be signed in to change notification settings

zaikinv/rag-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



bricks-V9H87YQDET

Minimalistic RAG Starter

Starter project for your GenAI RAG application.



🎬 Demo

The demo is using nonsense made up QuantumFlux software documentation generated by ChatGPT

demo

🛠️ Tech Stack

The project is built using the following open source tools:

📦 Prerequisites

In order to run the app you should have the following installed:

⚙️ Installation

  1. Clone the repository:

    git clone https://github.com/zaikinv/rag-starter.git
    cd rag-starter
  2. Install the dependencies:

    npm i

📊 Ingest the data

  1. Create a docs folder

    mkdir docs
  2. Add your docs to folder.

    🚨 Currently supports .md files only. Adjust packages/scripts/loader if needed.

  3. Run the script

    npm run ingest

🤖 Run Locally

Clone the project

  1. Create .env in the root folder:

    touch .env
  2. Set environment variables in .env:

    OPENAI_API_KEY=
    OPENAI_API_BASE_URL=
    
    VECTOR_STORE_DEFAULT_COLLECTION_NAME=
    VECTOR_STORE_API_KEY=
    VECTOR_STORE_URL=
    
    REDIS_HOST=
    REDIS_PORT=
    
    DOCS_FOLDER_NAME=
    Example
    OPENAI_API_KEY=sk-JsdnaErYVIPuej4kqweT7BmzkGH7FXIDPR6u4fGyUF8W1ET
    OPENAI_API_BASE_URL=https://api.openai.com/v1/
    
    VECTOR_STORE_DEFAULT_COLLECTION_NAME=my-embeddings
    VECTOR_STORE_API_KEY=JsdnaErYVIPuej4kqweT7Bmzk
    VECTOR_STORE_URL=http://localhost:6333
     
    REDIS_HOST=localhost
    REDIS_PORT=6379
    
    DOCS_FOLDER_NAME=docs
  3. Configure the assistant web component:

    <ask-docs-widget
      ui-theme=""
      api-url=""
      vector-store-collection-name=""
      external-source-base-url="">
    </ask-docs-widget>
    Parameter Example Description
    ui-theme light Can be customized in src/styles/themes.scss
    api-url http://localhost:3000 Base URL of Nest backend
    vector-store-collection-name my-embeddings Name of Qdrant collection
    external-source-base-url https://google.com Optional, used to prefix links
  4. Run the containers:

    docker compose -f docker-compose.yml up --build --remove-orphans
  5. Run the app:

    npm run start:all 

About

✨ Starter project for your GenAI RAG application.

Resources

Stars

Watchers

Forks