Skip to content

A Full RAG Application to query Documents and Database locally.

License

Notifications You must be signed in to change notification settings

Animo-GD/Local-RAG-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Privacy-focused RAG system that runs entirely offline:

  • using Ollama LLMs.
  • Implemented LangGraph to orchestrate an intelligent workflow that switches between
  • Vector Search (PDF/TXT) and SQL generation based on query intent.

Tools

  • Python (FastAPI,LangChain, LangGraph, DSPy)
  • JavaScript, TailwindCSS, REACT.JS
  • Ollama Local Models
  • PostMan

API's

  1. /api/query
  2. /api/document
  3. /api/upload
  4. /api//tables
  5. /api/health

Workflow (LangGraph)

workflow

Screenshots

screenshot screenshot2

Setup

Download OLLAMA and PULL Model

  1. Download and install Ollama Locally from here
  2. Pull The Model llama3.1:8b
ollama pull llama3.1:8b

Setup Environment Variable.

  1. Rename .env.example to .env.
cp .env.example .env
  1. Setup Your Variables.
  • You can pull any model you want, but you will have to change LLM_MODEL = Your Model Name
  • You can direct DATABASE_PATH to your local database by using the absolute path.

Install Requirements

  1. Make a virtual environment and activate it.
python -m venv .venv
./.venv/Scripts/activate
  1. Install requirements inside the venv.
pip install -r requirements.txt

Install Node.js

  1. Download and install Node.Js from here
  2. Make sure you installed it by using this command.
npm --version

Install React.JS

cd frontent
npm i

Run the system.

Open Two Terminals

  1. Run the FASTAPI Services.
cd backend
uvicorn main:app --reload --host 0.0.0.0 --port 5000
  1. Run the REACT Frontend
cd frontend
npm run
  1. Access Application from here http://localhost:5173/

About

A Full RAG Application to query Documents and Database locally.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published