Giter VIP home page Giter VIP logo

rahmanazhar / agentic-rag-chatbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 60 KB

This project is a retrieval-augmented generation (RAG) chatbot that leverages Qdrant for vector storage and retrieval, Ollama for language model interactions, and SentenceTransformers for generating embeddings. The chatbot can store user inputs, retrieve relevant documents, and generate contextually appropriate responses.

Home Page: https://hiroshiaki.com

Dockerfile 1.25% Python 43.92% JavaScript 34.57% CSS 20.26%

agentic-rag-chatbot's Introduction

agentic-rag-chatbot

Description

This project is a retrieval-augmented generation (RAG) chatbot that leverages Qdrant for vector storage and retrieval, Ollama for language model interactions, and SentenceTransformers for generating embeddings. The chatbot can store user inputs, retrieve relevant documents, and generate contextually appropriate responses.

Setup

Environment Setup

  1. Create a virtual environment:

    python -m venv venv #or python3 -m venv venv
    source venv/bin/activate
  2. Install the required packages:

    pip install -r requirements.txt

Docker Setup

  1. From the root directory, run Docker Compose:

    docker-compose up --build
  2. Run Ollama:

    ollama run llama2

Usage

  1. Start the Flask app:

    python app.py
  2. Access the chatbot at:

    http://localhost:3003
    

Qdrant Collection Setup

To create the rag-chatbot collection in Qdrant, use the following Python script:

from qdrant_client import QdrantClient

client = QdrantClient(host='db', port=6333)

# Define the schema for the collection
schema = {
    "vectors": {
        "size": 384,  # Size of the vectors from the embedding model
        "distance": "Cosine"  # Distance metric for vector similarity
    }
}

# Create the collection
client.create_collection(
    collection_name="rag-chatbot",
    vectors_config=schema
)

agentic-rag-chatbot's People

Contributors

rahmanazhar avatar lizardglobal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.