Skip to content

ratulsaha2021/universal-RAG-API-kaggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Universal RAG API

A FastAPI-based Retrieval-Augmented Generation (RAG) API that ingests documents, builds embeddings with SentenceTransformers, stores them in FAISS, and answers questions via a /query endpoint. [file:147]

This repository is designed to match the Generative AI & Chatbot Development: Python Assignment requirements (document ingestion, vector search, and API design). [file:147]


Features

  • Upload documents via /upload:
    • Currently supports: .txt and .pdf (easy to extend to .docx, .csv, images, and databases). [file:147]
  • Extracts and preprocesses text (chunking with overlap). [file:147]
  • Generates embeddings using sentence-transformers/all-MiniLM-L6-v2. [web:56]
  • Stores embeddings in a FAISS vector index for fast similarity search. [web:68]
  • Exposes /query endpoint:
    • Accepts a question and a file_id.
    • Performs vector search and returns a context-based answer plus snippets. [file:147]
  • Clean FastAPI structure ready for extension with OCR and LLM calls.

Project structure

universal-rag-api/
│
├── main.py          # FastAPI app (upload + query + RAG)
├── requirements.txt # Python dependencies
└── README.md        # Documentation

About

FastAPI-based RAG API that can ingest documents, build embeddings in FAISS, and answer questions via a /query endpoint.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors