GithubHelp home page GithubHelp logo

rag's Introduction

Introduction

This is an implemenation of a retrieval augmented generation (RAG) system built to run locally on systems. It consists of a console application and a library. This implementation using sqlite to store data.

Building

  1. cd rag-console
  2. cargo build --release

Running

  1. You may need the following libraries
  • vector0 and vss0 downloaded from here
  1. llama-2-7b-chat is used by default however you may also need any llm model in *.gguf format in the list here. here

Loading knowledge

See help information for loading information into the database.

$rag-console train --help
Usage: rag-console train [OPTIONS]

Options:
  -d, --database <DATABASE>        specifies the database file to use [default: data.db]
  -s, --sources <SOURCES>...       specifies sources to be loaded
  -v, --vectorsize <VECTORSIZE>    [default: 384]
  -t, --tablename <TABLENAME>      [default: document]
  -c, --chunksize <CHUNKSIZE>      [default: 512]
  -z, --contextsize <CONTEXTSIZE>  [default: 4096]
  -h, --help                       Print help

Asking questions

See help information for interracting with model.

rag-console console --help
Usage: rag-console console [OPTIONS]

Options:
  -d, --database <DATABASE>
          specifies the database file to use [default: data.db]
  -m, --model <MODEL>
          specifies the model to be used [default: llama-2-7b-chat.gguf]
  -v, --vectorsize <VECTORSIZE>
          [default: 384]
  -t, --tablename <TABLENAME>
          [default: document]
  -c, --chunksize <CHUNKSIZE>
          [default: 512]
  -z, --contextsize <CONTEXTSIZE>
          [default: 4096]
      --min_type_delay <MINTYPEDELAY>
          [default: 50]
      --max_type_delay <MAXTYPEDELAY>
          [default: 100]
  -r, --retrieve_doc_count <RETRIEVEDOCCOUNT>
          [default: 5]
  -h, --help
          Print help

rag's People

Watchers

Daniel Osei 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.