{"id":19379250,"url":"https://github.com/praadnya/rag-for-q-a","last_synced_at":"2026-05-15T17:07:29.554Z","repository":{"id":254046606,"uuid":"845326175","full_name":"Praadnya/RAG-for-Q-A","owner":"Praadnya","description":"End-to-end Retrieval-Augmented Generation (RAG) pipeline for PDF-based question answering, utilizing FAISS for efficient vector search, LangChain for orchestration, and LLMs for generating accurate responses","archived":false,"fork":false,"pushed_at":"2024-08-21T03:26:14.000Z","size":1121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T16:32:13.841Z","etag":null,"topics":["question-answering","rag","textgeneration"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Praadnya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T03:13:10.000Z","updated_at":"2024-09-15T10:59:50.000Z","dependencies_parsed_at":"2024-08-21T06:15:30.928Z","dependency_job_id":null,"html_url":"https://github.com/Praadnya/RAG-for-Q-A","commit_stats":null,"previous_names":["praadnya/rag-for-q-a"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Praadnya/RAG-for-Q-A","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Praadnya%2FRAG-for-Q-A","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Praadnya%2FRAG-for-Q-A/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Praadnya%2FRAG-for-Q-A/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Praadnya%2FRAG-for-Q-A/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Praadnya","download_url":"https://codeload.github.com/Praadnya/RAG-for-Q-A/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Praadnya%2FRAG-for-Q-A/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33072994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["question-answering","rag","textgeneration"],"created_at":"2024-11-10T09:09:32.738Z","updated_at":"2026-05-15T17:07:29.535Z","avatar_url":"https://github.com/Praadnya.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDF Document Q\u0026A with RAG\n\nThis project is a Streamlit-based application that allows users to upload PDF documents and ask questions about the content. It uses a Retrieval-Augmented Generation (RAG) pipeline to provide accurate answers by leveraging embeddings and a vector database. The pipeline includes steps for document reading, chunking, embedding, vector storage, and language model inference.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Technologies Used](#technologies-used)\n- [Project Structure](#project-structure)\n\n\n## Overview\n\nThis application reads a PDF document, extracts its text, and processes it into chunks suitable for embedding. The chunks are then embedded using a pre-trained model and stored in a vector database. When a user inputs a query, the application retrieves the most relevant chunks based on the query's embedding and generates an answer using a language model.\n\n## Features\n\n- **PDF Document Processing:** Extract text and paragraphs from PDF files.\n- **Text Chunking:** Divide documents into manageable chunks for embedding.\n- **Embeddings Generation:** Use a pre-trained Hugging Face model to generate embeddings.\n- **Vector Database:** Store and retrieve document chunks using FAISS for efficient similarity search.\n- **Language Model Inference:** Generate answers using a pre-trained language model based on retrieved chunks.\n- **Streamlit Interface:** Easy-to-use web interface for uploading documents, entering queries, and displaying results.\n\n## Technologies Used\n\n- **Python**: Core programming language.\n- **Streamlit**: For building the web application interface.\n- **PyPDF2**: To extract text from PDF documents.\n- **LangChain**: For text chunking and embeddings management.\n- **FAISS**: For efficient similarity search in the vector database.\n- **Hugging Face Transformers**: For embedding generation and language model inference.\n- **DistilBART**: Pre-trained model used for generating answers.\n\n## Project Structure\n\n```plaintext\n.\n├── adapter.py         # Handles text chunking and preparation for embedding.\n├── embedder.py        # Manages embedding generation using Hugging Face models.\n├── reader.py          # Extracts text and paragraphs from PDF documents.\n├── vector_db.py       # Manages the FAISS-based vector database for storing and retrieving embeddings.\n├── app.py             # Main Streamlit application file.\n└── README.md          # Project documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraadnya%2Frag-for-q-a","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpraadnya%2Frag-for-q-a","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraadnya%2Frag-for-q-a/lists"}