Coder Social home page Coder Social logo

patw / ragtag Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 0.0 190 KB

A tool for testing RAG functionality with Atlas Vector Search

License: BSD 2-Clause "Simplified" License

Python 63.99% HTML 27.00% Dockerfile 4.51% Shell 4.37% Batchfile 0.14%
atlas mongodb vector

ragtag's Introduction

RAGTAG

A tool for manual RAG chunk entry for question/answer systems. Create, search or edit text chunks paired up with questions to ensure good retrieval for embeddings.

Takes advantage of Atlas Mongo and Atlas Vector Search

RAGTAG allows you to:

  • Create Q/A chunks for use with your chatbots
  • Vectorize chunks with open source embedding models (Instructor-large)
  • Search existing chunks, edit chunk, update embedding and update chatbot in real time
  • Test your chunks for recall by using real questions

RAGTAG UI Screenshot

Installation

pip install -r requirements.txt

Downloading the Mistral 7b model (with dolphin fine tune)

wget https://huggingface.co/TheBloke/dolphin-2.1-mistral-7B-GGUF/resolve/main/dolphin-2.1-mistral-7b.Q5_K_S.gguf

Running App

Copy sample.env to .env and modify with connection string to your Atlas instance

flask run

WARNING: You will need about 20 gigs of ram to run this process! Mistral-7b requires 14 gig with the Q5 quantization, and instructor needs 4 gig on it's own

Atlas Search Index

Create and Atlas Search index, in the Atlas UI under the Search tab for the "chunks" collection under the "ragtag" database.

{
  "analyzer": "lucene.english",
  "searchAnalyzer": "lucene.english",
  "mappings": {
    "dynamic": false,
    "fields": {
      "chunk_answer": {
        "type": "string"
      },
      "chunk_embedding": {
        "dimensions": 768,
        "similarity": "cosine",
        "type": "knnVector"
      },
      "chunk_enabled": {
        "type": "boolean"
      },
      "chunk_question": {
        "type": "string"
      }
    }
  }
}

ragtag's People

Contributors

patw avatar graboskyc avatar

Stargazers

 avatar Tom Mc avatar Artem Riabokon avatar  avatar Chris King avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ragtag's Issues

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.