Coder Social home page Coder Social logo

shanorino / local-rag-llamaindex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from otman404/local-rag-llamaindex

0.0 0.0 0.0 1.62 MB

Local llamaindex RAG to assist researchers quickly navigate research papers

Home Page: https://otmaneboughaba.com/posts/local-rag-api/

Python 100.00%

local-rag-llamaindex's Introduction

RAG: Research-assistant

Header

This project aims to help researchers find answers from a set of research papers with the help of a customized RAG pipeline and a powerfull LLM, all offline and free of cost.

For more details, please checkout the blog post about this project.

How it works

Project Architecture

  1. Download some research papers from Arxiv
  2. Use Llamaindex to load, chunk, embed and store these documents to a Qdrant database
  3. FastAPI endpoint that receives a query/question, searches through our documents and find the best matching chunks
  4. Feed these relevant documents into an LLM as a context
  5. Generate an easy to understand answer and return it as an API response alongside citing the sources

Running the project

Starting a Qdrant docker instance

docker run -p 6333:6333 -v ~/qdrant_storage:/qdrant/storage:z qdrant/qdrant

Downloading & Indexing data

python rag/data.py --query "LLM" --max 10 --ingest

Starting Ollama LLM server

Follow this article for more infos on how to run models from hugging face locally with Ollama.

Create model from Modelfile

ollama create research_assistant -f ollama/Modelfile 

Start the model server

ollama run research_assistant

By default, Ollama runs on http://localhost:11434

Starting the api server

uvicorn app:app --reload

Example

Request

Post Request

Response

Response

local-rag-llamaindex's People

Contributors

otman404 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.