{"id":22787031,"url":"https://github.com/kid-sid/chat_with_pdf","last_synced_at":"2025-03-30T15:46:13.886Z","repository":{"id":265866989,"uuid":"896569222","full_name":"kid-sid/chat_with_pdf","owner":"kid-sid","description":"This app can take PDFs from users and based on the PDF texts it can answer user' query from those context.","archived":false,"fork":false,"pushed_at":"2025-02-23T10:00:33.000Z","size":553,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T11:18:06.851Z","etag":null,"topics":["faiss-vector-database","langchain","openai-api","python","rag","sqlite-database"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kid-sid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-30T17:59:01.000Z","updated_at":"2025-02-23T10:00:36.000Z","dependencies_parsed_at":"2025-02-06T11:01:44.380Z","dependency_job_id":null,"html_url":"https://github.com/kid-sid/chat_with_pdf","commit_stats":null,"previous_names":["kid-sid/chat_with_pdf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kid-sid%2Fchat_with_pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kid-sid%2Fchat_with_pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kid-sid%2Fchat_with_pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kid-sid%2Fchat_with_pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kid-sid","download_url":"https://codeload.github.com/kid-sid/chat_with_pdf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246342824,"owners_count":20761939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["faiss-vector-database","langchain","openai-api","python","rag","sqlite-database"],"created_at":"2024-12-12T00:37:50.730Z","updated_at":"2025-03-30T15:46:13.858Z","avatar_url":"https://github.com/kid-sid.png","language":"Python","readme":"# Chat with your own PDF\n\nYou must have came across [chatpdf](www.chatpdf.com) where you can upload your pdf and ask questions to get answers from your PDF file. This repo contains the implementation of a chat bot like chatpdf.com using streamlit as the frontend.\n\nThis code contains RAG architecture which takes your PDF texts as the context and provides answers to your queries.\n\n## **Overview of the architecture**\n\n![RAG Architecture](https://github.com/user-attachments/assets/2ef6b915-27d4-4fc0-9d62-6cdce6afd053)\n\n**Architecture:**\n\nRetrieval part of the model helps to retrieve information from the vector store.\nAugmented part is the augmentation of the data by adding our own custom data by increasing the knowledge base of the LLM.\nGeneration part is used for text completion by using the next word prediction capability of the LLM.\n\nAll the RAG apps follow more or less same type of architure as above diagram.\n\nHere we are uploading a PDF as the step one.\nThen the contents/texts of the PDF are getting extracted from it as the second step.\nLLMs can't take all the texts at once due to their context length limitation, so we created chunks out of those text.\nThen we created vectors of those chunks and stored it in a vector database, in our case it is FAISS.\n\nThen whenever someone asks a question, LLM answers considering vectors stored in the database as the context.\n\n**Credentials screenshot:**\n\n![Signup/Login page](https://github.com/user-attachments/assets/f56dd4fe-a9e5-4367-9d3b-02ced90dc5a3)\n\nNew users need to Signup and then do a login.\n\n**Question answering interface:**\n\n![Chatbot interface](https://github.com/user-attachments/assets/0bb10db0-16a4-4e4b-b905-820f6ee1b463)\n\nShow Query History option will show all the previous queries asked by a user and their answers.\nWe can use Browse File option for uploading the PDF.\nBelow text box is for adding your quer and press enter to get the response.\n\n\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkid-sid%2Fchat_with_pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkid-sid%2Fchat_with_pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkid-sid%2Fchat_with_pdf/lists"}