Coder Social home page Coder Social logo

research-chat's Introduction

ChatLore

A Retrieval Augmented Generation powered application to chat with your research papers. While you can directly start playing with ChatLore, you can also experiment with its various model settings (Chunk Size, Chunk Overlaps, Retrieval Methods and Text Splitter Methods). ChatLore provides evaluations after each response going off three major criteria: Answer Relevance, Context Relevance and Faithfulness.

๐Ÿ“ Key Features:

  • upload & chat with research papers
  • model response evaluation on heuristics
  • parameter tuning on the UI

Tech Stack ๐Ÿ› ๏ธ

  • Front-End: TypeScript & TailWind CSS ๐Ÿš€
  • Back-End: Flask
  • Vector Database: Pinecone DB
  • ChatBot: Open AI API ๐Ÿ’ฌ & LangChain API & llama Index API
  • Deployment: Vercel

Code Structure

Below is an overview of the key components of our repository:

Key Components

  • api/: This directory contains all of our backend Flask endpoints.
  • utils/: This directory contains our helper functions for backend Flask endpoints.
  • components/: This directory contains the components that we used to construct the frontend of the application
  • requirements.txt/: The file contains the list of python modules to install in order to get the project running
  • pages: This directory contains all the major routing logic and the different pages.
  • .env.example: Provides a template for setting up environment variables. Set up the .env file in the same directory as this one.
  • .gitignore: Configures files and directories that should not be tracked by Git.
  • README.md: The document you are reading now. It provides an overview of the project, instructions for setup, usage, and contribution guidelines.
  • pull_request_template.md: Pull request template for PRs

How It Works

Retrieval Augmented Generation Pipeline

image

RAG is a technique that combines a retrieval model and a generative model to produce coherent text.

The retrieval model fetches relevant information from a database of documents. This provides context to the generative model. The generative model, usually a large language model like GPT-3, uses the retrieved information to craft a response. Together, these components allow RAG systems to leverage both external knowledge and natural language generation abilities. Benefits include:

Access to up-to-date, factual information More focused and relevant responses Ability to summarize documents and synthesize ideas RAG helps overcome some limitations of large language models while retaining their fluency and coherence. The modular architecture also allows for customization to specific use cases.

Running Locally

In order to run the app locally, first ensure you have the npm CLI installed. Then set up the .env fle as per the example in .env.example. (NOTE: Please email [email protected] if you need the variables.)

First, install the Node dependencies:

npm install
# or
yarn
# or
pnpm install

Then, install the python dependencies for the flask backend:

pip install -r requirements.txt

Then, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

The Flask server will be running on http://127.0.0.1:5328ย โ€“ feel free to change the port in package.json (you'll also need to update it in next.config.js).

Note: a complete list of all packages and dependencies can be found in requirements.txt and package.json/package-lock.json files.

research-chat's People

Contributors

nijhawananushka avatar snehasquasher avatar aliceao avatar aoalice avatar

Stargazers

 avatar

Watchers

 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.