Giter Site home page Giter Site logo

johntan38 / chat-with-pdf-llm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ergv03/chat-with-pdf-llm

0.0 0.0 0.0 15 KB

Chat with your PDFs, built using Streamlit and Langchain. Allows the user to ask questions to a LLM, which will answer based on the content of the provided PDFs.

License: MIT License

Python 100.00%

chat-with-pdf-llm's Introduction

image

Overview:

Simple web-based chat app, built using Streamlit and Langchain. The app backend follows the Retrieval Augmented Generation (RAG) framework.

Allows the user to provide a list of PDFs, and ask questions to a LLM (today only OpenAI GPT is implemented) that can be answered by these PDF documents.

User needs to provide their own OpenAI API key.

Instalation:

Just clone the repo and install the requirements using pip install -r requirements.txt

How to run locally:

Run streamlit run chat_app.py in your terminal.

Add the URLs of the PDF documents that are relevant to your queries, and start chatting with the bot.

How it works:

The provided PDFs will be downloaded and properly split into chunks, and finally embedding vectors for each chunk will be generated using OpenAI service. These vectors are then indexed using FAISS, and can be quickly retrieved.

As the user interacts with the bot, new relevant document chunks/snippets are retrieved and added to the session memory, alongside the past few messages. These snippets and messages are part of the prompt sent to the LLM; this way, the model will have as context not just the latest message and retrieved snippet, but past ones as well.

chat-with-pdf-llm's People

Contributors

ergv03 avatar johntan38 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.