Skip to content

About

Cohere based

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Chat CLI

A terminal-based AI assistant that retrieves information from research papers (PDFs) and answers questions using embeddings and a large language model (LLM).


✨ Features

  • Semantic search with embeddings
  • Context-aware responses
  • Chat history memory
  • Clean terminal UI
  • PDF parsing using GROBID (Dockerized)

📦 Installation

1. Clone the repository

git clone https://github.com/hjeesum/ResearchPaperSystem.git
cd ResearchPaperSystem

2. Install dependencies:

pip install -r requirements.txt

🔑 Environment Variables

This project uses the Cohere API.

1. Create a .env file in the root directory of the project:

bash:

touch .env

windows terminal:

New-Item .env

2. Add the following line to your .env file:

COHERE_API_KEY=your_api_key_here

Note: ⚠️ Never commit .env to version control. Make sure to add the follwing to .gitignore:

.env
__pycache__/

🐳 GROBID Setup (Docker)

📄 GROBID Setup (Required for PDF Parsing)

This project uses GROBID (via Docker) to extract structured text from PDFs.

1. Install Docker

Download and install Docker from: https://www.docker.com/

2. Pull the GROBID image

docker pull grobid/grobid:0.8.2

3. Run the GROBID container

docker run --rm -p 8070:8070 grobid/grobid:0.8.2

GROBID will now be runnign at http://localhost:8070

🏗 Architecture

  1. User provides a PDF file
  2. GROBID (Docker container) extracts structured text
  3. Text is chunked and embedded using Cohere
  4. Embeddings are stored and queried for semantic similarity
  5. Relevant chunks are passed to the LLM
  6. Context-aware answer is generated in the terminal

Usage

should be the path to your research paper (PDF).

python main.py <pdfpath>

About

Cohere based

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages