Skip to content

DocTalk: AI Chat for Documents! DocTalk is a Python application powered by LangChain and llama3 that lets you have a conversation with your documents!

License

Notifications You must be signed in to change notification settings

cleversonledur/doctalk-pdf-langchain-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Doctalk PDF

This project is a Question-Answering system that uses the llama3 model to answer questions from a PDF document. It uses the gpt4all embedding model to generate embeddings for the questions and the document. The embeddings are then used to retrieve the most relevant paragraphs from the document using RAG and added to the context of the llama3 model to generate the answer.

Example

Setup ollama and llama3 locally

  1. Download and install ollama instructions here.
  2. Download and run the llama3 model instructions here.

Installation

Clone the repository:

git clone https://github.com/cleversonledur/doctalk-pdf-langchain-rag.git

cd doctalk-pdf-langchain-rag

Install the dependencies:

pip install -r requirements.txt

Usage

Run the following command to start the program:

python main.py -f <path_to_pdf_file>

Depending on the size of the PDF file, it may take a few minutes to load the document and generate the embeddings.

Start talking to the bot:

[DOCTALK] Ask your question (my.pdf): What is it about?

To exit the program, type exit.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

License

This project is licensed under the MIT License.

About

DocTalk: AI Chat for Documents! DocTalk is a Python application powered by LangChain and llama3 that lets you have a conversation with your documents!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages