Coder Social home page Coder Social logo

chapter-mapper's Introduction

chapter-mapper

This is a simple repository for mapping PDF files and finding answers to your questions easily and efficiently by utilizing language models from OpenAI. The framework seeks to address the problem of "hallucinations" in large language models by using a direct vector similarity search based on text embeddings of the inputs PDFs and query to find relevant documentation, and then it provides that context to ChatGPT to formulate a coherent answer to the question.

Overall data processing summary.

Getting Started

To get started using the code as quickly as possible, you may make a copy of this Google Colab Notebook to your own Google Drive. Continue to follow the INSTRUCTIONS.md for more details.

Usage

Once you have opened the Google Colab Notebook on your Drive, you may follow these steps:

  1. Upload a folder to your drive which contains 1 or more PDFs that you want to query.
  2. Then for the pdf_folder form field in the Notebook, enter the name of the folder you uploaded. If possible, ensure that the folder name is unique so the correct path is found.
  3. For the search_query form field, enter a question you have about the PDFs in your folder.
  4. Feel free to experiment with the other parameters, but the only other parameter you have to change is the openai_api_key, which you can obtain on the OpenAI website.
  5. Finally, you may simply run the cells by clicking the arrow at the left and scrolling down, or by using the shortcut SHIFT + ENTER.
  6. On the first run, it might take some time, but future runs will run faster once the .csv has been created and the embeddings have been stored. Furthermore, if you end up adding more PDFs to your pdf_folder in the future, the program will automatically update the .csv file.

chapter-mapper's People

Contributors

malekinho8 avatar

Watchers

 avatar

Forkers

odoochain

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.